/old/txt2tags-2.6.py
Python | 5987 lines | 5359 code | 249 blank | 379 comment | 250 complexity | 79cde3d3abf5bbc7e2598b375572527c MD5 | raw file
Possible License(s): GPL-2.0, GPL-3.0, WTFPL
Large files files are truncated, but you can click here to view the full file
- #!/usr/bin/env python
- # txt2tags - generic text conversion tool
- # http://txt2tags.org
- #
- # Copyright 2001-2010 Aurelio Jargas
- #
- # License: http://www.gnu.org/licenses/gpl-2.0.txt
- # Subversion: http://svn.txt2tags.org
- # Bug tracker: http://bugs.txt2tags.org
- #
- ########################################################################
- #
- # BORING CODE EXPLANATION AHEAD
- #
- # Just read it if you wish to understand how the txt2tags code works.
- #
- ########################################################################
- #
- # The code that [1] parses the marked text is separated from the
- # code that [2] insert the target tags.
- #
- # [1] made by: def convert()
- # [2] made by: class BlockMaster
- #
- # The structures of the marked text are identified and its contents are
- # extracted into a data holder (Python lists and dictionaries).
- #
- # When parsing the source file, the blocks (para, lists, quote, table)
- # are opened with BlockMaster, right when found. Then its contents,
- # which spans on several lines, are feeded into a special holder on the
- # BlockMaster instance. Just when the block is closed, the target tags
- # are inserted for the full block as a whole, in one pass. This way, we
- # have a better control on blocks. Much better than the previous line by
- # line approach.
- #
- # In other words, whenever inside a block, the parser *holds* the tag
- # insertion process, waiting until the full block is read. That was
- # needed primary to close paragraphs for the XHTML target, but
- # proved to be a very good adding, improving many other processing.
- #
- # -------------------------------------------------------------------
- #
- # These important classes are all documented:
- # CommandLine, SourceDocument, ConfigMaster, ConfigLines.
- #
- # There is a RAW Config format and all kind of configuration is first
- # converted to this format. Then a generic method parses it.
- #
- # These functions get information about the input file(s) and take
- # care of the init processing:
- # get_infiles_config(), process_source_file() and convert_this_files()
- #
- ########################################################################
- #XXX Python coding warning
- # Avoid common mistakes:
- # - do NOT use newlist=list instead newlist=list[:]
- # - do NOT use newdic=dic instead newdic=dic.copy()
- # - do NOT use dic[key] instead dic.get(key)
- # - do NOT use del dic[key] without has_key() before
- #XXX Smart Image Align don't work if the image is a link
- # Can't fix that because the image is expanded together with the
- # link, at the linkbank filling moment. Only the image is passed
- # to parse_images(), not the full line, so it is always 'middle'.
- #XXX Paragraph separation not valid inside Quote
- # Quote will not have <p></p> inside, instead will close and open
- # again the <blockquote>. This really sux in CSS, when defining a
- # different background color. Still don't know how to fix it.
- #XXX TODO (maybe)
- # New mark or macro which expands to an anchor full title.
- # It is necessary to parse the full document in this order:
- # DONE 1st scan: HEAD: get all settings, including %!includeconf
- # DONE 2nd scan: BODY: expand includes & apply %!preproc
- # 3rd scan: BODY: read titles and compose TOC info
- # 4th scan: BODY: full parsing, expanding [#anchor] 1st
- # Steps 2 and 3 can be made together, with no tag adding.
- # Two complete body scans will be *slow*, don't know if it worths.
- # One solution may be add the titles as postproc rules
- ##############################################################################
- # User config (1=ON, 0=OFF)
- USE_I18N = 1 # use gettext for i18ned messages? (default is 1)
- COLOR_DEBUG = 1 # show debug messages in colors? (default is 1)
- BG_LIGHT = 0 # your terminal background color is light (default is 0)
- HTML_LOWER = 0 # use lowercased HTML tags instead upper? (default is 0)
- ##############################################################################
- # These are all the core Python modules used by txt2tags (KISS!)
- import re, os, sys, time, getopt
- # The CSV module is new in Python version 2.3
- try:
- import csv
- except ImportError:
- csv = None
- # Program information
- my_url = 'http://txt2tags.org'
- my_name = 'txt2tags'
- my_email = 'verde@aurelio.net'
- my_version = '2.6'
- # i18n - just use if available
- if USE_I18N:
- try:
- import gettext
- # If your locale dir is different, change it here
- cat = gettext.Catalog('txt2tags',localedir='/usr/share/locale/')
- _ = cat.gettext
- except:
- _ = lambda x:x
- else:
- _ = lambda x:x
- # FLAGS : the conversion related flags , may be used in %!options
- # OPTIONS : the conversion related options, may be used in %!options
- # ACTIONS : the other behavior modifiers, valid on command line only
- # MACROS : the valid macros with their default values for formatting
- # SETTINGS: global miscellaneous settings, valid on RC file only
- # NO_TARGET: actions that don't require a target specification
- # NO_MULTI_INPUT: actions that don't accept more than one input file
- # CONFIG_KEYWORDS: the valid %!key:val keywords
- #
- # FLAGS and OPTIONS are configs that affect the converted document.
- # They usually have also a --no-<option> to turn them OFF.
- #
- # ACTIONS are needed because when doing multiple input files, strange
- # behavior would be found, as use command line interface for the
- # first file and gui for the second. There is no --no-<action>.
- # --version and --help inside %!options are also odd
- #
- TARGETS = 'html xhtml sgml dbk tex lout man mgp wiki gwiki doku pmw moin pm6 txt art adoc creole'.split()
- TARGETS.sort()
- FLAGS = {'headers' :1 , 'enum-title' :0 , 'mask-email' :0 ,
- 'toc-only' :0 , 'toc' :0 , 'rc' :1 ,
- 'css-sugar' :0 , 'css-suggar' :0 , 'css-inside' :0 ,
- 'quiet' :0 , 'slides' :0 }
- OPTIONS = {'target' :'', 'toc-level' :3 , 'style' :'',
- 'infile' :'', 'outfile' :'', 'encoding' :'',
- 'config-file':'', 'split' :0 , 'lang' :'',
- 'width' :0 , 'height' :0 , 'art-chars' :'',
- 'show-config-value':''}
- ACTIONS = {'help' :0 , 'version' :0 , 'gui' :0 ,
- 'verbose' :0 , 'debug' :0 , 'dump-config':0 ,
- 'dump-source':0 , 'targets' :0}
- MACROS = {'date' : '%Y%m%d', 'infile': '%f',
- 'mtime': '%Y%m%d', 'outfile': '%f'}
- SETTINGS = {} # for future use
- NO_TARGET = ['help', 'version', 'gui', 'toc-only', 'dump-config', 'dump-source', 'targets']
- NO_MULTI_INPUT = ['gui','dump-config','dump-source']
- CONFIG_KEYWORDS = [
- 'target', 'encoding', 'style', 'options', 'preproc','postproc',
- 'guicolors']
- TARGET_NAMES = {
- 'html' : _('HTML page'),
- 'xhtml' : _('XHTML page'),
- 'sgml' : _('SGML document'),
- 'dbk' : _('DocBook document'),
- 'tex' : _('LaTeX document'),
- 'lout' : _('Lout document'),
- 'man' : _('UNIX Manual page'),
- 'mgp' : _('MagicPoint presentation'),
- 'wiki' : _('Wikipedia page'),
- 'gwiki' : _('Google Wiki page'),
- 'doku' : _('DokuWiki page'),
- 'pmw' : _('PmWiki page'),
- 'moin' : _('MoinMoin page'),
- 'pm6' : _('PageMaker document'),
- 'txt' : _('Plain Text'),
- 'art' : _('ASCII Art text'),
- 'adoc' : _('AsciiDoc document'),
- 'creole' : _('Creole 1.0 document')
- }
- DEBUG = 0 # do not edit here, please use --debug
- VERBOSE = 0 # do not edit here, please use -v, -vv or -vvv
- QUIET = 0 # do not edit here, please use --quiet
- GUI = 0 # do not edit here, please use --gui
- AUTOTOC = 1 # do not edit here, please use --no-toc or %%toc
- DFT_TEXT_WIDTH = 72 # do not edit here, please use --width
- DFT_SLIDE_WIDTH = 80 # do not edit here, please use --width
- DFT_SLIDE_HEIGHT = 25 # do not edit here, please use --height
- # ASCII Art config
- AA_KEYS = 'corner border side bar1 bar2 level2 level3 level4 level5'.split()
- AA_VALUES = '+-|-==-^"' # do not edit here, please use --art-chars
- AA = dict(zip(AA_KEYS, AA_VALUES))
- AA_COUNT = 0
- AA_TITLE = ''
- RC_RAW = []
- CMDLINE_RAW = []
- CONF = {}
- BLOCK = None
- TITLE = None
- regex = {}
- TAGS = {}
- rules = {}
- # Gui globals
- askopenfilename = None
- showinfo = None
- showwarning = None
- showerror = None
- lang = 'english'
- TARGET = ''
- STDIN = STDOUT = '-'
- MODULEIN = MODULEOUT = '-module-'
- ESCCHAR = '\x00'
- SEPARATOR = '\x01'
- LISTNAMES = {'-':'list', '+':'numlist', ':':'deflist'}
- LINEBREAK = {'default':'\n', 'win':'\r\n', 'mac':'\r'}
- # Platform specific settings
- LB = LINEBREAK.get(sys.platform[:3]) or LINEBREAK['default']
- VERSIONSTR = _("%s version %s <%s>")%(my_name,my_version,my_url)
- USAGE = '\n'.join([
- '',
- _("Usage: %s [OPTIONS] [infile.t2t ...]") % my_name,
- '',
- _(" --targets print a list of all the available targets and exit"),
- _(" -t, --target=TYPE set target document type. currently supported:"),
- ' %s,' % ', '.join(TARGETS[:9]),
- ' %s' % ', '.join(TARGETS[9:]),
- _(" -i, --infile=FILE set FILE as the input file name ('-' for STDIN)"),
- _(" -o, --outfile=FILE set FILE as the output file name ('-' for STDOUT)"),
- _(" --encoding=ENC set target file encoding (utf-8, iso-8859-1, etc)"),
- _(" --toc add an automatic Table of Contents to the output"),
- _(" --toc-level=N set maximum TOC level (depth) to N"),
- _(" --toc-only print the Table of Contents and exit"),
- _(" -n, --enum-title enumerate all titles as 1, 1.1, 1.1.1, etc"),
- _(" --style=FILE use FILE as the document style (like HTML CSS)"),
- _(" --css-sugar insert CSS-friendly tags for HTML/XHTML"),
- _(" --css-inside insert CSS file contents inside HTML/XHTML headers"),
- _(" -H, --no-headers suppress header and footer from the output"),
- _(" --mask-email hide email from spam robots. x@y.z turns <x (a) y z>"),
- _(" --slides format output as presentation slides (used by -t art)"),
- _(" --width=N set the output's width to N columns (used by -t art)"),
- _(" --height=N set the output's height to N rows (used by -t art)"),
- _(" -C, --config-file=F read configuration from file F"),
- _(" --gui invoke Graphical Tk Interface"),
- _(" -q, --quiet quiet mode, suppress all output (except errors)"),
- _(" -v, --verbose print informative messages during conversion"),
- _(" -h, --help print this help information and exit"),
- _(" -V, --version print program version and exit"),
- _(" --dump-config print all the configuration found and exit"),
- _(" --dump-source print the document source, with includes expanded"),
- '',
- _("Turn OFF options:"),
- " --no-css-inside, --no-css-sugar, --no-dump-config, --no-dump-source,",
- " --no-encoding, --no-enum-title, --no-headers, --no-infile,",
- " --no-mask-email, --no-outfile, --no-quiet, --no-rc, --no-slides,",
- " --no-style, --no-targets, --no-toc, --no-toc-only",
- '',
- _("Example:"),
- " %s -t html --toc %s" % (my_name, _("file.t2t")),
- '',
- _("By default, converted output is saved to 'infile.<target>'."),
- _("Use --outfile to force an output file name."),
- _("If input file is '-', reads from STDIN."),
- _("If output file is '-', dumps output to STDOUT."),
- '',
- my_url,
- ''
- ])
- ##############################################################################
- # Here is all the target's templates
- # You may edit them to fit your needs
- # - the %(HEADERn)s strings represent the Header lines
- # - the %(STYLE)s string is changed by --style contents
- # - the %(ENCODING)s string is changed by --encoding contents
- # - if any of the above is empty, the full line is removed
- # - use %% to represent a literal %
- #
- HEADER_TEMPLATE = {
- 'art':"""
- Fake template to respect the general process.
- """,
- 'txt': """\
- %(HEADER1)s
- %(HEADER2)s
- %(HEADER3)s
- """,
- 'sgml': """\
- <!doctype linuxdoc system>
- <article>
- <title>%(HEADER1)s
- <author>%(HEADER2)s
- <date>%(HEADER3)s
- """,
- 'html': """\
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
- <HTML>
- <HEAD>
- <META NAME="generator" CONTENT="http://txt2tags.org">
- <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=%(ENCODING)s">
- <LINK REL="stylesheet" TYPE="text/css" HREF="%(STYLE)s">
- <TITLE>%(HEADER1)s</TITLE>
- </HEAD><BODY BGCOLOR="white" TEXT="black">
- <CENTER>
- <H1>%(HEADER1)s</H1>
- <FONT SIZE="4"><I>%(HEADER2)s</I></FONT><BR>
- <FONT SIZE="4">%(HEADER3)s</FONT>
- </CENTER>
- """,
- 'htmlcss': """\
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
- <HTML>
- <HEAD>
- <META NAME="generator" CONTENT="http://txt2tags.org">
- <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=%(ENCODING)s">
- <LINK REL="stylesheet" TYPE="text/css" HREF="%(STYLE)s">
- <TITLE>%(HEADER1)s</TITLE>
- </HEAD>
- <BODY>
- <DIV CLASS="header" ID="header">
- <H1>%(HEADER1)s</H1>
- <H2>%(HEADER2)s</H2>
- <H3>%(HEADER3)s</H3>
- </DIV>
- """,
- 'xhtml': """\
- <?xml version="1.0"
- encoding="%(ENCODING)s"
- ?>
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"\
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <title>%(HEADER1)s</title>
- <meta name="generator" content="http://txt2tags.org" />
- <link rel="stylesheet" type="text/css" href="%(STYLE)s" />
- </head>
- <body bgcolor="white" text="black">
- <div align="center">
- <h1>%(HEADER1)s</h1>
- <h2>%(HEADER2)s</h2>
- <h3>%(HEADER3)s</h3>
- </div>
- """,
- 'xhtmlcss': """\
- <?xml version="1.0"
- encoding="%(ENCODING)s"
- ?>
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"\
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <title>%(HEADER1)s</title>
- <meta name="generator" content="http://txt2tags.org" />
- <link rel="stylesheet" type="text/css" href="%(STYLE)s" />
- </head>
- <body>
- <div class="header" id="header">
- <h1>%(HEADER1)s</h1>
- <h2>%(HEADER2)s</h2>
- <h3>%(HEADER3)s</h3>
- </div>
- """,
- 'dbk': """\
- <?xml version="1.0"
- encoding="%(ENCODING)s"
- ?>
- <!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"\
- "docbook/dtd/xml/4.5/docbookx.dtd">
- <article lang="en">
- <articleinfo>
- <title>%(HEADER1)s</title>
- <authorgroup>
- <author><othername>%(HEADER2)s</othername></author>
- </authorgroup>
- <date>%(HEADER3)s</date>
- </articleinfo>
- """,
- 'man': """\
- .TH "%(HEADER1)s" 1 "%(HEADER3)s" "%(HEADER2)s"
- """,
- # TODO style to <HR>
- 'pm6': """\
- <PMTags1.0 win><C-COLORTABLE ("Preto" 1 0 0 0)
- ><@Normal=
- <FONT "Times New Roman"><CCOLOR "Preto"><SIZE 11>
- <HORIZONTAL 100><LETTERSPACE 0><CTRACK 127><CSSIZE 70><C+SIZE 58.3>
- <C-POSITION 33.3><C+POSITION 33.3><P><CBASELINE 0><CNOBREAK 0><CLEADING -0.05>
- <GGRID 0><GLEFT 7.2><GRIGHT 0><GFIRST 0><G+BEFORE 7.2><G+AFTER 0>
- <GALIGNMENT "justify"><GMETHOD "proportional"><G& "ENGLISH">
- <GPAIRS 12><G%% 120><GKNEXT 0><GKWIDOW 0><GKORPHAN 0><GTABS $>
- <GHYPHENATION 2 34 0><GWORDSPACE 75 100 150><GSPACE -5 0 25>
- ><@Bullet=<@-PARENT "Normal"><FONT "Abadi MT Condensed Light">
- <GLEFT 14.4><G+BEFORE 2.15><G%% 110><GTABS(25.2 l "")>
- ><@PreFormat=<@-PARENT "Normal"><FONT "Lucida Console"><SIZE 8><CTRACK 0>
- <GLEFT 0><G+BEFORE 0><GALIGNMENT "left"><GWORDSPACE 100 100 100><GSPACE 0 0 0>
- ><@Title1=<@-PARENT "Normal"><FONT "Arial"><SIZE 14><B>
- <GCONTENTS><GLEFT 0><G+BEFORE 0><GALIGNMENT "left">
- ><@Title2=<@-PARENT "Title1"><SIZE 12><G+BEFORE 3.6>
- ><@Title3=<@-PARENT "Title1"><SIZE 10><GLEFT 7.2><G+BEFORE 7.2>
- ><@Title4=<@-PARENT "Title3">
- ><@Title5=<@-PARENT "Title3">
- ><@Quote=<@-PARENT "Normal"><SIZE 10><I>>
- %(HEADER1)s
- %(HEADER2)s
- %(HEADER3)s
- """,
- 'mgp': """\
- #!/usr/X11R6/bin/mgp -t 90
- %%deffont "normal" xfont "utopia-medium-r", charset "iso8859-1"
- %%deffont "normal-i" xfont "utopia-medium-i", charset "iso8859-1"
- %%deffont "normal-b" xfont "utopia-bold-r" , charset "iso8859-1"
- %%deffont "normal-bi" xfont "utopia-bold-i" , charset "iso8859-1"
- %%deffont "mono" xfont "courier-medium-r", charset "iso8859-1"
- %%default 1 size 5
- %%default 2 size 8, fore "yellow", font "normal-b", center
- %%default 3 size 5, fore "white", font "normal", left, prefix " "
- %%tab 1 size 4, vgap 30, prefix " ", icon arc "red" 40, leftfill
- %%tab 2 prefix " ", icon arc "orange" 40, leftfill
- %%tab 3 prefix " ", icon arc "brown" 40, leftfill
- %%tab 4 prefix " ", icon arc "darkmagenta" 40, leftfill
- %%tab 5 prefix " ", icon arc "magenta" 40, leftfill
- %%%%------------------------- end of headers -----------------------------
- %%page
- %%size 10, center, fore "yellow"
- %(HEADER1)s
- %%font "normal-i", size 6, fore "white", center
- %(HEADER2)s
- %%font "mono", size 7, center
- %(HEADER3)s
- """,
- 'moin': """\
- '''%(HEADER1)s'''
- ''%(HEADER2)s''
- %(HEADER3)s
- """,
- 'gwiki': """\
- *%(HEADER1)s*
- %(HEADER2)s
- _%(HEADER3)s_
- """,
- 'adoc': """\
- = %(HEADER1)s
- %(HEADER2)s
- %(HEADER3)s
- """,
- 'doku': """\
- ===== %(HEADER1)s =====
- **//%(HEADER2)s//**
- //%(HEADER3)s//
- """,
- 'pmw': """\
- (:Title %(HEADER1)s:)
- (:Description %(HEADER2)s:)
- (:Summary %(HEADER3)s:)
- """,
- 'wiki': """\
- '''%(HEADER1)s'''
- %(HEADER2)s
- ''%(HEADER3)s''
- """,
- 'tex': \
- r"""\documentclass{article}
- \usepackage{graphicx}
- \usepackage{paralist} %% needed for compact lists
- \usepackage[normalem]{ulem} %% needed by strike
- \usepackage[urlcolor=blue,colorlinks=true]{hyperref}
- \usepackage[%(ENCODING)s]{inputenc} %% char encoding
- \usepackage{%(STYLE)s} %% user defined
- \title{%(HEADER1)s}
- \author{%(HEADER2)s}
- \begin{document}
- \date{%(HEADER3)s}
- \maketitle
- \clearpage
- """,
- 'lout': """\
- @SysInclude { doc }
- @Document
- @InitialFont { Times Base 12p } # Times, Courier, Helvetica, ...
- @PageOrientation { Portrait } # Portrait, Landscape
- @ColumnNumber { 1 } # Number of columns (2, 3, ...)
- @PageHeaders { Simple } # None, Simple, Titles, NoTitles
- @InitialLanguage { English } # German, French, Portuguese, ...
- @OptimizePages { Yes } # Yes/No smart page break feature
- //
- @Text @Begin
- @Display @Heading { %(HEADER1)s }
- @Display @I { %(HEADER2)s }
- @Display { %(HEADER3)s }
- #@NP # Break page after Headers
- """,
- 'creole': """\
- %(HEADER1)s
- %(HEADER2)s
- %(HEADER3)s
- """
- # @SysInclude { tbl } # Tables support
- # setup: @MakeContents { Yes } # show TOC
- # setup: @SectionGap # break page at each section
- }
- ##############################################################################
- def getTags(config):
- "Returns all the known tags for the specified target"
-
- keys = """
- title1 numtitle1
- title2 numtitle2
- title3 numtitle3
- title4 numtitle4
- title5 numtitle5
- title1Open title1Close
- title2Open title2Close
- title3Open title3Close
- title4Open title4Close
- title5Open title5Close
- blocktitle1Open blocktitle1Close
- blocktitle2Open blocktitle2Close
- blocktitle3Open blocktitle3Close
- paragraphOpen paragraphClose
- blockVerbOpen blockVerbClose
- blockQuoteOpen blockQuoteClose blockQuoteLine
- blockCommentOpen blockCommentClose
- fontMonoOpen fontMonoClose
- fontBoldOpen fontBoldClose
- fontItalicOpen fontItalicClose
- fontUnderlineOpen fontUnderlineClose
- fontStrikeOpen fontStrikeClose
- listOpen listClose
- listOpenCompact listCloseCompact
- listItemOpen listItemClose listItemLine
- numlistOpen numlistClose
- numlistOpenCompact numlistCloseCompact
- numlistItemOpen numlistItemClose numlistItemLine
- deflistOpen deflistClose
- deflistOpenCompact deflistCloseCompact
- deflistItem1Open deflistItem1Close
- deflistItem2Open deflistItem2Close deflistItem2LinePrefix
- bar1 bar2
- url urlMark
- email emailMark
- img imgAlignLeft imgAlignRight imgAlignCenter
- _imgAlignLeft _imgAlignRight _imgAlignCenter
- tableOpen tableClose
- _tableBorder _tableAlignLeft _tableAlignCenter
- tableRowOpen tableRowClose tableRowSep
- tableTitleRowOpen tableTitleRowClose
- tableCellOpen tableCellClose tableCellSep
- tableTitleCellOpen tableTitleCellClose tableTitleCellSep
- _tableColAlignLeft _tableColAlignRight _tableColAlignCenter
- _tableCellAlignLeft _tableCellAlignRight _tableCellAlignCenter
- _tableCellColSpan tableColAlignSep
- _tableCellMulticolOpen
- _tableCellMulticolClose
- bodyOpen bodyClose
- cssOpen cssClose
- tocOpen tocClose TOC
- anchor
- comment
- pageBreak
- EOD
- """.split()
-
- # TIP: \a represents the current text inside the mark
- # TIP: ~A~, ~B~ and ~C~ are expanded to other tags parts
-
- alltags = {
-
- 'art': {
- 'title1' : '\a' ,
- 'title2' : '\a' ,
- 'title3' : '\a' ,
- 'title4' : '\a' ,
- 'title5' : '\a' ,
- 'blockQuoteLine' : '\t' ,
- 'listItemOpen' : '- ' ,
- 'numlistItemOpen' : '\a. ' ,
- 'bar1' : aa_line(AA['bar1'], config['width']),
- 'bar2' : aa_line(AA['bar2'], config['width']),
- 'url' : '\a' ,
- 'urlMark' : '\a (\a)' ,
- 'email' : '\a' ,
- 'emailMark' : '\a (\a)' ,
- 'img' : '[\a]' ,
- },
-
- 'txt': {
- 'title1' : ' \a' ,
- 'title2' : '\t\a' ,
- 'title3' : '\t\t\a' ,
- 'title4' : '\t\t\t\a' ,
- 'title5' : '\t\t\t\t\a',
- 'blockQuoteLine' : '\t' ,
- 'listItemOpen' : '- ' ,
- 'numlistItemOpen' : '\a. ' ,
- 'bar1' : '\a' ,
- 'url' : '\a' ,
- 'urlMark' : '\a (\a)' ,
- 'email' : '\a' ,
- 'emailMark' : '\a (\a)' ,
- 'img' : '[\a]' ,
- },
-
- 'html': {
- 'paragraphOpen' : '<P>' ,
- 'paragraphClose' : '</P>' ,
- 'title1' : '~A~<H1>\a</H1>' ,
- 'title2' : '~A~<H2>\a</H2>' ,
- 'title3' : '~A~<H3>\a</H3>' ,
- 'title4' : '~A~<H4>\a</H4>' ,
- 'title5' : '~A~<H5>\a</H5>' ,
- 'anchor' : '<A NAME="\a"></A>\n',
- 'blockVerbOpen' : '<PRE>' ,
- 'blockVerbClose' : '</PRE>' ,
- 'blockQuoteOpen' : '<BLOCKQUOTE>' ,
- 'blockQuoteClose' : '</BLOCKQUOTE>' ,
- 'fontMonoOpen' : '<CODE>' ,
- 'fontMonoClose' : '</CODE>' ,
- 'fontBoldOpen' : '<B>' ,
- 'fontBoldClose' : '</B>' ,
- 'fontItalicOpen' : '<I>' ,
- 'fontItalicClose' : '</I>' ,
- 'fontUnderlineOpen' : '<U>' ,
- 'fontUnderlineClose' : '</U>' ,
- 'fontStrikeOpen' : '<S>' ,
- 'fontStrikeClose' : '</S>' ,
- 'listOpen' : '<UL>' ,
- 'listClose' : '</UL>' ,
- 'listItemOpen' : '<LI>' ,
- 'numlistOpen' : '<OL>' ,
- 'numlistClose' : '</OL>' ,
- 'numlistItemOpen' : '<LI>' ,
- 'deflistOpen' : '<DL>' ,
- 'deflistClose' : '</DL>' ,
- 'deflistItem1Open' : '<DT>' ,
- 'deflistItem1Close' : '</DT>' ,
- 'deflistItem2Open' : '<DD>' ,
- 'bar1' : '<HR NOSHADE SIZE=1>' ,
- 'bar2' : '<HR NOSHADE SIZE=5>' ,
- 'url' : '<A HREF="\a">\a</A>' ,
- 'urlMark' : '<A HREF="\a">\a</A>' ,
- 'email' : '<A HREF="mailto:\a">\a</A>' ,
- 'emailMark' : '<A HREF="mailto:\a">\a</A>' ,
- 'img' : '<IMG~A~ SRC="\a" BORDER="0" ALT="">',
- '_imgAlignLeft' : ' ALIGN="left"' ,
- '_imgAlignCenter' : ' ALIGN="middle"',
- '_imgAlignRight' : ' ALIGN="right"' ,
- 'tableOpen' : '<TABLE~A~~B~ CELLPADDING="4">',
- 'tableClose' : '</TABLE>' ,
- 'tableRowOpen' : '<TR>' ,
- 'tableRowClose' : '</TR>' ,
- 'tableCellOpen' : '<TD~A~~S~>' ,
- 'tableCellClose' : '</TD>' ,
- 'tableTitleCellOpen' : '<TH~S~>' ,
- 'tableTitleCellClose' : '</TH>' ,
- '_tableBorder' : ' BORDER="1"' ,
- '_tableAlignCenter' : ' ALIGN="center"',
- '_tableCellAlignRight' : ' ALIGN="right"' ,
- '_tableCellAlignCenter': ' ALIGN="center"',
- '_tableCellColSpan' : ' COLSPAN="\a"' ,
- 'cssOpen' : '<STYLE TYPE="text/css">',
- 'cssClose' : '</STYLE>' ,
- 'comment' : '<!-- \a -->' ,
- 'EOD' : '</BODY></HTML>'
- },
-
- #TIP xhtml inherits all HTML definitions (lowercased)
- #TIP http://www.w3.org/TR/xhtml1/#guidelines
- #TIP http://www.htmlref.com/samples/Chapt17/17_08.htm
- 'xhtml': {
- 'listItemClose' : '</li>' ,
- 'numlistItemClose' : '</li>' ,
- 'deflistItem2Close' : '</dd>' ,
- 'bar1' : '<hr class="light" />',
- 'bar2' : '<hr class="heavy" />',
- 'anchor' : '<a id="\a" name="\a"></a>\n',
- 'img' : '<img~A~ src="\a" border="0" alt=""/>',
- },
-
- 'sgml': {
- 'paragraphOpen' : '<p>' ,
- 'title1' : '<sect>\a~A~<p>' ,
- 'title2' : '<sect1>\a~A~<p>' ,
- 'title3' : '<sect2>\a~A~<p>' ,
- 'title4' : '<sect3>\a~A~<p>' ,
- 'title5' : '<sect4>\a~A~<p>' ,
- 'anchor' : '<label id="\a">' ,
- 'blockVerbOpen' : '<tscreen><verb>' ,
- 'blockVerbClose' : '</verb></tscreen>' ,
- 'blockQuoteOpen' : '<quote>' ,
- 'blockQuoteClose' : '</quote>' ,
- 'fontMonoOpen' : '<tt>' ,
- 'fontMonoClose' : '</tt>' ,
- 'fontBoldOpen' : '<bf>' ,
- 'fontBoldClose' : '</bf>' ,
- 'fontItalicOpen' : '<em>' ,
- 'fontItalicClose' : '</em>' ,
- 'fontUnderlineOpen' : '<bf><em>' ,
- 'fontUnderlineClose' : '</em></bf>' ,
- 'listOpen' : '<itemize>' ,
- 'listClose' : '</itemize>' ,
- 'listItemOpen' : '<item>' ,
- 'numlistOpen' : '<enum>' ,
- 'numlistClose' : '</enum>' ,
- 'numlistItemOpen' : '<item>' ,
- 'deflistOpen' : '<descrip>' ,
- 'deflistClose' : '</descrip>' ,
- 'deflistItem1Open' : '<tag>' ,
- 'deflistItem1Close' : '</tag>' ,
- 'bar1' : '<!-- \a -->' ,
- 'url' : '<htmlurl url="\a" name="\a">' ,
- 'urlMark' : '<htmlurl url="\a" name="\a">' ,
- 'email' : '<htmlurl url="mailto:\a" name="\a">' ,
- 'emailMark' : '<htmlurl url="mailto:\a" name="\a">' ,
- 'img' : '<figure><ph vspace=""><img src="\a"></figure>',
- 'tableOpen' : '<table><tabular ca="~C~">' ,
- 'tableClose' : '</tabular></table>' ,
- 'tableRowSep' : '<rowsep>' ,
- 'tableCellSep' : '<colsep>' ,
- '_tableColAlignLeft' : 'l' ,
- '_tableColAlignRight' : 'r' ,
- '_tableColAlignCenter' : 'c' ,
- 'comment' : '<!-- \a -->' ,
- 'TOC' : '<toc>' ,
- 'EOD' : '</article>'
- },
-
- 'dbk': {
- 'paragraphOpen' : '<para>' ,
- 'paragraphClose' : '</para>' ,
- 'title1Open' : '~A~<sect1><title>\a</title>' ,
- 'title1Close' : '</sect1>' ,
- 'title2Open' : '~A~ <sect2><title>\a</title>' ,
- 'title2Close' : ' </sect2>' ,
- 'title3Open' : '~A~ <sect3><title>\a</title>' ,
- 'title3Close' : ' </sect3>' ,
- 'title4Open' : '~A~ <sect4><title>\a</title>' ,
- 'title4Close' : ' </sect4>' ,
- 'title5Open' : '~A~ <sect5><title>\a</title>',
- 'title5Close' : ' </sect5>' ,
- 'anchor' : '<anchor id="\a"/>\n' ,
- 'blockVerbOpen' : '<programlisting>' ,
- 'blockVerbClose' : '</programlisting>' ,
- 'blockQuoteOpen' : '<blockquote><para>' ,
- 'blockQuoteClose' : '</para></blockquote>' ,
- 'fontMonoOpen' : '<code>' ,
- 'fontMonoClose' : '</code>' ,
- 'fontBoldOpen' : '<emphasis role="bold">' ,
- 'fontBoldClose' : '</emphasis>' ,
- 'fontItalicOpen' : '<emphasis>' ,
- 'fontItalicClose' : '</emphasis>' ,
- 'fontUnderlineOpen' : '<emphasis role="underline">' ,
- 'fontUnderlineClose' : '</emphasis>' ,
- # 'fontStrikeOpen' : '<emphasis role="strikethrough">' , # Don't know
- # 'fontStrikeClose' : '</emphasis>' ,
- 'listOpen' : '<itemizedlist>' ,
- 'listClose' : '</itemizedlist>' ,
- 'listItemOpen' : '<listitem><para>' ,
- 'listItemClose' : '</para></listitem>' ,
- 'numlistOpen' : '<orderedlist numeration="arabic">' ,
- 'numlistClose' : '</orderedlist>' ,
- 'numlistItemOpen' : '<listitem><para>' ,
- 'numlistItemClose' : '</para></listitem>' ,
- 'deflistOpen' : '<variablelist>' ,
- 'deflistClose' : '</variablelist>' ,
- 'deflistItem1Open' : '<varlistentry><term>' ,
- 'deflistItem1Close' : '</term>' ,
- 'deflistItem2Open' : '<listitem><para>' ,
- 'deflistItem2Close' : '</para></listitem></varlistentry>' ,
- # 'bar1' : '<>' , # Don't know
- # 'bar2' : '<>' , # Don't know
- 'url' : '<ulink url="\a">\a</ulink>' ,
- 'urlMark' : '<ulink url="\a">\a</ulink>' ,
- 'email' : '<email>\a</email>' ,
- 'emailMark' : '<email>\a</email>' ,
- 'img' : '<mediaobject><imageobject><imagedata fileref="\a"/></imageobject></mediaobject>',
- # '_imgAlignLeft' : '' , # Don't know
- # '_imgAlignCenter' : '' , # Don't know
- # '_imgAlignRight' : '' , # Don't know
- # 'tableOpen' : '<informaltable><tgroup cols=""><tbody>', # Don't work, need to know number of cols
- # 'tableClose' : '</tbody></tgroup></informaltable>' ,
- # 'tableRowOpen' : '<row>' ,
- # 'tableRowClose' : '</row>' ,
- # 'tableCellOpen' : '<entry>' ,
- # 'tableCellClose' : '</entry>' ,
- # 'tableTitleRowOpen' : '<thead>' ,
- # 'tableTitleRowClose' : '</thead>' ,
- # '_tableBorder' : ' frame="all"' ,
- # '_tableAlignCenter' : ' align="center"' ,
- # '_tableCellAlignRight' : ' align="right"' ,
- # '_tableCellAlignCenter': ' align="center"' ,
- # '_tableCellColSpan' : ' COLSPAN="\a"' ,
- 'TOC' : '<index/>' ,
- 'comment' : '<!-- \a -->' ,
- 'EOD' : '</article>'
- },
-
- 'tex': {
- 'title1' : '~A~\section*{\a}' ,
- 'title2' : '~A~\\subsection*{\a}' ,
- 'title3' : '~A~\\subsubsection*{\a}',
- # title 4/5: DIRTY: para+BF+\\+\n
- 'title4' : '~A~\\paragraph{}\\textbf{\a}\\\\\n',
- 'title5' : '~A~\\paragraph{}\\textbf{\a}\\\\\n',
- 'numtitle1' : '\n~A~\section{\a}' ,
- 'numtitle2' : '~A~\\subsection{\a}' ,
- 'numtitle3' : '~A~\\subsubsection{\a}' ,
- 'anchor' : '\\hypertarget{\a}{}\n' ,
- 'blockVerbOpen' : '\\begin{verbatim}' ,
- 'blockVerbClose' : '\\end{verbatim}' ,
- 'blockQuoteOpen' : '\\begin{quotation}' ,
- 'blockQuoteClose' : '\\end{quotation}' ,
- 'fontMonoOpen' : '\\texttt{' ,
- 'fontMonoClose' : '}' ,
- 'fontBoldOpen' : '\\textbf{' ,
- 'fontBoldClose' : '}' ,
- 'fontItalicOpen' : '\\textit{' ,
- 'fontItalicClose' : '}' ,
- 'fontUnderlineOpen' : '\\underline{' ,
- 'fontUnderlineClose' : '}' ,
- 'fontStrikeOpen' : '\\sout{' ,
- 'fontStrikeClose' : '}' ,
- 'listOpen' : '\\begin{itemize}' ,
- 'listClose' : '\\end{itemize}' ,
- 'listOpenCompact' : '\\begin{compactitem}',
- 'listCloseCompact' : '\\end{compactitem}' ,
- 'listItemOpen' : '\\item ' ,
- 'numlistOpen' : '\\begin{enumerate}' ,
- 'numlistClose' : '\\end{enumerate}' ,
- 'numlistOpenCompact' : '\\begin{compactenum}',
- 'numlistCloseCompact' : '\\end{compactenum}' ,
- 'numlistItemOpen' : '\\item ' ,
- 'deflistOpen' : '\\begin{description}',
- 'deflistClose' : '\\end{description}' ,
- 'deflistOpenCompact' : '\\begin{compactdesc}',
- 'deflistCloseCompact' : '\\end{compactdesc}' ,
- 'deflistItem1Open' : '\\item[' ,
- 'deflistItem1Close' : ']' ,
- 'bar1' : '\\hrulefill{}' ,
- 'bar2' : '\\rule{\linewidth}{1mm}',
- 'url' : '\\htmladdnormallink{\a}{\a}',
- 'urlMark' : '\\htmladdnormallink{\a}{\a}',
- 'email' : '\\htmladdnormallink{\a}{mailto:\a}',
- 'emailMark' : '\\htmladdnormallink{\a}{mailto:\a}',
- 'img' : '\\includegraphics{\a}',
- 'tableOpen' : '\\begin{center}\\begin{tabular}{|~C~|}',
- 'tableClose' : '\\end{tabular}\\end{center}',
- 'tableRowOpen' : '\\hline ' ,
- 'tableRowClose' : ' \\\\' ,
- 'tableCellSep' : ' & ' ,
- '_tableColAlignLeft' : 'l' ,
- '_tableColAlignRight' : 'r' ,
- '_tableColAlignCenter' : 'c' ,
- '_tableCellAlignLeft' : 'l' ,
- '_tableCellAlignRight' : 'r' ,
- '_tableCellAlignCenter': 'c' ,
- '_tableCellColSpan' : '\a' ,
- '_tableCellMulticolOpen' : '\\multicolumn{\a}{|~C~|}{',
- '_tableCellMulticolClose' : '}',
- 'tableColAlignSep' : '|' ,
- 'comment' : '% \a' ,
- 'TOC' : '\\tableofcontents',
- 'pageBreak' : '\\clearpage',
- 'EOD' : '\\end{document}'
- },
-
- 'lout': {
- 'paragraphOpen' : '@LP' ,
- 'blockTitle1Open' : '@BeginSections' ,
- 'blockTitle1Close' : '@EndSections' ,
- 'blockTitle2Open' : ' @BeginSubSections' ,
- 'blockTitle2Close' : ' @EndSubSections' ,
- 'blockTitle3Open' : ' @BeginSubSubSections' ,
- 'blockTitle3Close' : ' @EndSubSubSections' ,
- 'title1Open' : '~A~@Section @Title { \a } @Begin',
- 'title1Close' : '@End @Section' ,
- 'title2Open' : '~A~ @SubSection @Title { \a } @Begin',
- 'title2Close' : ' @End @SubSection' ,
- 'title3Open' : '~A~ @SubSubSection @Title { \a } @Begin',
- 'title3Close' : ' @End @SubSubSection' ,
- 'title4Open' : '~A~@LP @LeftDisplay @B { \a }',
- 'title5Open' : '~A~@LP @LeftDisplay @B { \a }',
- 'anchor' : '@Tag { \a }\n' ,
- 'blockVerbOpen' : '@LP @ID @F @RawVerbatim @Begin',
- 'blockVerbClose' : '@End @RawVerbatim' ,
- 'blockQuoteOpen' : '@QD {' ,
- 'blockQuoteClose' : '}' ,
- # enclosed inside {} to deal with joined**words**
- 'fontMonoOpen' : '{@F {' ,
- 'fontMonoClose' : '}}' ,
- 'fontBoldOpen' : '{@B {' ,
- 'fontBoldClose' : '}}' ,
- 'fontItalicOpen' : '{@II {' ,
- 'fontItalicClose' : '}}' ,
- 'fontUnderlineOpen' : '{@Underline{' ,
- 'fontUnderlineClose' : '}}' ,
- # the full form is more readable, but could be BL EL LI NL TL DTI
- 'listOpen' : '@BulletList' ,
- 'listClose' : '@EndList' ,
- 'listItemOpen' : '@ListItem{' ,
- 'listItemClose' : '}' ,
- 'numlistOpen' : '@NumberedList' ,
- 'numlistClose' : '@EndList' ,
- 'numlistItemOpen' : '@ListItem{' ,
- 'numlistItemClose' : '}' ,
- 'deflistOpen' : '@TaggedList' ,
- 'deflistClose' : '@EndList' ,
- 'deflistItem1Open' : '@DropTagItem {' ,
- 'deflistItem1Close' : '}' ,
- 'deflistItem2Open' : '{' ,
- 'deflistItem2Close' : '}' ,
- 'bar1' : '@DP @FullWidthRule' ,
- 'url' : '{blue @Colour { \a }}' ,
- 'urlMark' : '\a ({blue @Colour { \a }})' ,
- 'email' : '{blue @Colour { \a }}' ,
- 'emailMark' : '\a ({blue Colour{ \a }})' ,
- 'img' : '~A~@IncludeGraphic { \a }' , # eps only!
- '_imgAlignLeft' : '@LeftDisplay ' ,
- '_imgAlignRight' : '@RightDisplay ' ,
- '_imgAlignCenter' : '@CentredDisplay ' ,
- # lout tables are *way* complicated, no support for now
- #'tableOpen' : '~A~@Tbl~B~\naformat{ @Cell A | @Cell B } {',
- #'tableClose' : '}' ,
- #'tableRowOpen' : '@Rowa\n' ,
- #'tableTitleRowOpen' : '@HeaderRowa' ,
- #'tableCenterAlign' : '@CentredDisplay ' ,
- #'tableCellOpen' : '\a {' , # A, B, ...
- #'tableCellClose' : '}' ,
- #'_tableBorder' : '\nrule {yes}' ,
- 'comment' : '# \a' ,
- # @MakeContents must be on the config file
- 'TOC' : '@DP @ContentsGoesHere @DP',
- 'pageBreak' : '@NP' ,
- 'EOD' : '@End @Text'
- },
-
- # http://moinmo.in/SyntaxReference
- 'moin': {
- 'title1' : '= \a =' ,
- 'title2' : '== \a ==' ,
- 'title3' : '=== \a ===' ,
- 'title4' : '==== \a ====' ,
- 'title5' : '===== \a =====',
- 'blockVerbOpen' : '{{{' ,
- 'blockVerbClose' : '}}}' ,
- 'blockQuoteLine' : ' ' ,
- 'fontMonoOpen' : '{{{' ,
- 'fontMonoClose' : '}}}' ,
- 'fontBoldOpen' : "'''" ,
- 'fontBoldClose' : "'''" ,
- 'fontItalicOpen' : "''" ,
- 'fontItalicClose' : "''" ,
- 'fontUnderlineOpen' : '__' ,
- 'fontUnderlineClose' : '__' ,
- 'fontStrikeOpen' : '--(' ,
- 'fontStrikeClose' : ')--' ,
- 'listItemOpen' : ' * ' ,
- 'numlistItemOpen' : ' \a. ' ,
- 'deflistItem1Open' : ' ' ,
- 'deflistItem1Close' : '::' ,
- 'deflistItem2LinePrefix': ' :: ' ,
- 'bar1' : '----' ,
- 'bar2' : '--------' ,
- 'url' : '[\a]' ,
- 'urlMark' : '[\a \a]' ,
- 'email' : '[\a]' ,
- 'emailMark' : '[\a \a]' ,
- 'img' : '[\a]' ,
- 'tableRowOpen' : '||' ,
- 'tableCellOpen' : '~A~' ,
- 'tableCellClose' : '||' ,
- 'tableTitleCellClose' : '||' ,
- '_tableCellAlignRight' : '<)>' ,
- '_tableCellAlignCenter' : '<:>' ,
- 'comment' : '/* \a */' ,
- 'TOC' : '[[TableOfContents]]'
- },
- # http://code.google.com/p/support/wiki/WikiSyntax
- 'gwiki': {
- 'title1' : '= \a =' ,
- 'title2' : '== \a ==' ,
- 'title3' : '=== \a ===' ,
- 'title4' : '==== \a ====' ,
- 'title5' : '===== \a =====',
- 'blockVerbOpen' : '{{{' ,
- 'blockVerbClose' : '}}}' ,
- 'blockQuoteLine' : ' ' ,
- 'fontMonoOpen' : '{{{' ,
- 'fontMonoClose' : '}}}' ,
- 'fontBoldOpen' : '*' ,
- 'fontBoldClose' : '*' ,
- 'fontItalicOpen' : '_' , # underline == italic
- 'fontItalicClose' : '_' ,
- 'fontStrikeOpen' : '~~' ,
- 'fontStrikeClose' : '~~' ,
- 'listItemOpen' : ' * ' ,
- 'numlistItemOpen' : ' # ' ,
- 'url' : '\a' ,
- 'urlMark' : '[\a \a]' ,
- 'email' : 'mailto:\a' ,
- 'emailMark' : '[mailto:\a \a]',
- 'img' : '[\a]' ,
- 'tableRowOpen' : '|| ' ,
- 'tableRowClose' : ' ||' ,
- 'tableCellSep' : ' || ' ,
- },
- # http://powerman.name/doc/asciidoc
- 'adoc': {
- 'title1' : '== \a' ,
- 'title2' : '=== \a' ,
- 'title3' : '==== \a' ,
- 'title4' : '===== \a' ,
- 'title5' : '===== \a' ,
- 'blockVerbOpen' : '----' ,
- 'blockVerbClose' : '----' ,
- 'fontMonoOpen' : '+' ,
- 'fontMonoClose' : '+' ,
- 'fontBoldOpen' : '*' ,
- 'fontBoldClose' : '*' ,
- 'fontItalicOpen' : '_' ,
- 'fontItalicClose' : '_' ,
- 'listItemOpen' : '- ' ,
- 'listItemLine' : '\t' ,
- 'numlistItemOpen' : '. ' ,
- 'url' : '\a' ,
- 'urlMark' : '\a[\a]' ,
- 'email' : 'mailto:\a' ,
- 'emailMark' : 'mailto:\a[\a]' ,
- 'img' : 'image::\a[]' ,
- },
- # http://wiki.splitbrain.org/wiki:syntax
- # Hint: <br> is \\ $
- # Hint: You can add footnotes ((This is a footnote))
- 'doku': {
- 'title1' : '===== \a =====',
- 'title2' : '==== \a ====' ,
- 'title3' : '=== \a ===' ,
- 'title4' : '== \a ==' ,
- 'title5' : '= \a =' ,
- # DokuWiki uses ' ' identation to mark verb blocks (see indentverbblock)
- 'blockQuoteLine' : '>' ,
- 'fontMonoOpen' : "''" ,
- 'fontMonoClose' : "''" ,
- 'fontBoldOpen' : "**" ,
- 'fontBoldClose' : "**" ,
- 'fontItalicOpen' : "//" ,
- 'fontItalicClose' : "//" ,
- 'fontUnderlineOpen' : "__" ,
- 'fontUnderlineClose' : "__" ,
- 'fontStrikeOpen' : '<del>' ,
- 'fontStrikeClose' : '</del>' ,
- 'listItemOpen' : ' * ' ,
- 'numlistItemOpen' : ' - ' ,
- 'bar1' : '----' ,
- 'url' : '[[\a]]' ,
- 'urlMark' : '[[\a|\a]]' ,
- 'email' : '[[\a]]' ,
- 'emailMark' : '[[\a|\a]]' ,
- 'img' : '{{\a}}' ,
- 'imgAlignLeft' : '{{\a }}' ,
- 'imgAlignRight' : '{{ \a}}' ,
- 'imgAlignCenter' : '{{ \a }}' ,
- 'tableTitleRowOpen' : '^ ' ,
- 'tableTitleRowClose' : ' ^' ,
- 'tableTitleCellSep' : ' ^ ' ,
- 'tableRowOpen' : '| ' ,
- 'tableRowClose' : ' |' ,
- 'tableCellSep' : ' | ' ,
- # DokuWiki has no attributes. The content must be aligned!
- # '_tableCellAlignRight' : '<)>' , # ??
- # '_tableCellAlignCenter': '<:>' , # ??
- # DokuWiki colspan is the same as txt2tags' with multiple |||
- # 'comment' : '## \a' , # ??
- # TOC is automatic
- },
-
- # http://www.pmwiki.org/wiki/PmWiki/TextFormattingRules
- 'pmw': {
- 'title1' : '~A~! \a ' ,
- 'title2' : '~A~!! \a ' ,
- 'title3' : '~A~!!! \a ' ,
- 'title4' : '~A~!!!! \a ' ,
- 'title5' : '~A~!!!!! \a ' ,
- 'blockQuoteOpen' : '->' ,
- 'blockQuoteClose' : '\n' ,
- # In-text font
- 'fontLargeOpen' : "[+" ,
- 'fontLargeClose' : "+]" ,
- 'fontLargerOpen' : "[++" ,
- 'fontLargerClose' : "++]" ,
- 'fontSmallOpen' : "[-" ,
- 'fontSmallClose' : "-]" ,
- 'fontLargerOpen' : "[--" ,
- 'fontLargerClose' : "--]" ,
- 'fontMonoOpen' : "@@" ,
- 'fontMonoClose' : "@@" ,
- 'fontBoldOpen' : "'''" ,
- 'fontBoldClose' : "'''" ,
- 'fontItalicOpen' : "''" ,
- 'fontItalicClose' : "''" ,
- 'fontUnderlineOpen' : "{+" ,
- 'fontUnderlineClose' : "+}" ,
- 'fontStrikeOpen' : '{-' ,
- 'fontStrikeClose' : '-}' ,
- # Lists
- 'listItemLine' : '*' ,
- 'numlistItemLine' : '#' ,
- 'deflistItem1Open' : ': ' ,
- 'deflistItem1Close' : ':' ,
- 'deflistItem2LineOpen' : '::' ,
- 'deflistItem2LineClose' : ':' ,
- # Verbatim block
- 'blockVerbOpen' : '[@' ,
- 'blockVerbClose' : '@]' ,
- 'bar1' : '----' ,
- # URL, email and anchor
- 'url' : '\a' ,
- 'urlMark' : '[[\a -> \a]]' ,
- 'email' : '\a' ,
- 'emailMark' : '[[\a -> mailto:\a]]',
- 'anchor' : '[[#\a]]\n' ,
- # Image markup
- 'img' : '\a' ,
- #'imgAlignLeft' : '{{\a }}' ,
- #'imgAlignRight' : '{{ \a}}' ,
- #'imgAlignCenter' : '{{ \a }}' ,
- # Table attributes
- 'tableTitleRowOpen' : '||! ' ,
- 'tableTitleRowClose' : '||' ,
- 'tableTitleCellSep' : ' ||!' ,
- 'tableRowOpen' : '||' ,
- 'tableRowClose' : '||' ,
- 'tableCellSep' : ' ||' ,
- },
-
- # http://en.wikipedia.org/wiki/Help:Editing
- 'wiki': {
- 'title1' : '== \a ==' ,
- 'title2' : '=== \a ===' ,
- 'title3' : '==== \a ====' ,
- 'title4' : '===== \a =====' ,
- 'title5' : '====== \a ======',
- 'blockVerbOpen' : '<pre>' ,
- 'blockVerbClose' : '</pre>' ,
- 'blockQuoteOpen' : '<blockquote>' ,
- 'blockQuoteClose' : '</blockquote>' ,
- 'fontMonoOpen' : '<tt>' ,
- 'fontMonoClose' : '</tt>' ,
- 'fontBoldOpen' : "'''" ,
- 'fontBoldClose' : "'''" ,
- 'fontItalicOpen' : "''" ,
- 'fontItalicClose' : "''" ,
- 'fontUnderlineOpen' : '<u>' ,
- 'fontUnderlineClose' : '</u>' ,
- 'fontStrikeOpen' : '<s>' ,
- 'fontStrikeClose' : '</s>' ,
- #XXX Mixed lists not working: *#* list inside numlist inside list
- 'listItemLine' : '*' ,
- 'numlistItemLine' : '#' ,
- 'deflistItem1Open' : '; ' ,
- 'deflistItem2LinePrefix': ': ' ,
- 'bar1' : '----' ,
- 'url' : '[\a]' ,
- 'urlMark' : '[\a \a]' ,
- 'email' : 'mailto:\a' ,
- 'emailMark' : '[mailto:\a \a]' ,
- # [[Image:foo.png|right|Optional alt/caption text]] (right, left, center, none)
- 'img' : '[[Image:\a~A~]]' ,
- '_imgAlignLeft' : '|left' ,
- '_imgAlignCenter' : '|center' ,
- '_imgAlignRight' : '|right' ,
- # {| border="1" cellspacing="0" cellpadding="4" align="center"
- 'tableOpen' : '{|~A~~B~ cellpadding="4"',
- 'tableClose' : '|}' ,
- 'tableRowOpen' : '|-\n| ' ,
- 'tableTitleRowOpen' : '|-\n! ' ,
- 'tableCellSep' : ' || ' ,
- 'tab…
Large files files are truncated, but you can click here to view the full file