diff options
author | Artem Yunusov <nedrlab@gmail.com> | 2008-08-12 16:25:16 +0500 |
---|---|---|
committer | Artem Yunusov <nedrlab@gmail.com> | 2008-08-12 16:25:16 +0500 |
commit | 90c4d5b13b231b34841aab698ca5499a30213f61 (patch) | |
tree | 64b383c2a8732ab60ab33ae79a98273a229dc580 | |
parent | 2215f99b0c5d82b3d53306f762a6135adeade384 (diff) | |
parent | 57efe86c611f9347d0259b2dbbab26d79385a58c (diff) | |
download | markdown-90c4d5b13b231b34841aab698ca5499a30213f61.tar.gz markdown-90c4d5b13b231b34841aab698ca5499a30213f61.tar.bz2 markdown-90c4d5b13b231b34841aab698ca5499a30213f61.zip |
Merge git@gitorious.org:python-markdown/mainline
-rw-r--r-- | .gitignore | 4 | ||||
-rw-r--r-- | MANIFEST | 31 | ||||
-rw-r--r-- | docs/AUTHORS | 36 | ||||
-rw-r--r-- | docs/CHANGE_LOG (renamed from CHANGE_LOG.txt) | 0 | ||||
-rw-r--r-- | docs/INSTALL | 59 | ||||
-rw-r--r-- | docs/README (renamed from README.txt) | 0 | ||||
-rw-r--r-- | docs/README.html (renamed from README.html) | 0 | ||||
-rwxr-xr-x | docs/writing_extensions.txt (renamed from writing_extensions.txt) | 0 | ||||
-rwxr-xr-x | markdown.py | 21 | ||||
-rw-r--r-- | markdown_extensions/__init__.py | 0 | ||||
-rw-r--r-- | markdown_extensions/codehilite.py (renamed from mdx_codehilite.py) | 0 | ||||
-rw-r--r-- | markdown_extensions/extra.py (renamed from mdx_extra.py) | 0 | ||||
-rw-r--r-- | markdown_extensions/fenced_code.py (renamed from mdx_fenced_code.py) | 0 | ||||
-rw-r--r-- | markdown_extensions/footnotes.py (renamed from mdx_footnotes.py) | 0 | ||||
-rw-r--r-- | markdown_extensions/headerid.py (renamed from mdx_headerid.py) | 0 | ||||
-rw-r--r-- | markdown_extensions/imagelinks.py (renamed from mdx_imagelinks.py) | 0 | ||||
-rw-r--r-- | markdown_extensions/meta.py (renamed from mdx_meta.py) | 0 | ||||
-rw-r--r-- | markdown_extensions/rss.py (renamed from mdx_rss.py) | 0 | ||||
-rw-r--r-- | markdown_extensions/tables.py (renamed from mdx_tables.py) | 0 | ||||
-rw-r--r-- | markdown_extensions/wikilink.py (renamed from mdx_wikilink.py) | 0 | ||||
-rw-r--r-- | scripts/odt2txt.py (renamed from odt2txt.py) | 0 | ||||
-rw-r--r-- | setup.py | 13 |
22 files changed, 130 insertions, 34 deletions
@@ -2,5 +2,5 @@ *.bak *.tmp tmp/* -__init__.py -markdown_old.py +build/* +dist/* @@ -1,15 +1,20 @@ -README.txt -README.html -CHANGE_LOG.txt markdown.py -mdx_codehilite.py -mdx_fenced_code.py -mdx_footnotes.py -mdx_headerid.py -mdx_imagelinks.py -mdx_meta.py -mdx_rss.py -mdx_tables.py -mdx_wikilink.py +markdown_extnesions/__init__.py +markdown_extensions/codehilite.py +markdown_extensions/fenced_code.py +markdown_extensions/footnotes.py +markdown_extensions/headerid.py +markdown_extensions/imagelinks.py +markdown_extensions/meta.py +markdown_extensions/rss.py +markdown_extensions/tables.py +markdown_extensions/wikilink.py setup.py -scripts/pymarkdown.py
\ No newline at end of file +scripts/pymarkdown.py +docs/README +docs/README.html +docs/CHANGE_LOG +docs/INSTALL +docs/AUTHORS +docs/writing_extensions.txt + diff --git a/docs/AUTHORS b/docs/AUTHORS new file mode 100644 index 0000000..b4cd939 --- /dev/null +++ b/docs/AUTHORS @@ -0,0 +1,36 @@ +Primary Authors +=============== + +Yuri Takteyev <http://freewisdom.org/>, who has written much of the current code +while procrastingating his Ph.D. + +Waylan Limberg <http://achinghead.com/>, who has written most of the available +extensions and later was asked to join Yuri, fixing nummrious bugs, adding +documentation and making general improvements to the existing codebase. + +Artem Yunusov, who as part of a 2008 GSoC project, has refactored inline +patterns, replaced the NanoDOM with ElementTree support and made various other +improvements. + +Manfed Stienstra <http://www.dwerg.net/>, who wrote the original version of +the script and is responsible for various parts of the existing codebase. + +David Wolever, who refactored the extension API and made other improvements +as he helped to integrate Markdown into Dr.Project. + +Other Contributors +================== + +The incomplete list of individuals below have provided patches +or otherwise contributed to the project in various ways. We would like to thank +everyone who has contributed to the progect in any way. + +Jeff Balogh +Sergej Chodarev +Chris Clark +Tiago Cogumbreiro +G. Clark Haynes +Daniel Krech +Steward Midwinter +Malcolm Tredinnick +and many others to helped by reporting bugs diff --git a/CHANGE_LOG.txt b/docs/CHANGE_LOG index 200d5b7..200d5b7 100644 --- a/CHANGE_LOG.txt +++ b/docs/CHANGE_LOG diff --git a/docs/INSTALL b/docs/INSTALL new file mode 100644 index 0000000..56d6c78 --- /dev/null +++ b/docs/INSTALL @@ -0,0 +1,59 @@ +Installing Python-Markdown +========================== + +Checking Dependencies +--------------------- + +Python-Markdown requires the ElementTree module to be installed. In Python2.5+ +ElementTree is included as part of the standard library. For earlier versions +of Python, open a Python shell and type the following: + + >>> import cElementTree + >>> import ElementTree + +If at least one of those does not generate any errors, then you have a working +copy of ElementTree installed on your system. As cElementTree is faster, you +may want install that if you don't already have it and it's available for your +system. + +The East Way +------------ + +The simplest way to install Python-Markdown is by using SetupTools. As and +Admin/Root user on your system do: + + easy_install ElementTree + easy_install Markdown + +That's it, your done. + +Installing on Windows +--------------------- + + + +Download the Windows installer (.exe) from PyPI: + +<http://pypi.python.org/pypi/Markdown> + +Doubleclick the file and follow the instructions. + +If you preffer to manually install Python-Markdown in Windows, download the +Zip file, unzip it, and on the command line in the directory you unzipped to: + + python setup.py install + +If you plan to use the provided commandline script, you need to make sure your +script directory is on your system path. On a typical Python install on Windows +the Scripts directory is `C:\Python25\Scripts\`. Adjust according to your +system and add that to your system path. + +Installing on *nix Sytems +------------------------- + +From the command line do the following: + + wget http://pypi.python.org/packages/source/M/Markdown/markdown-2.0.tar.gz + tar xvzf markdown-2.0.tar.gz + cd markdown-2.0/ + sudo python setup.py install diff --git a/README.html b/docs/README.html index 6d94e8e..6d94e8e 100644 --- a/README.html +++ b/docs/README.html diff --git a/writing_extensions.txt b/docs/writing_extensions.txt index dbb4dd4..dbb4dd4 100755 --- a/writing_extensions.txt +++ b/docs/writing_extensions.txt diff --git a/markdown.py b/markdown.py index 707b89c..af611c8 100755 --- a/markdown.py +++ b/markdown.py @@ -2129,17 +2129,22 @@ def load_extension(ext_name, configs = []): pairs = [x.split("=") for x in ext_args.split(",")] configs.update([(x.strip(), y.strip()) for (x, y) in pairs]) - extension_module_name = "mdx_" + ext_name + ext_module = 'markdown_extensions' + module_name = '.'.join([ext_module, ext_name]) + extension_module_name = '_'.join(['mdx', ext_name]) try: - module = __import__(extension_module_name) - + module = __import__(module_name, {}, {}, [ext_module]) except ImportError: - message(WARN, - "Couldn't load extension '%s' from \"%s\" - continuing without." - % (ext_name, extension_module_name) ) - # Return a dummy (do nothing) Extension as silent failure - return Extension(configs={}) + try: + module = __import__(extension_module_name) + except: + message(WARN, + "Failed loading extension '%s' from '%s' or '%s' " + "- continuing without." + % (ext_name, module_name, extension_module_name) ) + # Return a dummy (do nothing) Extension as silent failure + return Extension(configs={}) return module.makeExtension(configs.items()) diff --git a/markdown_extensions/__init__.py b/markdown_extensions/__init__.py new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/markdown_extensions/__init__.py diff --git a/mdx_codehilite.py b/markdown_extensions/codehilite.py index 73c1a79..73c1a79 100644 --- a/mdx_codehilite.py +++ b/markdown_extensions/codehilite.py diff --git a/mdx_extra.py b/markdown_extensions/extra.py index e99bec4..e99bec4 100644 --- a/mdx_extra.py +++ b/markdown_extensions/extra.py diff --git a/mdx_fenced_code.py b/markdown_extensions/fenced_code.py index c3d9f7f..c3d9f7f 100644 --- a/mdx_fenced_code.py +++ b/markdown_extensions/fenced_code.py diff --git a/mdx_footnotes.py b/markdown_extensions/footnotes.py index b46efbb..b46efbb 100644 --- a/mdx_footnotes.py +++ b/markdown_extensions/footnotes.py diff --git a/mdx_headerid.py b/markdown_extensions/headerid.py index 2360071..2360071 100644 --- a/mdx_headerid.py +++ b/markdown_extensions/headerid.py diff --git a/mdx_imagelinks.py b/markdown_extensions/imagelinks.py index e545b24..e545b24 100644 --- a/mdx_imagelinks.py +++ b/markdown_extensions/imagelinks.py diff --git a/mdx_meta.py b/markdown_extensions/meta.py index 30dea8a..30dea8a 100644 --- a/mdx_meta.py +++ b/markdown_extensions/meta.py diff --git a/mdx_rss.py b/markdown_extensions/rss.py index b88b9b5..b88b9b5 100644 --- a/mdx_rss.py +++ b/markdown_extensions/rss.py diff --git a/mdx_tables.py b/markdown_extensions/tables.py index 829044c..829044c 100644 --- a/mdx_tables.py +++ b/markdown_extensions/tables.py diff --git a/mdx_wikilink.py b/markdown_extensions/wikilink.py index 47037a6..47037a6 100644 --- a/mdx_wikilink.py +++ b/markdown_extensions/wikilink.py diff --git a/odt2txt.py b/scripts/odt2txt.py index bb8fab0..bb8fab0 100644 --- a/odt2txt.py +++ b/scripts/odt2txt.py @@ -10,16 +10,7 @@ setup( maintainer_email = "waylan [at] gmail.com", url = "http://www.freewisdom.org/projects/python-markdown", license = "BSD License, GNU Public License (GPL)", - py_modules = ["markdown", - "mdx_codehilite", - "mdx_fenced_code", - "mdx_footnotes", - "mdx_headerid", - "mdx_imagelinks", - "mdx_meta", - "mdx_rss", - "mdx_tables", - "mdx_wikilink", - ], + py_modules = ["markdown"], + packages = ['markdown_extensions'], scripts = ['scripts/pymarkdown.py'], ) |