Created
December 3, 2018 03:31
-
-
Save jacobdanovitch/595c3b87a7a1714c1c1d2a9d23a45ace to your computer and use it in GitHub Desktop.
Brief script that merges all Md and IPynb files into one HTML file with a ToC. Assumes alphabetical sorting. Made for organizing school notes.
This file contains hidden or 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
NAME="$1" | |
echo "Creating file $NAME.html" | |
FILES=*.md | |
for f in $FILES | |
do | |
filename="${f%.*}" | |
outfile="${filename}.ipynb" | |
echo "Converting $f to $outfile" | |
`notedown $f > $outfile` # https://github.com/aaren/notedown | |
done | |
nbmerge *.ipynb > "$NAME.ipynb" # https://github.com/jbn/nbmerge | |
jupyter nbconvert "$NAME.ipynb" --to html_toc | |
rm "$NAME.ipynb" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment