diff --git a/quarto/adjust_plotly.jl b/quarto/adjust_plotly.jl index 5060e98..c646e5e 100644 --- a/quarto/adjust_plotly.jl +++ b/quarto/adjust_plotly.jl @@ -5,19 +5,40 @@ # This little script just adds a line *before* the require call # which seems to make it all work. The line number 83 might change. -f = "_book/alternatives/plotly_plotting.html" -lineno = 88 +#alternatives/plotly_plotting.html +function _add_plotly(f) + lineno = 117 str = """ - - """ -r = readlines(f) -open(f, "w") do io - for (i,l) ∈ enumerate(r) - i == lineno && println(io, str) - println(io, l) + r = readlines(f) + open(f, "w") do io + for (i,l) ∈ enumerate(r) + i == lineno && println(io, str) + println(io, l) + end end end + + + +function (@main)(args...) + for (root, dirs, files) in walkdir("_book") + for fᵢ ∈ files + f = joinpath(root, fᵢ) + if endswith(f, ".html") + @show :adjust, f + _add_plotly(f) + end + end + end + + #f = "_book/integrals/center_of_mass.html" + #_add_plotly(f) + + return 1 +end + + ["ODEs", "alternatives", "derivatives", "differentiable_vector_calculus", "integral_vector_calculus", "integrals", "limits", "misc", "precalc", "site_libs"]