From a4022d40d0437e777c54c91876045dee0932ee60 Mon Sep 17 00:00:00 2001 From: Waylan Limberg Date: Tue, 23 Aug 2011 11:23:28 -0400 Subject: Update build_docs script for the *.txt -> *.md change in docs. --- docs/install.md | 76 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++- setup.py | 10 +------- 2 files changed, 76 insertions(+), 10 deletions(-) mode change 120000 => 100644 docs/install.md diff --git a/docs/install.md b/docs/install.md deleted file mode 120000 index 13dc419..0000000 --- a/docs/install.md +++ /dev/null @@ -1 +0,0 @@ -INSTALL.md \ No newline at end of file diff --git a/docs/install.md b/docs/install.md new file mode 100644 index 0000000..c64d144 --- /dev/null +++ b/docs/install.md @@ -0,0 +1,75 @@ +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 to install that if you don't already have it and it's available for +your system. + +See for more information or to +download the latest version of ElementTree. + +The Easy Way +------------ + +As an Admin/Root user on your system do: + + pip install markdown + +or + + easy_install markdown + +Installing on Windows +--------------------- + +Download the Windows installer (.exe) from PyPI: + + +Double-click the file and follow the instructions. + +If you prefer 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 command line script, you need to make sure your +script directory is on your system path. On a typical Python install of Windows +the Scripts directory is `C:\Python25\Scripts\`. Adjust according to your +system and add that to your system path. + +Installing on *nix Systems +-------------------------- + +From the command line do the following (where 2.x is the version number): + + wget http://pypi.python.org/packages/source/M/Markdown/Markdown-2.x.tar.gz + tar xvzf Markdown-2.x.tar.gz + cd markdown-2.x/ + sudo python setup.py install + +See [PyPI](http://pypi.python.org/pypi/Markdown) for all available versions. + +Using the Git Repository +------------------------ + +If you're the type that likes to live on the edge, you may want to keep up with +the latest additions and bug fixes in the repository between releases. +Python-Markdown is maintained in a Git repository on github.com. To +get a copy of Python-Markdown from the repository do the following from the +command line: + + git clone git://github.com/waylan/Python-Markdown.git python-markdown + cd python-markdown + python setup.py install + diff --git a/setup.py b/setup.py index 6f119bb..80e9581 100755 --- a/setup.py +++ b/setup.py @@ -67,12 +67,6 @@ class build_docs(Command): ('build_base', 'build_base'), ('force', 'force')) self.docs = self._get_docs() - try: - sm = open('docs/sitemap.txt') - self.sitemap = sm.read() - sm.close() - except: - pass def _get_docs(self): for root, dirs, files in os.walk('docs'): @@ -106,11 +100,9 @@ class build_docs(Command): else: template = codecs.open('docs/_template.html', encoding='utf-8').read() md = markdown.Markdown(extensions=['extra', 'toc']) - menu = md.convert(self.sitemap) - md.reset() for infile, title in self.docs: outfile, ext = os.path.splitext(infile) - if ext == '.txt': + if ext == '.md': outfile += '.html' outfile = change_root(self.build_base, outfile) self.mkpath(os.path.split(outfile)[0]) -- cgit v1.2.3