I have intend to embed a long tutorial notebook on my web page, and using Google colab notebook with Gist seems to do what I need. Almost!
The tutorial has multiple parts, and I would love for it to not be split up into multiple notebooks on the backend.
So, is it possible to make my embedded Gist iframe start from a particular cell of the notebook?
That way I could embed it multiple times, but have it start from different cells in different parts of my website, rather than having multiple distinct notebooks.
Thanks!
Related
I use Jupyter notebooks to teach fluid mechanics. It allows me to present students with various forms of media from basic python examples to videos and 3D models.
https://github.com/nolankucd/MEEN20010
Currently I use pyGEL3D to display simple OBJ files and it works reasonably well. The models can be rotated and zoomed etc but there is no support for materials or animation. I can export the notebooks to embedded html and everything works. This is convenient because I can support students with different technical abilities.
I’d like to transition to glTF files created in Blender to avail of animation and material support. I want to keep the solution simple or self contained to keep the simplicity of the material.
I’ve tried a few different approaches. I’ve found pyVista can load the scene but does not support animation and performance can be poor.
Using an iframe I’ve tried a few viewers.
Don McCurdy’s viewer (https://gltf-viewer.donmccurdy.com) works well but I need to manually load local files via drag and drop. I can load a file hosted via CORS but I’d like to load a local file automatically.
from IPython.display import IFrame
model_url = "https://www.khronos.org/assets/gltf/BusterDrone.glb"
IFrame("https://gltf-viewer.donmccurdy.com#kiosk=1&model="+model_url, width=800, height=600)
There is a loader example on threejs.org which works nicely and loads the example files but I’m unsure how to modify it to load a local file.
https://threejs.org/examples/#webgl_loader_gltf
Can anyone help me understand how display a glTF file in Jupyter?
I am working within GitHub to create and share a tutorial template.
The idea is to keep the text and the images in the tutorial uniform so I have been trying to look up a way to gain a bit more style control over the images.
For its simplicity, I am trying to do this in markdown, but I am having trouble figuring out to do reference styling. I could use any pointers.
Otherwise, I can do this in HTML, but I am trying to keep things simple in order to train anyone who may be creating new tutorials.
You could start a gitbook project as a markdown-based Git repository.
They propose multiple style associated to the image block.
Otherwise, you can use a static generator engine like Hugo to generate from your Markdown HTML page with the style you want, using one of their documentation theme.
Again, this is based on markdown files, which can be stored in a GitHub-hosted repository.
I have a quite large Shiny application with dozens of plotly charts (and many tables and calculations) that can be used online, but the main feature is that clients generate PDFs. The PDF generation is done now on the client side, i.e. with clients browser (IE) and their locally installed digital printer using specially prepared HTML template & CSS file for the optimal layout that covers a long list of the very specific PDF design requirements that cannot be covered easly with RMD.
The solution is far from the optimal as it requires "a lot of clicks" for the end users and is very sensitive to any client's local settings (like print margins) which are not always possible to set with the CSS file.
My questions is:
is it possible to shift the PDF generation to the server side as sort of digital printer that is installed on the server, so all the layout requirements are covered and user's parameters (like date) are applied, ideally without a need to recalculate everything to get the results? I was already considering writting this in LaTeX, but it would be a very complicated job due to very specific layout requirements.
There is a page in the Shiny documentation about this exact topic. Basically you create a report.Rmd that takes the user inputs and uses it as variables for printed plots.
Here is a working example with HTML output.
edit: Didn't see your design requirements at first, sorry. Maybe those can be covered using a LaTeX background or the like?
As my ipython notebooks get larger, I find myself more and more frequently wanting to quickly move between two sections. Since there is no split-window view, is there any way to edit the same notebook in two browser tabs simultaneously? Naively it seems that you have to reload the notebook in the second window after making changes in the first.
I'd also be interested in any general workflow suggestions for this, thanks!
It's not a perfect solution, but I use section headers and a floating table of contents to jump around to different sections. It's nice that it encourages me to make headings, although it's not super efficient. I use MinRK's extension to make the TOC (here).
If you want to go the TOC route, you should look at the How can I add a table of contents to an ipython notebook? question. The answers there (currently) suggest either MinRK's extension to the notebook as I use, or a simple browser extension that can generate a TOC for any webpage.
I'd like to set up a CMS that allows clients to generate a PDF brochure from a series of text inputs and text areas (rich text editor). Clients would fill out text inputs and then select (via a check box) which contents should appear in the exported PDF. This would then stitch together a PDF brochure containing pages only applicable to the options chosen by the client.
All the content is in a CMS with web pages and pdfs built on the fly as per the client's choices. A change in the content is then reflected immediately in the published docs meaning no redundant, out of date pdfs and the benefit of all the tools within the CMS (workflow, publishing dates, security, etc).
Does anyone know of any tools that do this?
Appreciate any help.
well your question require a lot of work to be done. I had similar requirement and what i have done i can brief here. I created multiple views which lets me select their columns and i have used my own rules for differentiating columns from test like {view.columnname}. when your save all information i have used itextsharp for pdf generation.
There is plenty of information on itextsharp.
You might be able to do this with design tools and reporting software, plugged into your CMS of choice. For example, you could use Wordpress, and then design your PDF output using iReport, and run it with Jasper. You'd have to work on the bit to translate user inputs to a query passed to the report, but that shouldn't be too much work.
One issue is that, regardless of the work you put into the design, when you attempt to share it, it wont look like a brochure at all, only sequential single page PDFs. As an alternative I found a website where you can upload or design your brochure, it can then be downloaded and shared as a flippable, digital brochure. If you are interested check out https://simplebooklet.com/learn/animated-tri-folds.php