A markdown based tool for slide deck creation.

Overview

Tests

Decker

A markdown based tool for slide deck creation.

Installation from source

  1. Install stack and Node.js (for npm)
  2. Clone this repo.
  3. cd decker
  4. git submodule update --init --recursive
  5. make install

Installation from source on Windows

Instead of a makefile we use a PowerShell script on Windows to install decker from source

  1. cd decker
  2. .\bin\build.ps1

If you want to copy decker to C:\Program Files (x86) you can call .\bin\build.ps1 -local. This needs a PowerShell session with administrator rights.

To then call Decker from anywhere on the PowerShell command line create a PowerShell profile file, add the following line, and restart your PowerShell session!

$Env:Path += ";${Env:ProgramFiles(x86)}\Decker\bin"

External tools

Decker uses a few external tools that need to be installed on the system to use the full functionality:

  • ssh for publishing slide decks and resources
  • rsync for publishing slide decks and resources
  • LaTeX with pdflatex to generate LaTeX in PDF-files and embedded Tikz figures
  • Graphviz to generate graphs using dot
  • Gnuplot to generate graphs using dot
  • pdf2svg to generate SVG files from PDF documents
  • libbzip2-dev
  • NodeJS to install JavaScript dependencies
  • coreutils the GNU coreutils

Installation of external tools on macOS

Use Homebrew to install most of them.

brew install rsync graphviz gnuplot pdf2svg yarn coreutils

For the rest follow instructions on their respective webites.

To confirm that you have installed all of the required external tools, run the following command in a terminal window:

decker check

Installation of external tools on Linux

Use Ubuntu's Advanced Packaging Tool (APT) to install external tools.

apt-get update && apt-get install -y gnuplot graphviz libbz2-dev pdf2svg rsync ssh      

To confirm that you have installed all of the required external tools, run the following command in a terminal window:

decker check

Usage

Decker behaves very much like a build tool. It works recursively on the current directory and all subdirectories. Markdown files ending on .md in those directories are processed and converted to either a Reveal.js slide show, a HTML document, or a PDF document, depending on the file name.

  • *-deck.md

    Files with this ending are processed as silde decks. From one source file potentially four different targets can be generated:

    • *-deck.html A reveal.js based slide show
    • *-handout.hmtl A HTML document containing the speaker notes to the slide show.
    • *-deck.pdf A PDF version of the slide show
    • *-handout.pdf A PDF version of the handout
  • *-page.md

    Markdown files ending on *-page.md are translated into corresponding HTML or PDF documents.

Decker targets

  • decker version

    Prints the current Decker version and branch as well as the current pandoc version.

  • decker help

    Prints a help document to stdout in Markdown format.

  • decker info

    Prints information about the current project's directories, the targets (files which will be generated) and the meta data options which are found in top level decker.yaml file.

  • decker html

    Builds HTML versions of all available documents.

  • decker decks

    Builds only HTML slide decks.

  • decker pdf

    Builds PDF versions of all documents.

  • decker pdf-decks

    Builds PDF versions of all slide decks.

    To use decker pdf or decker pdf-decks, Google Chrome has to be installed.
    Windows: Currently decker pdf does not work on Windows. Please add print: true or menu: true to your slide deck and use the print button in the menu or on the title slide. MacOS: Follow the Google Chrome installer instructions. Google Chrome.app has to be located in either /Applications/Google Chrome.app or /Users/username/Applications/Google Chrome.app Alternatively you can add chrome to $PATH.
    Linux: chrome has to be on $PATH.

  • decker --watch

    Builds HTML versions of all documents and then watches for document changes. Each change to a watched document triggers a rebuild. Watching can be terminated with ^C.

  • decker --server

    Like decker watch. Additionally a local web server is started that serves the generated HTML files. The *-deck.html file is openend in the browser. Changed files are reloaded in the browser. (still requires livereloadx)

  • decker example

    Write a few example files to the current directory. To start exploring Decker type

    $ decker example
    $ cd example
    $ decker --server

    and make some changes to the Markdown files.

  • decker clean

    Recursively removes all generated files from the current directory (i.e. the public folder). Also removes cached resources.

  • decker publish

    Publish the generated files to a remote location using rsync if the location is specified in the meta data. The keys rsync-destination.host and rsync-destination.path specify the publishing destination.

