aboutsummaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorWaylan Limberg <waylan@gmail.com>2009-05-05 23:29:26 -0400
committerWaylan Limberg <waylan@gmail.com>2009-05-05 23:29:26 -0400
commit3595679ef7e474e07734d573205e75d04034eb88 (patch)
treed9dd3d40dd5dce1686114f16aaac7139a2978887 /bin
parent6d972b91d30d6e314fee111354b98ed4130eebe6 (diff)
downloadmarkdown-3595679ef7e474e07734d573205e75d04034eb88.tar.gz
markdown-3595679ef7e474e07734d573205e75d04034eb88.tar.bz2
markdown-3595679ef7e474e07734d573205e75d04034eb88.zip
Fixed commandline issues and upped version to 2.0.1-beta. Renamed markdown.py to markdown and added a markdown.bat wrapper for win32. Also had to put markdown script in a bin dir so it doesn't clash with the markdown lib dir because win32 doesn't allow a dir and file of the same name in same parent dir.
Diffstat (limited to 'bin')
-rwxr-xr-xbin/markdown42
1 files changed, 42 insertions, 0 deletions
diff --git a/bin/markdown b/bin/markdown
new file mode 100755
index 0000000..aae3e76
--- /dev/null
+++ b/bin/markdown
@@ -0,0 +1,42 @@
+#!/usr/bin/env python
+"""
+Python Markdown, the Command Line Script
+========================================
+
+This is the command line script for Python Markdown.
+
+Basic use from the command line:
+
+ python markdown.py source.txt > destination.html
+
+Run "python markdown.py --help" to see more options.
+
+See markdown/__init__.py for information on using Python Markdown as a module.
+
+## Authors and License
+
+Started by [Manfred Stienstra](http://www.dwerg.net/). Continued and
+maintained by [Yuri Takhteyev](http://www.freewisdom.org), [Waylan
+Limberg](http://achinghead.com/) and [Artem Yunusov](http://blog.splyer.com).
+
+Contact: markdown@freewisdom.org
+
+Copyright 2007, 2008 The Python Markdown Project (v. 1.7 and later)
+Copyright 200? Django Software Foundation (OrderedDict implementation)
+Copyright 2004, 2005, 2006 Yuri Takhteyev (v. 0.2-1.6b)
+Copyright 2004 Manfred Stienstra (the original version)
+
+License: BSD (see docs/LICENSE for details).
+"""
+
+import logging
+from markdown import COMMAND_LINE_LOGGING_LEVEL
+from markdown import commandline
+
+# Setup a logger manually for compatibility with Python 2.3
+logger = logging.getLogger('MARKDOWN')
+logger.setLevel(COMMAND_LINE_LOGGING_LEVEL)
+logger.addHandler(logging.StreamHandler())
+
+if __name__ == '__main__':
+ commandline.run()