MARKDOWN2SOCIAL.CONF(5)

NAME
markdown2social.conf - Configuration file for markdown2social

DESCRIPTION
The configuration file of markdown2social is an INI-like file composed of top-level sections and key/value pairs within each. The syntax of this file is defined by Python's ‘ConfigParser’ module.

  Section: replacements
The ‘replacements’ section contains a list of textual replacements to apply to the text (not the markup) of the Markdown post once it has been converted to the target format.

Each key/value pair in this section specifies a replacement. The key is meaningless but it has to be different for each entry; you might use it to provide a hint on what the replacement is about. The value follows the ‘regex -> subst’ structure where ‘regex’ is an extended regular expression that matches the text to be replaced, ‘subst’ is the replacement for the matched text, and the ‘ -> ’ four-character sequence is the magic separator between the two fields. It is common to use groups in the regular expression and backrefernces in the substitution text.

If you are wondering why the regular expression is not the key itself, it is because the keys in INI files are not case sensitive.

EXAMPLES
Automatically turn a bunch of bare identifiers into links:

    [replacements]
    ticket: (\A|\s)ticket #([0-9]+) -> \1http://bugs.example.com/\2
    pr: (\A|\s)pr/([0-9]+) -> \1http://bugs.example.com/\2

SEE ALSO
markdown2social(1)