Created
April 10, 2020 20:43
-
-
Save ataias/9dfac5c50f71b8207c9abcab265d41a7 to your computer and use it in GitHub Desktop.
Aliases to help converting files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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