-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathwebapps.jl
36 lines (28 loc) · 953 Bytes
/
webapps.jl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
"""
url(dotstr, base = first(webapps))
Create a URL at which the given dot-string is rendered as an image,
using an online Graphviz rendering service.
The dot-string is URL-encoded, and appended to a partly complete
`base` URL (see [`webapps`](@ref))
## Example:
```jldoctest
julia> base = PkgGraph.webapps[2];
julia> PkgGraph.url("digraph {Here->There}", base)
"http://magjac.com/graphviz-visual-editor/?dot=digraph%20%7BHere-%3EThere%7D"
```
"""
url(dotstr, base = first(webapps)) = base * escapeuri(dotstr)
const webapps = [
"https://dreampuf.github.io/GraphvizOnline/#",
"http://magjac.com/graphviz-visual-editor/?dot=",
"https://edotor.net/?engine=dot#",
]
@doc(
"""
A list of websites that can render Graphviz dot-formatted
strings. Used by [`url`](@ref).
Note that these are 'base URLs', to which url-encoded
dot-strings can be directly appended.
Default contents:
""" * join("1. [`$r`]($r)\n" for r in webapps),
webapps)