rikhuijzer / PlutoStaticHTML.jl

Convert Pluto notebooks to HTML in automated workflows
https://PlutoStaticHTML.huijzer.xyz
MIT License
83 stars 7 forks source link

Can you use this for automatically downloading and building from a url? #167

Closed Dale-Black closed 1 year ago

Dale-Black commented 1 year ago

Given an example url ("https://github.com/Dale-Black/CalciumScoring.jl/blob/master/src/agatston.jl") is there a way to use this package in a Julia script to download and export a static HTML file?

rikhuijzer commented 1 year ago

Yes probably. I see that the notebook is not stand-alone because it depends on the directory above it via Pkg.activate(..). Then, the steps will be something like the following:

  1. Git clone the repository at https://github.com/Dale-Black/CalciumScoring.jl/
  2. dir = joinpath(repo_dir, "src")
  3. build_notebooks(BuildOptions(dir), ["agatston.jl"])

Make sure that opening the Pluto notebook stand-alone works before trying it via PlutoStaticHtml. It looks like it wouldn't because the notebook doesn't do Pkg.instantiate.