Contributions

Pull requests

Contributions are accepted via pull requests. Before working on a feature, please write up an issue and discuss it with the other developers. For each implemented feature, increment the version number in package.yaml. Breaking changes increment the second number. Fixes increment the third number.

Tooling

Use appropriate tooling. We use Visual Studio Code with the Haskell Language Server plugin.

Haskell source code formatting

Haskell soure code readability depends heavily on consistent formatting conventions. Formatting is automated using the excellent ormolu formatter via the Haskell Language Server.

Comments
  • Compiling image lineblocks take too long

    Compiling image lineblocks take too long

    Given a high-resolution image large.jpg with 2160 × 3840 pixels.

    This single-slide deck takes 0.3s to compile:

    # This is fast
    
    ![](data/image-1.jpg){ height=500px }
    ![](data/image-2.jpg){ height=500px }
    

    Using line-blocks for image rows, this single-slide deck takes 5.5s to compile:

    # This is slow
    
    | ![](data/image-1.jpg){ height=500px }
    | ![](data/image-2.jpg){ height=500px }
    

    The line blocks seem to do some computation on the images (detecting width/height?), which are very inefficient, at least on my system (MacOS 12.5, M1 MacBookPro).

    @monofon: Is the performance similarly bad on your machine? @salbeira: Can you please test whether it behaves similarly on Linux and Windows?

    bug 
    opened by mbotsch 4
  • kv-pairs of code blocks get wrong

    kv-pairs of code blocks get wrong "data-data" prefix

    Key-value-pairs (e.g. decker=cool) get wrong prefix (data-data-decker=cool)

    ``` {.cpp decker=cool}
    some code
    ```
    

    gets translated to

    <pre class="cpp" data-data-decker="cool">
    <code>
    some code
    </code>
    <pre>
    

    It should prefix just one "data-".

    Since this also happens with line-numbers=2-5, it breaks highlighting of code lines.

    bug 
    opened by mbotsch 4
  • decker publish from a Windows machine does not set directories to exectuable on the remote machine

    decker publish from a Windows machine does not set directories to exectuable on the remote machine

    This is a very annoying error:

    On Windows it seems that the default file permissions retrieved from cwrsync are (d)rwx------.

    If you use our decker publish which calls:

    rsync --recursive --no-group --perms --chmod=a+r,go-w --no-owner --copy-links public/ user@host:path

    on a Windows machine (with a custom installation of e.g. cwrsync to have access to the rsync program on the Windows machine) it sets the r and removes the w flags on the transferred files but it does not make sure that directories transferred have the x-flag for non-owners.

    In addition, all files are default executable, something probably not desirable on a machine that is used by more than one person.

    Therefore passing --chmod=a-x,a=rX,u+w sadly does not work as it sets the x flag back on all entries.

    The cheap and easy solution would be to change the --chmod-part to: --chmod=u=rwX,go=rX, but that sets ALL files to executable because they were executable to begin with.

    Manually fixing with sudo find /path/ -type d -exec chmod g+x,o+x {} + is possible but undesirable.

    opened by salbeira 1
  • Drawing does not work on title slide

    Drawing does not work on title slide

    Drawing on the title slide does not work if the title slide is the first slide that is displayed, eg. by opening the deck without a slide id fragment. These URLs provoke the bug:

    • http://localhost:8888/topics/000-introduction-deck.html
    • http://localhost:8888/topics/000-introduction-deck.html#/title-slide

    Opening the deck on any other slide and then navigating to the title slide works.

    opened by monofon 1
  • dependencies for crunching videos broken

    dependencies for crunching videos broken

    decker clean seems to mess up the dependencies for recorded/transcoded videos. After a decker clean all videos are re-transcoded by decker crunch, although the webm-videos did not change and the mp4-videos are still in place.

    bug 
    opened by mbotsch 1
  • Check index page progress bars

    Check index page progress bars

    I moved the progress bar machinery to resource pack decker.

    Please check that:

    1. it still works with tudo
    2. it still works with tudo after you remove resource/tudo/support/js/index.js

    See default.yaml for configuration options.

    question 
    opened by monofon 1
  • Distribution / Installers

    Distribution / Installers

    Right now we have three platforms: Windows, MacOS and Linux.

    The binary created by make can easily be distributed as-is to other Linux users. Most Linux users are tech-savvy enough to know they simply need to place an executable onto their PATH, probably ~/.local/bin. We can probably create a .deb or .pkg file to make installation even more automatic but unless we manage to put our binaries into the package repository of major distributions I do not see any value in making this more comprehensive.

    The binary created by our .\bin\build.ps1 script can also be distributed to other Windows users as-is but most Windows users have no experience in adjusting their environment variables to put the executable on their path. Right now we use the AdvancedInstaller script from the former decker-package repository to create a .msi script that places the executable somewhere the user wants and appends the target directory to the PATH environment variable.

    Most Windows users lack access to relevant third party tools though and I do not see us putting yet another step (in the form of "install a package manager") as a hurdle towards potential users. The most important missing dependencies are ffmpeg and rsync - users who did not use LaTeX, gnuplot or graphviz before will not use it with decker so these are clearly optional. Both simply need to be downloaded, extracted and their new locations appended to the PATH. Issue is ffmpeg is prominently available inside 7z archives which means users also need to download and install 7zip before they can extract and install the library. rsync for Windows is easily available as cwrsync which comes with all necessary dlls in one zip file but the important step here is to PREPEND the bin directory to the PATH of the user because windows' own OpenSSL executable does not want to work together with the cwrsync's rsync executable - so it is important that the cwrsync ssh.exe is on the PATH BEFORE window's own. It also needs a crucial config file relative to the executables because else cwrsync doesn't copy the correct file permissions. This file is not distributed inside the default cwrsync zip.

    All this can easily be done by the AdvancedInstaller : We can make it install a chosen version of ffmpeg and cwrsync together with decker into a chosen directory and do necessary adjustments to the PATH variable. We might need to check if there are licensing issues with this but it would remove two major headaches in one go for new users. The AdvancedInstaller script is not very thought through though: Installing decker multiple times (e.g. different versions) does repeatedly append values to the PATH, polluting the system a bit (not really detrimental but definetly annoying, especially if you want to clean up).

    For MacOS Mario used the other scripts inside the decker-package repository to create a .pkg file. The only issue here is that we did not sign our software so users will be confronted with unfriendly warnings but they can be ignored if launched directly from the file explorer. Same thing happens on Windows btw.

    Additional programs used by decker can be easily installed via pre-existing package managers on Linux and MacOS.

    My recommendation is to take another look at the AdvancedInstaller script and improve it with some robustness, update capabilities if installing a new version and maybe distribute ffmpeg and cwrsync with it (if licenses allow) to make the user experience as smooth as possible. Installation on Linux and MacOS is already much more simple.

    Places for distribution can stay on the wburg and tudo websites but I would suggest we also put downloads to the packaged release files into the decker-edu github pages.

    documentation question 
    opened by salbeira 0
  • do not fail if no devices are present

    do not fail if no devices are present

    If absolutely no devices are available when setting up the recorder the setup no longer fails but instead just doesn't try to set up the required streams and devices. Most of our previous code already handled these situations but it never came up during setup that no device was available.

    We tested this on a MacMini of a colleague that had no microphone and no camera available. Recording setup completed and a video recording was possible - just without external sound or the camera-video-panel available.

    If you press V to show the camera panel if no stream is available the program also doesn't fail or abort the recording and instead shows a small informational message and continues to record.

    As this situation never came up before and there seems to be no way to emulate this hardware configuration I would suggest you review this in the form of "on my device the behavior did not change".

    opened by salbeira 0
  • on reveal ready: remove inert from current slide

    on reveal ready: remove inert from current slide

    Fix for issue #12

    If and only if the presentation started and stayed on the title slide the onslidechanged that is supposed to remove the intertness of the current slide was not triggered. This now happens on reveal's ready event on the current slide in any case which should fix the whiteboard not working on the first slide of a presentation. (refreshing the page on any other slide or entering the presentation on any other slide causes reveal to trigger an onslidechange event thus hiding this error very well behind our own mechanisms)

    opened by salbeira 0
  • explain.js: captureCamera() fails if there are no cameras

    explain.js: captureCamera() fails if there are no cameras

    If you use a device like a MacMini that simply has no camera device the function fails at line 396 and throws an error, aborting the whole recording setup.

    Expected behaviour if there are simply no devices to capture would be to return a null or an empty stream so further setup still happens.

    bug 
    opened by salbeira 0
  • Hotfix Windows + Linux Decker 13 nwburg template

    Hotfix Windows + Linux Decker 13 nwburg template

    Hey I tried the Decker 13 RC3 and it still does not work for me on Linux and Windows using the nwburg template. The problem seems to be highlight.js interfering with the md compilation. Thus, the problematic section in the template has been replaced with a Todo. Commenting the section did not help. Whatever block comments were used, the js code in the script tag was always interpreted. Hopefully you know better how to do that properly.

    Oh and I removed the annoying "no resource found" error message on the clean up step of the compilation by testing the existence.

    opened by MatthiasPopp 0
  • Decker 0.13.0 Windows and Manjaro presentation build error

    Decker 0.13.0 Windows and Manjaro presentation build error

    I tried to compiled the repo at commit 90893d1 as well as RC2 with a fresh Windows 10 and up-to-date Manjaro OS. By using the regular decker html I do have issues to compile an existing presentation. On MacOs it compiles fine. The same goes for Decker 0.12 for all platforms.

    The presentation is one of @marcerich lectures and the error is as follows

    Error when running Shake build system:
      at want, called at src/Text/Decker/Project/Shake.hs:70:16 in decker-0.13.0-F2g1oeUEJMuKwu8gOb4JYR:Text.Decker.Project.Shake
    * Depends on: html
      at need, called at app/Decker.hs:52:3 in main:Decker
    * Depends on: public/exercises/09-latency-quiz-deck.html
      at error, called at src/Text/Decker/Resource/Template.hs:68:35 in decker-0.13.0-F2g1oeUEJMuKwu8gOb4JYR:Text.Decker.Resource.Template
      at error, called at src/Relude/Debug.hs:289:11 in relude-1.1.0.0-7JT7B2uwFcC7TQpV8XiQyh:Relude.Debug
    * Raised the exception:
    # compilation of pack template failed: template/deck.html,  error: (line 206, column 39):
    unexpected "\""
    expecting "$", "{", "if", "for", "~", "^", letter, "it" or letter or digit
    

    The source file syntax is correct and does have the character \. It is part of a latex command

    Here is the problematic section:

    ## 
    
    <span style="font-size: x-small;"> Bos, Jelte E, Sjoerd C de Vries, Martijn L van Emmerik, and Eric L Groen. 2010. “The Effect of Internal and External Fields of View on Visually Induced Motion Sickness.” Applied Ergonomics 41 (4). Elsevier: 516–21</span>
    
    <span style="font-size: x-small;"> Kennedy, Robert S., Norman E. Lane, Kevin S. Berbaum, and Michael G. Lilienthal. 1993. “Simulator Sickness Questionnaire: An Enhanced Method for Quantifying Simulator Sickness.” The International Journal of Aviation Psychology 3 (3): 203–20. doi:10.1207/s15327108ijap0303\textunderscore 3.</span>
    
    <span style="font-size: x-small;"> Keshavarz, Behrang, and Heiko Hecht. 2011a. “Axis Rotation and Visually Induced Motion Sickness: The Role of Combined Roll, Pitch, and Yaw Motion.” Aviation, Space, and Environmental Medicine 82 (11). Aerospace Medical Association: 1023–29.</span>
    
    <span style="font-size: x-small;"> Keshavarz, Behrang, and Heiko Hecht. 2011b. “Validating an Efficient Method to Quantify Motion Sickness.” Human Factors 53 (4). Sage Publications Sage CA: Los Angeles, CA: 415–26. </span>
    

    The decker example slide compiles just fine though.

    If you need further info on the file contents, please PM me.

    Any suggestions how I can fix/debug that?

    opened by MatthiasPopp 3
  • Captions for Blockquotes

    Captions for Blockquotes

    While we love to quote our sources with a simple [1] other fields usually quote stuff with a full source declaration right beneath their quotes (and also have no experience with BibTeX)

    > This is a longer excerpt from a book about a topic I am not very familiar with.
    Caption: John Doe, Important Research pp.123
    

    It would be neat if we could have something like this parsable so we can style the caption beneath a blockquote (e.g. small text floating to the right).

    enhancement 
    opened by salbeira 0
  • Better code highlighting

    Better code highlighting

    We are relying on reveal's inclusion of highlight.js for code highlighting. Seems there is a new kid on the block with prism.js. It has many more languages out of the box (incl. 6502 asm :) and has some more nifty features. Might be worth thinking of a migration/add-on.

    enhancement 
    opened by marcerich 0
  • Build multiple index files with template

    Build multiple index files with template

    It seems that only one index.md is currently transformed to html. Sometimes there are additional index files in sub directories. Would be nice if we would build these also with the template.

    More general, maybe a similar function to <*>-deck.md, e.g., using <*>-idx.md would be nice. However, we also want to generate the unique index.html of course. So in contrast to the handling of decks one could throw the suffix -idxaway.

    enhancement 
    opened by marcerich 0
  • Disable Video button for slides not in videos

    Disable Video button for slides not in videos

    We currently always display the video button if we have accompanied video content to a slide set. However, often it is the case that one adds an additional slide here and there without recording a complete new video to go along. Use-cases, e.g., think addition of quizzes, literature, home work like reading etc. in existing slide sets. In these cases the button is still shown but will restart the video from the very start, which is a severe usability problem since the users reading the slides are then lost and have to navigate back to the slide they were before pressing the video button. This navigation is possible using our internal menu if they know the title/ID of there last read, which might be tricky, and - depending on our yaml settings - the browser's back button doesn't do the trick since it might throw users to the index page. Hence, there a four general options in case of late content additions imho:

    1. Disable the button if the slide ID is missing in the *-times.json
    2. Add an additional entry in the *-times.json pointing to the slide just after the new on
    3. Add an additional entry in the *-times.json pointing to the slide just before the new on
    4. Add an additional entry in the *-times.json pointing to a new video content just showing this slide and sliced into the existing one for 10 seconds so.

    Option 1. is straight forward and possibly the quick way to go. Specifically option 4 also has its benefits but needs a lot of new logic behind, e.g., updating the *-times.json from the point of entry and including the 10s offset for all slides to come and creating an artificial video using, e.g., ffmpeg (maybe with some generic audio stating the missing explanation). While 1. looks straight forward, it - as with options 2. and 3. - comes with the problem in the use-case that students work through the content first by watching the videos. Here, we might have students miss these new slides completely (bad in any case but specifically if these new slides define homework). In that use-case, I guess only option 4. does the trick kind of completely. However, that is up to decide on the severeness of the stated problem and the costs for implementing 4.

    enhancement 
    opened by marcerich 0
