From a40425ab08b0fc8f4b20e51280562feadf3a2f97 Mon Sep 17 00:00:00 2001 From: Oliver Buchtala Date: Thu, 6 Mar 2014 06:47:10 +0100 Subject: [PATCH] Remove pandoc toolchain. --- Doc/Manual/markdown_to_html.sh | 9 ------ Doc/Manual/pandoc_filter.py | 56 --------------------------------- Doc/Manual/pandoc_template.html | 10 ------ 3 files changed, 75 deletions(-) delete mode 100755 Doc/Manual/markdown_to_html.sh delete mode 100755 Doc/Manual/pandoc_filter.py delete mode 100644 Doc/Manual/pandoc_template.html diff --git a/Doc/Manual/markdown_to_html.sh b/Doc/Manual/markdown_to_html.sh deleted file mode 100755 index 925f62a64..000000000 --- a/Doc/Manual/markdown_to_html.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash - -if [ "$1" == "" ]; then - echo "Usage: markdown_to_html " - echo "-- Example: markdown_to_html Javascript" -else - pandoc -f markdown -t json $1.md | ./pandoc_filter.py | pandoc -f json -t html -s --template pandoc_template.html -o $1.html -fi - diff --git a/Doc/Manual/pandoc_filter.py b/Doc/Manual/pandoc_filter.py deleted file mode 100755 index 33ac3ffd6..000000000 --- a/Doc/Manual/pandoc_filter.py +++ /dev/null @@ -1,56 +0,0 @@ -#!/usr/bin/python - -""" -Pandoc filter that changes pandoc default HTML output for codeblocks -to match SWIG's format: - -
-
...
-
- -""" - -from pandocfilters import toJSONFilter, stringify, walk, RawBlock, Div, Str -import sys -import json -import re - -def html(x): - return RawBlock('html', x) - -SHELL = re.compile(r"\s*[$]") -the_title = "" - -def codeblocks(key, value, format, meta): - if key == 'CodeBlock': - [[id, classes, kvs], contents] = value - - newcontents = [html('
\n' + contents + '
')] - - if len(classes) == 0: - if contents.startswith("$"): - classes.append("shell") - else: - classes.append("code") - - return Div([id, classes, kvs], newcontents) - if key == 'Header': - if value[0] == 1: - the_title = stringify(value) - value[1][0] = "" - -def set_title(unMeta): - unMeta["title"] = {"t": "MetaInlines", "c": [Str(the_title)]} - -def __toJSONFilter(action): - doc = json.loads(sys.stdin.read()) - if len(sys.argv) > 1: - format = sys.argv[1] - else: - format = "" - altered = walk(doc, action, format, doc[0]['unMeta']) - set_title(altered[0]['unMeta']) - json.dump(altered, sys.stdout) - -if __name__ == "__main__": - __toJSONFilter(codeblocks) diff --git a/Doc/Manual/pandoc_template.html b/Doc/Manual/pandoc_template.html deleted file mode 100644 index d8cbc12ad..000000000 --- a/Doc/Manual/pandoc_template.html +++ /dev/null @@ -1,10 +0,0 @@ - - - - - $pagetitle$ - - -$body$ - -