use asyncmap
This commit is contained in:
@@ -67,6 +67,10 @@ if isnothing(folder) && isnothing(file)
|
|||||||
# # alternatives needs work
|
# # alternatives needs work
|
||||||
# build_pages("alternatives", "plotly_plotting", :html, force)
|
# build_pages("alternatives", "plotly_plotting", :html, force)
|
||||||
|
|
||||||
|
folders = ("precalc", "limits", "derivatives", "integrals", "ODEs",
|
||||||
|
"differentiable_vector_calculus", "integral_vector_calculus",
|
||||||
|
"misc")
|
||||||
|
|
||||||
# keep it simple for now; uncomment above once build goes through
|
# keep it simple for now; uncomment above once build goes through
|
||||||
build_pages("precalc", nothing, :html, true)
|
build_pages("precalc", nothing, :html, true)
|
||||||
|
|
||||||
|
|||||||
@@ -292,20 +292,26 @@ The files will be built as subdirectories in the package directory. This is retu
|
|||||||
|
|
||||||
"""
|
"""
|
||||||
function weave_all(;force=false, build_list=(:script,:html,:pdf,:github,:notebook))
|
function weave_all(;force=false, build_list=(:script,:html,:pdf,:github,:notebook))
|
||||||
for folder in readdir(joinpath(repo_directory,"CwJ"))
|
folders = readdir(joinpath(repo_directory,"CwJ"))
|
||||||
folder == "test.jmd" && continue
|
folders = filter(F -> isdir(joinpath(repo_directory, "CwJ", F)), folders)
|
||||||
weave_folder(folder; force=force, build_list=build_list)
|
asyncmap(F -> weave_folder(F; force=force, build_list=build_list), folders)
|
||||||
end
|
# for folder in readdir(joinpath(repo_directory,"CwJ"))
|
||||||
|
# folder == "test.jmd" && continue
|
||||||
|
# weave_folder(folder; force=force, build_list=build_list)
|
||||||
|
# end
|
||||||
end
|
end
|
||||||
|
|
||||||
function weave_folder(folder; force=false, build_list=(:html,))
|
function weave_folder(folder; force=false, build_list=(:html,))
|
||||||
!isnothing(match(r"\.ico$", folder)) && return nothing
|
!isnothing(match(r"\.ico$", folder)) && return nothing
|
||||||
for file in readdir(joinpath(repo_directory,"CwJ",folder))
|
files = readdir(joinpath(repo_directory,"CwJ",folder))
|
||||||
!occursin(r".jmd$", basename(file)) && continue
|
files = filter(f -> occursin(r".jmd$", basename(f)), files)
|
||||||
println("Building $(joinpath(folder,file))")
|
asyncmap(file -> weave_file(folder, file; force=force, build_list=build_list), files)
|
||||||
try
|
# for file in readdir(joinpath(repo_directory,"CwJ",folder))
|
||||||
weave_file(folder,file; force=force, build_list=build_list)
|
# !occursin(r".jmd$", basename(file)) && continue
|
||||||
catch
|
# println("Building $(joinpath(folder,file))")
|
||||||
end
|
# try
|
||||||
end
|
# weave_file(folder,file; force=force, build_list=build_list)
|
||||||
|
# catch
|
||||||
|
# end
|
||||||
|
# end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user