Owner
Decker
Development on the Decker family of tools
Decker
Hemsida för personer i Sverige som kan och vill erbjuda boende till människor på flykt

Getting Started with Create React App This project was bootstrapped with Create React App. Available Scripts In the project directory, you can run: np

null 4 May 3, 2022
Kurs-repo för kursen Webbserver och Databaser

Webbserver och databaser This repository is meant for CME students to access exercises and codealongs that happen throughout the course. I hope you wi

null 14 Jan 3, 2023
Exports a JPDB deck to a Yomichan compatible frequency list.

JPDB Frequency List A frequency list generated using most of the jpdb corpus can be found in the releases. It is not exhaustive, as there is no deck a

marv 17 Nov 16, 2022
MDX Deck so good you get the chills 😮‍💨

MDX Frisson MDX Deck so good you get the chills. ??‍?? Frisson noun: a sudden strong feeling of excitement or fear; a thrill. Features ?? Markdown/MDX

Sreetam Das 7 Dec 6, 2022
🏷️ See what Games are verified for the Steam Deck and which Medal they have on ProtonDB in the Steam Store

Show Great on Deck on Steam great-on-deck-search ??️ See what games are verified for the Steam Deck and which medal they got on ProtonDB in the Steam

Piepmatz 31 Dec 5, 2022
Plugin for the Steam Deck, to adjust color settings, like saturation or gamma

