Closed tlienart closed 1 year ago
Thank you so much to have taken time that you could have used playing with your kid. I'll play with it when have some time too.
Unfortunately, installing GMT on Linux is getting more and more complicated. It must be Linux taking revenge of me saying that it loves to break compatibility every 6 months. First was the libstd++
shit, now comes netcdf
saying libcurl
is no good
ERROR: LoadError: could not load library "/home/runner/gmt-install-dir/lib/libgmt.so"
/opt/hostedtoolcache/julia/nightly/x64/bin/../lib/julia/libcurl.so: version `CURL_OPENSSL_4' not found (required by /lib/x86_64-linux-gnu/libnetcdf.so.19)
Feel free to ignore this and close it; I just thought you might want to see how to proceed in a way that won't get you faced with a wall of errors that are hard to disentangle from each other. Note that I can't run GMT (no time to figure that out) which is why I commented it out in utils, should be fine for you to uncomment.
I commented out some of your utils functions which you'll have to rewrite as they rely on Franklin internals which are now different. To get page vars, you should use either
globvar(:name_of_var)
orlocvar(:name_of_var)
. The variables that are available to you (besides the one that you would define of course) are listed herehttps://github.com/tlienart/Xranklin.jl/blob/main/src/context/default_context.jl
You should be able to do the same logic (probably in a cleaner way I would think). In this version; there's an object "globalcontext" (which you can get via
curgc()
) and to it are attached a bunch of "localcontext" (which you can get viacurlc()
). Global is site-wide, local is page.You can see what these objects look like here: https://github.com/tlienart/Xranklin.jl/blob/main/src/context/context.jl#L57
the field
children_contexts
attached to the global context is the dictionary of all the local context (i.e. all pages and their page variables etc). So you can iterate over that to extract headings etc.Hope this is somewhat helpful; I thought you might like to have a starting point that builds and experiment a bit with it.