File: md2html

package info (click to toggle)
backup2l 1.6-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 448 kB
  • sloc: sh: 3,194; makefile: 7
file content (20 lines) | stat: -rwxr-xr-x 366 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/sh

source=README.md
target=README.html
title="backup2l: README"


if test -x /usr/bin/pandoc
then

    pandoc -r markdown -w html \
        --title-prefix="XXTITELXX" \
        --email-obfuscation=references \
        --standalone   ${source}  |\
      sed "s#XXTITELXX...#${title}#" >${target}

    sleep 0.1
    echo "${source} converted to ${target}"

fi