vibrantDeck A Steam Deck plugin (for Decky Loader) to adjust screen saturation / vibrancy. Build instrutions Clone the repository to use as an example

libvibrant 48 Jan 8, 2023
Make the content slide prettily across the screen with variable sizes of scrolling items, in any of four directions, pausing while the mouse is over the marquee, and all with vanilla JavaScript.

TEG Marquee Make the content slide prettily across the screen with variable sizes of scrolling items, in any of four directions, pausing while the mou

Paul B. Joiner 0 Dec 30, 2021
A dependency-free JavaScript ES6 slider and carousel. It’s lightweight, flexible and fast. Designed to slide. No less, no more

Glide.js is a dependency-free JavaScript ES6 slider and carousel. It’s lightweight, flexible and fast. Designed to slide. No less, no more What can co

null 6.7k Jan 3, 2023
A full screen slide show for images and videos

Vanilla JS Slide full screen slide show for videos and images Why? This is a scratch-your-own-itch project as I wanted a way to see images and videos

Christian Heilmann 24 Oct 26, 2022
Simple customizable slide panel (without jQuery)

toolslide.js Minimalistic customizable slide panel (without jQuery) Table of contents Quick start Usage Examples Options Methods Events Browser suppor

null 5 May 23, 2022
Slide everything into this vanilla javascript slider: just 20kb all-inclusive, no dependencies!

