Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
added path to the resources metadata, the same as in from_filename(...) in nbconvert.exporters.py #2753
Thanks, I think this makes sense. We should, however, make sure to convert the URL path into an absolute filesystem path using
Sounds perfect. I have so far little experience with this, but maybe somebody can correct this. The question arises if nbconvert should also work for other content_managers? or should it primarily be used as a tool when the notebook is stored locally?…
------ Originalnachricht ------ Von: "Thomas Kluyver" <firstname.lastname@example.org> An: "jupyter/notebook" <email@example.com> Cc: "Gabriel Nützi" <firstname.lastname@example.org>; "Author" <email@example.com> Gesendet: 18.08.2017 13:18:17 Betreff: Re: [jupyter/notebook] added path to the resources metadata, the same as in from_filename(...) in nbconvert.exporters.py (#2753)
Thanks, I think this makes sense. We should, however, make sure to convert the URL path into an absolute filesystem path using contents_manager.get_os_path(). And this will only be possible with the default file-based contents manager, not with a contents manager that stores notebooks in a database or something. — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub <#2753 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AAnhDeNINpQmGrgsbYJ0eU184bC2cbAfks5sZXL5gaJpZM4O1dm8>.
Oct 5, 2017
When nbconvert loads the notebook from a named file (i.e. normal use at the command line), the path is available to exporters and templates in the
The point of this PR was that the path should also be available in the same way when nbconvert is used through the notebook web interface.
Sorry if this did break the PDF export. I think the fact that it's actually doing a conversion to Latex in a temporary directory and then a PDF build from there means it tends to hit edge cases in dealing with paths.
Ah, I see from your other comment the issue now. We didn't look carefully enough at nbconvert. path is supposed to be only the directory path containing the notebook, not the full file path. :-( That's neither the first nor the last time we've been bitten by our confusing use of the word 'path'. I only just caught the same mistake in #2949 before merging it.
Now that we can see that, do you want to do a PR to fix it (i.e. separate out 'name')?
It deals with loading and saving notebooks and other files. Normally that just means reading and writing files in directories, but you can plug in another content manager to store notebooks in a database, or to store them in files in a different format.
If you know what FUSE is, it's a similar concept to that - a way to use other storage systems kind of like a filesystem.