Skip to content

Instantly share code, notes, and snippets.

@ataias
Created April 10, 2020 20:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ataias/9dfac5c50f71b8207c9abcab265d41a7 to your computer and use it in GitHub Desktop.
Save ataias/9dfac5c50f71b8207c9abcab265d41a7 to your computer and use it in GitHub Desktop.
Aliases to help converting files
#!/usr/bin/env zsh
# You need to have pandoc and ffmpeg installed in your system
markdown2org () {
fullFilename=$1
filename="${fullFilename%.*}"
pandoc -f markdown -t org -o "$filename".org "$fullFilename"
}
markdown2html () {
fullFilename=$1
filename="${fullFilename%.*}"
pandoc -f markdown -t html -o "$filename".html "$fullFilename"
}
# Might work for other file types, I actually just tested it from mov to mkv
mov2mkv () {
fullFilename=$1
filename="${fullFilename%.*}"
ffmpeg -i "$fullFilename" -f matroska -vcodec libx265 -acodec libvorbis "$filename".mkv
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment