Markowik 0.2

Convert Markdown to Google Code Wiki

  Add it to your Download Basket!

 Add it to your Watch List!

0/5

Rate it!

What's new in Markowik 0.2:

  • Markowik now supports (and requires) PyMD ≥ 2.1. Next to minor API changes PyMD 2.1 also had some changes and improvements in its conversion process -- for details, check how tests have been adjusted for PyMD 2.1.
Read full changelog
send us
an update
LICENSE TYPE:
MIT/X Consortium License 
USER RATING:
UNRATED
  0.0/5
DEVELOPED BY:
Oben Sonne
HOMEPAGE:
pypi.python.org
CATEGORY:
ROOT \ Text Editing&Processing \ Markup
Markowik is a Python app that converts Markdown formatted text to Google Code Wiki.

Markowik is able to convert most Markdown constructs to its Google Code Wiki (GCW) equivalents. Instead of listing all supported conversions, please have a look at Markowik's test suite and its show case.

Installation

Run:

pip install markowik

or:

easy_install markowik

You can also use Markowik without installation, as described under Contribute.

Command Line Usage

From the help output:

usage: markowik [-h] [--mx [MX [MX ...]]] [--image-baseurl URL]
 [--html-images] [--encoding ENCODING] [--quiet]
 INFILE [OUTFILE]

Convert Markdown to Google Code Wiki.

positional arguments:
 INFILE markdown file
 OUTFILE wiki file (default: stdout)

optional arguments:
 -h, --help show this help message and exit
 --mx [MX [MX ...]] markdown extensions to activate
 --image-baseurl URL base URL to prepend to relative image locations
 --html-images always use HTML for images
 --encoding ENCODING encoding of input and output (default: UTF8)
 --quiet disable info messages

Markdown extensions may be given similarly as to the Python Markdown (PyMD) command line tool, with the exception that individual extensions must be separated by a space:

markowik INPUT --mx tables def_list

The currently supported (i.e. tested) extensions are abbr, tables, and def_list. Other extensions generally should work too but might yield unexpected results in the converted wiki text.

Concerning the option --html-images, see the explanations below at Limitations.

Programmatic Usage

Markowik is implemented in Python. The markowik module provides a function named convert. Semantically it is similar to the command line interface (keyword arguments correspond to command line options). Here's a short usage example:

>>> import markowik
>>> markowik.convert("Some *markdown* text ...", mx=['tables'])
u'Some _markdown_ text ...'


Page Pragmas

GCW page pragmas can be set in Markdown source files as meta data in the format defined by the PyMD meta extension:

>>> src = """Summary: page summary
... Labels: some, labels
...
... Here starts the *page* ..
... """
>>> print markowik.convert(src, mx=['meta'])
#summary page summary
#labels some, labels
< BLANKLINE >
Here starts the _page_ ..


Note that the meta extension has to be enabled explicitly, i.e. by default Markowik does not recognize page pragmas.

Last updated on January 24th, 2012

requirements limitations

#Google Code Wiki #markdown converter #markdown #converter #Google #Code

Add your review!

SUBMIT