This is a simple bash script that takes a markdown .md
document and publishes it directly to your blot folder. If you don’t have citations in your post, there is less of a need to run this script. However, blot doesn’t convert markdown to html perfectly and so this script means you can use the full wealth of pandoc’s markdown conversion abilities and set proper HTML before dumping it into your blot folder for publications.
Download the script from github
It needs a little preparation.
~/Dropbox/Apps/Blot
.csl
style document (how pandoc makes your citations look)
cslPath="$dropboxPath/bibliography/journal-of-new-music-research.csl"
"$dropboxPath/bibliography/bibliography.bib"
When you’ve done that, save the script somewhere sensible.
The script assumes that you’re already using pandoc
and pandoc-citeproc
to render useful documents from markdown.
pandoc
http://www.pandoc.org/pandoc-citeproc
https://github.com/jgm/pandoc-citeproczotero
or something) https://www.zotero.org/download/realpath
available in the OSX core utils from brew brew install coreutils
rsync
to enable flawless updates from your source directory brew install rsync
cd to/the/directory/with/your/markdown
bash /path/to/script/p2b.sh inFileName.md '[subfolder]/[subsubfolder]'
bash ~/Dropbox/shellScripts/p2b.sh example.md '[teaching]/[soundtracks for screen]'
The script will copy an images
, sounds
and videos
folder across to the relative directory in blot. If you have other things like files
this goes to the root directory instead. Any images you refer to in your canonical document will be copied across. Bear in mind however that if you don’t place an _ (underscore) in front of image names, they will be published as blog posts as well. I have taken to naming my files thus: _image.png
.
Have fun.., oh and here’s some citations to be sure that the script is working properly for this post. Notice, that in markdown, I’ve added a final section #References
. Citations will show up underneath this (Parker, 2018), (MacFarlane, 2019), (Smalley, 1994).
MacFarlane, J. (2019). Universal markup converter. Contribute to jgm/pandoc development by creating an account on GitHub. https://github.com/jgm/pandoc
Parker, M. (2018). Sonikebana, version 1.0 documentation example. Sonikebana V1.0. https://doi.org/https://doi.org/10.7488/ds/2351
Smalley, D. (1994). Defining timbre Refining timbre. Contemp. Music Rev., 10(2), 35–48. https://doi.org/10.1080/07494469400640281