#!/bin/bash # Auther: Skiqqy HOST="https://github.com/" quote=true # True injects a qoute in hex # Find a (WIP) qoute and transform to hex, replaceing newlines with \n quote() { if "$quote" then res=$(printf 'C is quirky, flawed, and an enormous success.\n Dennis M. Ritchie' | hexdump -e '8/1 " %02X" "\n"') printf '%s' "${res//$'\n'/\\n}" fi } conv() { # Take a file and convert it to html by making substitutes. # ^/name -> https://github.com/name # */name.domain -> https://name.domain # _/name.domain -> http://name.domain # a/name.domain/title/ -> title sed -E "s|(\\^/)([^ \)]*)|^\/\2|g" | sed -E "s|(\\*/)([^ \)]*)|*\/\2|g" | sed -E "s|(\\_/)([^ \)]*)|_\/\2|g" | sed -E 's|a/(.+)/(.+)/|\2|g' | sed -E 's|^SBLOCK\. (.+)|