tinparkBlog |||
pushToBlot - p2b.sh

pushToBlot - p2b.sh

pushToBlot - p2b.sh

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.

  • open the script in a script editor such as atom or xCode
  • setup the path to your blot directory, mine is here, yours is probably the same:
    • ~/Dropbox/Apps/Blot
  • setup the path to your .csl style document (how pandoc makes your citations look)
    • e.g. cslPath="$dropboxPath/bibliography/journal-of-new-music-research.csl"
  • similarly setup the path to your .bib file
    • e.g. "$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.

dependencies

usage example

  • cd to/the/directory/with/your/markdown
  • bash /path/to/script/p2b.sh inFileName.md '[subfolder]/[subsubfolder]'
  • eg: bash ~/Dropbox/shellScripts/p2b.sh example.md '[teaching]/[soundtracks for screen]'

note

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).

References

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

Up next aQuietSpring denoising
Latest posts Install FFMPEG TEAMSforCoursesWorkflow denoising p2b aQuietSpring changeIsAsGoodAsRest ISE-tutorial-RandomFilePlayer. listeningToFilm Faust2UnityTutorial ambiDecodingMax someExamples instructions - academic writing in markdown