{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# SI15 / Tools, Representation, and Notation\n", "## Use pandoc to convert markdown files to HTML..." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "NOTES: Using markdown_strict as the HTML conversion allows HTML to pass through unfiltered. https://pandoc.org/MANUAL.html#extension-raw_html\n" ] }, { "cell_type": "code", "execution_count": 90, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "https://hub.xpub.nl/sandbot/~eunalee/triphonic/\n" ] } ], "source": [ "from urllib.parse import urljoin, quote as urlquote\n", "import os\n", "\n", "def get_public_url():\n", " \"\"\" assumes you are inside a subfolder of your public_html folder \"\"\"\n", " user = os.environ.get(\"USER\")\n", " rel_pwd = (os.path.relpath(os.getcwd(),os.path.expanduser(\"~/public_html\")))\n", " return f\"https://hub.xpub.nl/sandbot/~{user}/{urlquote(rel_pwd)}/\"\n", "\n", "PUBLIC_URL = get_public_url()\n", "print (PUBLIC_URL)" ] }, { "cell_type": "code", "execution_count": 91, "metadata": {}, "outputs": [], "source": [ "PUBLIC_URL=\"http://hub.xpub.nl/sandbot/~user/\"" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Version 1: BASH" ] }, { "cell_type": "code", "execution_count": 93, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "vocoder.md ==> vocoder.html\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "[WARNING] This document format requires a nonempty