Codimd: Export of Reveal.js slides

Created on 12 Sep 2017  路  6Comments  路  Source: hackmdio/codimd

It would be great to be able to export a .zip file with all the files required for an offline reveal.js slide presentation.

This could then be loaded from a local folder.

To achieve this the following would be required:

  1. export .md file
  2. export js and css folders for reveal.js
  3. export uploaded images
  4. rewrite links (if necessary), actually image upload links should be relative anyway.

This would be really useful as a backup for presentations

feature imporexport

Most helpful comment

wget --recursive --convert-links did the trick for me.

All 6 comments

As a workaround, you can print the slides to PDF. See https://github.com/hackmdio/hackmd/issues/33#issuecomment-267508760

use "save as" in your browser, e.g via right-click or ctrl-s

wget --recursive --convert-links did the trick for me.

With #863 We should provide an easy way to print slides and this way export them.

I don't see the need to add a more complex export.

If one wants the slides offline, we offer to download the markdown. Integrating it in his revealjs should be doable or they can just use PDF based slides or the online version.

I have found a way to save an archive of a slide presentation built with codimd.
I had some trouble getting wget to pull the images from the presentation (I think because the links to the images are in markdown).

So, it's a three step process but it's quick and works well.
Let's say you have a slide show at https://codimd.server.net/p/S1PIjfhM8#/

  1. use wget to grab the files and the requisites (.css and .js)

    • your presentation will end up as p/S1PIjfhM8.html
    wget   --recursive   --no-clobber   --page-requisites   \
    --html-extension   --convert-links   \
    --domains codimd.server.net \
    https://codimd.server.net/p/S1PIjfhM8#/
    
  2. use the firefox plugin: Image Picka

    • use the save pattern: Image_Picka/uploads/${name}${ext}
    • it gets all images on page (including .svg)
    • move the images to the folder called uploads in the web archive root
  3. we need to use sed to change the links in the html file to relative links so that they point to the images

    cd p
    sed -i .bak 's|/uploads/upload_|../uploads/upload_|g' S1PIjfhM8.html
    

Then you'll have a full copy of the slides that you can run offline. It's also good for archive purposes.

It'd be great if something like this was also built into the codimd program under the save options, maybe save slides.

I have had success with the Save All Resources chrome extension. The only issue is that it uses the browser cache for all external assets, so if you purge your cache (for example, by pressing Ctrl + Shift + R), the offline presentation stops working.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

SISheogorath picture SISheogorath  路  4Comments

yaxu picture yaxu  路  4Comments

ccoenen picture ccoenen  路  3Comments

ghost picture ghost  路  4Comments

Nebukadneza picture Nebukadneza  路  3Comments