-
-
Notifications
You must be signed in to change notification settings - Fork 337
/
Copy pathutils.jl
36 lines (30 loc) · 820 Bytes
/
utils.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
using Franklin
using Weave
"""
weaveall()
Weave all lecture notes in the `_weave` directory. Run from site root.
"""
function weaveall()
for (root, _, files) in walkdir("_weave")
for file in files
if endswith(file, "jmd")
@info "Weaving Document: $(joinpath(root, file))"
weave(joinpath(root, file); out_path=:doc, mod=Main)
end
end
end
end
"""
cleanall()
Cleanup all Weave generated subdirectories. Run from site root.
"""
function cleanall()
for (root, dirs, _) in walkdir("_weave")
for dir in dirs
if startswith(dir, "jl_")
@info "Removing Directory: $(joinpath(root, dir))"
rm(joinpath(root, dir); recursive=true, force=true)
end
end
end
end