Skip to content


Switch branches/tags

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

PREPRO - Markdown Preprocessors in Perl


The tools in this project, with a help of a Markdown-to-HTML converter, can produce an HTML file from a Markdown source text intermixed with specially-designed, value-added syntax.

You can author multi-language text, simple drawings, specify stylesheet classes, etc., using the syntax.


The preprocessing tools, written in perl, published here includes:

Tool File Description
File Loader Loads a local file or remote web content into the source file
Passage Selector Used for writing articles in more than one language at the same time in the same file
Style Marker Adds an HTML DIV element with a specified stylesheet class name
HereDoc Emulator Allows you to write a reference to an environment variable in the source
Simple SVG Chart Generator Embeds a small inline SVG chart using a simple text instruction
General-Purpose Parser Concatenates preprocessors with pipes


The preprocessors can be used with any type of source text files: plain text or many variety of wikitext formats.

Also there are many ways the tools can be used. A Markdown file can be converted to HTML on your local PC. The preprocessors can be incorporated in a web server such as Apache on a server so that conversion occurs automatically and dynamically.

Here I introduce local or command line configuration.

TODO: Update and publish again.

Local, command-line configuration

The preprocessors are written in Perl scripting language. It runs anywhere you can run a Perl program. The example below uses a Linux command line terminal.

The sample directory contains a sample prepro-marked markdown file and a shell script to run the preprocessors and pandoc command.

First set the PREPRO_AUTHOR environment variable so that it points to a directory you have placed the perl files:

$ export PREPRO_AUTHOR=~/author/prepro

To create a Markdown file with Japanese content ( from passage-marked source (

$ ./ --select ja < >

You need some tool to convert the resultant markdown file to produce a final representation format such as HTML or PDF.

Linux has some tools to do that: for example, Pandoc command can process a Github-flavoured Markdown file and generate HTML and other formats.

$ pandoc -f gfm -o sample-ja.html

You can concatenate some or all preprocessors together to let them process their own syntax using UNIX pipe:

$ ./ < | --select ja | ./ | ./ | pandoc -f gfm -o sample-ja.html

Additional Information

A brief introduction page describes what and how you can do with these tools:

See the documentation of the tools:

For a tool by tool syntax summary, see syntax.html (English).

For architecture and background behind the tools, see arch.html (English).


Copyright (c) 2020 Kobu.Com. Some Rights Reserved. Distributed under GNU General Public License 3.0. Contact Kobu.Com for other types of licenses.


2020-apr-08 first edition
2020-apr-20 second edition
2020-aug-31 changes in marker placement rules
2020-oct-08 third edition


Multi-Language Authoring and Publishing with Apache-only Web Site