From bf3a7ec41c12d9181f8c26b391fa02fa8743a44e Mon Sep 17 00:00:00 2001 From: James Turk Date: Wed, 31 Mar 2010 17:48:06 -0400 Subject: [PATCH] commit dist files --- CHANGELOG | 10 +++++++++ LICENSE | 30 ++++++++++++++++++++++++++ MANIFEST.in | 4 ++++ README.rst | 61 +++++++++++++++++++++++++++++++++++++++++++++++++++++ TODO | 9 ++++++++ setup.py | 27 ++++++++++++++++++++++++ 6 files changed, 141 insertions(+) create mode 100644 CHANGELOG create mode 100644 LICENSE create mode 100644 MANIFEST.in create mode 100644 README.rst create mode 100644 TODO create mode 100644 setup.py diff --git a/CHANGELOG b/CHANGELOG new file mode 100644 index 0000000..d84a9eb --- /dev/null +++ b/CHANGELOG @@ -0,0 +1,10 @@ +0.2.0 +=================== + - simplification of status + - addition of optional comment fields on edit + - cache-based lock for writing + - added MARKUPWIKI_ settings + +0.1.0 +===== + - internal pre-git code diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..5ca23ff --- /dev/null +++ b/LICENSE @@ -0,0 +1,30 @@ +django-markupwiki +================= + +Copyright (c) 2010, Sunlight Labs, James Turk + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of the software nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 0000000..5e4802d --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1,4 @@ +include README.rst +include LICENSE +include CHANGELOG +recursive-include markupwiki/templates *.html diff --git a/README.rst b/README.rst new file mode 100644 index 0000000..6b70a6f --- /dev/null +++ b/README.rst @@ -0,0 +1,61 @@ +================= +django-markupwiki +================= + +An implementation of simple markup-agnostic wiki for Django. + +markupwiki does not aim to be a full fledged replacement to mediawiki or other +large packages, but instead to provide the most commonly used subset of +functionality. Pages can be edited, locked, and deleted. Revisions can be +viewed, reverted, and compared. If you need much more than that markupwiki +might not be for you. + + +Requirements +------------ + +django-markupwiki depends on django 1.2+, django-markupfield and libraries +for whichever markup options you wish to include. + + +Settings +======== + +To best make use of MarkupField you should define the +``MARKUP_FIELD_TYPES`` setting, a dictionary of strings to callables that +'render' a markup type:: + + import markdown + from docutils.core import publish_parts + + def render_rest(markup): + parts = publish_parts(source=markup, writer_name="html4css1") + return parts["fragment"] + + MARKUP_FIELD_TYPES = { + 'markdown': markdown.markdown, + 'ReST': render_rest, + } + +If you do not define a ``MARKUP_FIELD_TYPES`` then one is provided with the +following markup types available: + +html: + allows HTML, potentially unsafe +plain: + plain text markup, calls urlize and replaces text with linebreaks +markdown: + default `markdown`_ renderer (only if `python-markdown`_ is installed) +restructuredtext: + default `ReST`_ renderer (only if `docutils`_ is installed) +textile: + default `textile`_ renderer (only if `textile`_ is installed) + +.. _`markdown`: http://daringfireball.net/projects/markdown/ +.. _`ReST`: http://docutils.sourceforge.net/rst.html +.. _`textile`: http://hobix.com/textile/quick.html +.. _`python-markdown`: http://www.freewisdom.org/projects/python-markdown/ +.. _`docutils`: http://docutils.sourceforge.net/ +.. _`python-textile`: http://pypi.python.org/pypi/textile + + diff --git a/TODO b/TODO new file mode 100644 index 0000000..5db2dfe --- /dev/null +++ b/TODO @@ -0,0 +1,9 @@ +* revert option +* wikiword highlighting +* setup.py & README +* only store diffs? +* anonymous edits? + +add options: + * MARKUPWIKI_URL_RE + * MARKUPWIKI_WIKIWORD_RE diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..0264aa6 --- /dev/null +++ b/setup.py @@ -0,0 +1,27 @@ +from distutils.core import setup + +long_description = open('README.rst').read() + +setup( + name='django-markupwiki', + version="0.2.0", + packages=['markupwiki'], + package_dir={'markupwiki': 'markupwiki'}, + package_data={'markupwiki': ['templates/markupwiki/*.html']}, + description='Simple Django wiki supporting various markup types', + author='James Turk', + author_email='jturk@sunlightfoundation.com', + license='BSD License', + url='http://github.com/sunlightlabs/django-markupwiki/', + long_description=long_description, + platforms=["any"], + classifiers=[ + 'Development Status :: 4 - Beta', + 'Intended Audience :: Developers', + 'License :: OSI Approved :: BSD License', + 'Natural Language :: English', + 'Operating System :: OS Independent', + 'Programming Language :: Python', + 'Environment :: Web Environment', + ], +)