Lightweight vanilla javascript media and contents slider, by LCweb Just 20KB to have: Top features list: single file, no dependencies, 100% pure javas

Luca 4 May 12, 2021
A plugin for the Obsidian markdown note application, adding functionality to render markdown documents with multiple columns of text.

Multi-Column Markdown Take your boring markdown document and add some columns to it! With Multi Column Markdown rather than limiting your document lay

Cameron Robinson 91 Jan 2, 2023
A markdown-it plugin that process images through the eleventy-img plugin. Can be used in any projects that uses markdown-it.

markdown-it-eleventy-img A markdown-it plugin that process images through the eleventy-img plugin. Can be used in any projects that use markdown-it. F

null 25 Dec 20, 2022
An obsidian plugin for uploading local images embedded in markdown to remote store and export markdown for publishing to static site.

Obsidian Publish This plugin cloud upload all local images embedded in markdown to specified remote image store (support imgur only, currently) and ex

Addo.Zhang 7 Dec 13, 2022
Markdown Transformer. Transform markdown files to different formats

Mdtx Inspired by generative programming and weed :). So I was learning Elm language at home usually in the evening and now I am missing all this gener

Aexol 13 Jan 2, 2023
4Web is a collection&creation of codebase, frameworks, libraries dedicated to web development 📦

?? You can also contribute to add / create your own collection in this repository Collection name Description ?? blinke

Raja Rakotonirina 5 Nov 14, 2022
FormGear is a framework engine for dynamic form creation and complex form processing and validation for data collection.

FormGear is a framework engine for dynamic form creation and complex form processing and validation for data collection. It is designed to work across

Ignatius Aditya Setyadi 91 Dec 27, 2022
Best dialogue for file creation, renaming, opening, deletion or jumping to a specific line

Features No need to rely on vscode.quickOpen Create, rename, delete, open files/folders without relying on the sidebar Jump to specific lines Find spe

Suryansh Makharia 3 Jul 31, 2022
Allow moving/copying/and creation embeds for blocks with drag-n-drop just like Logseq or Roam

Demo Features Drag-n-drop for list items in the same pane and between different panes 3 modes: move block, copy block, embed block Automatic reference

null 92 Dec 26, 2022