Skip to content

Instantly share code, notes, and snippets.

@louiskirsch
Last active December 12, 2020 17:05
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save louiskirsch/28a8678eea37dac9180111641f72357a to your computer and use it in GitHub Desktop.
Save louiskirsch/28a8678eea37dac9180111641f72357a to your computer and use it in GitHub Desktop.
Convert dynalist exported plain text with spaces to remark presentation
#!/bin/bash
name=${1:-slides}
replace='s/^([^ ].*)/# \1§/g; s/^ {8}([^ ].*)/§### \1§/g; s/^ {4}([^ ].*)/§## \1§/g; s/ +(\![[])/\1/g; s/ {12}([^ ]+)/- \1/g; s/\![(]([0-9-]+)[)]/\1/g'
sed -E "$replace" <&0 | tr "§" "\n" > $name.md
markdown-to-slides -d $name.md -o $name.html
open $name.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment