On Thu, 2 Jul 2020 at 23:21, Jim Schmitz <
james....@gmail.com> wrote:
>
> There is the "nbconvert" command-line tool that can convert notebooks to other formats like html or pdf.
>
>
https://nbconvert.readthedocs.io/en/latest/
>
> From there you can use another tool to convert the pdfs to jpg. A quick Google search turns up a tool called "pdftocairo" that can do this, but there are probably many other options.
>
>
>
>
>
>
> On Thu, Jul 2, 2020 at 4:30 PM Loren <
lp...@ucar.edu> wrote:
>>
>> Hi everyone,
>>
>> I'm new to Nikola and have a question about thumbnails. If I want to make a gallery of Jupyter Notebooks, is there a way to have Nikola automatically make the thumbnails for the Jupyter Notebooks? Currently, we take a screenshot of each Jupyter Notebook, save it as a jpeg in the images folder, then we reference the thumbnail in the Main Gallery. Is there a way to automate this?
>>
Another option would be something to automatically screenshot
webpages. We use puppeteer for this in the nikola-themes repo. You
could make a Nikola plugin to generate the screenshots automatically
(simple file_dep + code from
pkgindex_theme_demo_screenshots/take_screenshots.js), but this will
require you to run `nikola build` twice (first run would build .ipynb
and make screenshots, and the second run would update the gallery).
--
Chris Warrick <
https://chriswarrick.com/>
PGP: 5EAAEA16