-
-
Notifications
You must be signed in to change notification settings - Fork 29
/
Copy pathgen_mds.jl
44 lines (38 loc) · 1.21 KB
/
gen_mds.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
37
38
39
40
41
42
43
44
using Literate
using Pkg
get_example_path(p) = joinpath(@__DIR__,"..", "examples", p)
OUTPUT = joinpath(@__DIR__, "src", "examples")
folders = readdir(joinpath(@__DIR__, "..", "examples"))
setdiff!(folders, [".DS_Store"])
#folders = ["aog", "dashboards", "geo", "rpr"]
function get_files(folders)
srcsfiles = []
for f in folders
p = joinpath(@__DIR__,"..", "examples", f)
if isdir(p)
names = readdir(p)
setdiff!(names, [".DS_Store",
"world_energy.jl",
"gott_azimuthal.jl",
"earthquakes_proj.jl",
"rasters.jl",
"submarine_cables.jl",
"textScatterLines.jl",
"gott_azimuthal.jl",
"us_states.jl",
"gapminder.jl",
])
fpaths = "$(f)/" .* names
srcsfiles = vcat(srcsfiles, fpaths...)
else
srcsfiles = vcat(srcsfiles, f)
end
end
return srcsfiles
end
src_folders = get_files(folders)
srcsfiles = get_files(src_folders)
for p in srcsfiles
Literate.markdown(get_example_path(p), joinpath(OUTPUT, dirname(p));
documenter=true, credit=false)
end