From e2093586fc35b7e23ca036294818365b3a60604d Mon Sep 17 00:00:00 2001 From: YargoA2 Date: Tue, 3 Jan 2017 01:34:04 +0100 Subject: [PATCH] update poorkyll.sh to most recent version, add more info to README.md --- bin/README.md | 20 +++++++++++++++++++- bin/index.html | 4 +++- bin/poorkyll.sh | 39 +++++++++++++++++++++++++++++++-------- 3 files changed, 53 insertions(+), 10 deletions(-) diff --git a/bin/README.md b/bin/README.md index fcfc7fc..b06f5ef 100644 --- a/bin/README.md +++ b/bin/README.md @@ -1,3 +1,21 @@ # bin -Here are scripts used for conversion or handling sources. +This directory contains scripts used for conversion or handling sources. +They are run on a local machine to generate HTML files, which are then +commited to the repository for publication on github.io. + +- `convchars.sh` is a sed/tr/shell script converting German umlauts and + some other special characters into HTML entities +- `mrkdwn.pl` is a stripped down version of the + [original Markdown]( https://daringfireball.net/projects/markdown/ ) + Perl script _(note: needs at least Perl version 5.006)_ +- `poorkyll.sh` uses `convchars.sh` and `mrkdwn.pl` to generate `*.html` + files from all `*.md` files in the current directory; it can be given + the name of a style file (which must be accessible on the host) for + inclusion in the generated HTML files. If you give it the name of a + nonexistent style file (like "-h"...) it will print some help/hints, + including where it expects the other two scripts. + +--- + +_(2017 YCB)_ diff --git a/bin/index.html b/bin/index.html index c673b66..fc1871f 100644 --- a/bin/index.html +++ b/bin/index.html @@ -1,6 +1,8 @@ scripts - + + +

scripts

This is a script directory, not meant for browsing.

diff --git a/bin/poorkyll.sh b/bin/poorkyll.sh index 00f9cdf..baacc26 100755 --- a/bin/poorkyll.sh +++ b/bin/poorkyll.sh @@ -1,12 +1,35 @@ #!/bin/sh -# (2015 YCB) +# (2015,2016 YCB) +# change bindir according to your needs! +bindir=${BINDIR:-$HOME/bin} +if test "$1" = "" +then sfl='' + echo ": no stylesheet used" +else if test -f "$1" + then sfl="" + echo ": using stylesheet $1" + else cat <] + will generate files with .html suffix from all files with .md suffix, + converting Markdown to HTML, and add a link to the stylesheet