From b97cec6aaad5a9fa01dc3df4e0d25f0c60eb8093 Mon Sep 17 00:00:00 2001 From: Sven Slootweg Date: Mon, 22 Apr 2013 01:06:28 +0200 Subject: [PATCH] Reorganize source tree and add a setup script --- .gitignore | 3 ++ MANIFEST.in | 1 + setup.py | 49 +++++++++++++++++++ documentation.html => site/documentation.html | 0 documentation.zpy => site/documentation.zpy | 0 example.html => site/example.html | 0 example.zpy => site/example.zpy | 0 index.html => site/index.html | 2 +- index.zpy => site/index.zpy | 6 +-- {zippydoc => src/zippydoc}/__init__.py | 0 {zippydoc => src/zippydoc}/block_markup.py | 0 .../zippydoc/data/template.html | 0 {zippydoc => src/zippydoc}/document.py | 0 .../zippydoc}/transformation_ruleset.py | 0 {zippydoc => src/zippydoc}/value.py | 0 zpy2html.py => zpy2html | 11 ++++- 16 files changed, 66 insertions(+), 6 deletions(-) create mode 100644 MANIFEST.in create mode 100644 setup.py rename documentation.html => site/documentation.html (100%) rename documentation.zpy => site/documentation.zpy (100%) rename example.html => site/example.html (100%) rename example.zpy => site/example.zpy (100%) rename index.html => site/index.html (85%) rename index.zpy => site/index.zpy (70%) rename {zippydoc => src/zippydoc}/__init__.py (100%) rename {zippydoc => src/zippydoc}/block_markup.py (100%) rename template.html => src/zippydoc/data/template.html (100%) rename {zippydoc => src/zippydoc}/document.py (100%) rename {zippydoc => src/zippydoc}/transformation_ruleset.py (100%) rename {zippydoc => src/zippydoc}/value.py (100%) rename zpy2html.py => zpy2html (94%) mode change 100644 => 100755 diff --git a/.gitignore b/.gitignore index 0d20b64..cec05fb 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,4 @@ *.pyc +build/ +dist/ +zippydoc.egg-info/ diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 0000000..c011d97 --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1 @@ +include src/zippydoc/data/* diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..920e824 --- /dev/null +++ b/setup.py @@ -0,0 +1,49 @@ +#!/usr/bin/env python + +""" +distutils/setuptools install script. See inline comments for packaging documentation. +""" + +import os +import sys + +try: + from setuptools import setup + # hush pyflakes + setup +except ImportError: + from distutils.core import setup + +try: + from distutils.command.build_py import build_py_2to3 as build_py +except ImportError: + from distutils.command.build_py import build_py + +packages = ['zippydoc'] + +package_dir = {"zippydoc": "src/zippydoc"} + +package_data = {"zippydoc": ["data/template.html"]} + +scripts = [ + 'zpy2html' +] + +print repr(package_data) + +setup( + name='zippydoc', + version='1.0', + maintainer='Sven Slootweg', + maintainer_email='admin@cryto.net', + description='Documentation markup language and library, including HTML converter.', + url='http://www.cryto.net/zippydoc', + packages=packages, + package_dir=package_dir, + package_data=package_data, + include_package_data=True, + scripts=scripts, + install_requires=['argparse'], + cmdclass={'build_py': build_py} +) + diff --git a/documentation.html b/site/documentation.html similarity index 100% rename from documentation.html rename to site/documentation.html diff --git a/documentation.zpy b/site/documentation.zpy similarity index 100% rename from documentation.zpy rename to site/documentation.zpy diff --git a/example.html b/site/example.html similarity index 100% rename from example.html rename to site/example.html diff --git a/example.zpy b/site/example.zpy similarity index 100% rename from example.zpy rename to site/example.zpy diff --git a/index.html b/site/index.html similarity index 85% rename from index.html rename to site/index.html index 0a970d8..c21e05a 100644 --- a/index.html +++ b/site/index.html @@ -172,6 +172,6 @@ $ my_function("ZippyDoc", "awesome") - > "ZippyDoc is awesome!"Result:
my_function(argument1, argument2)
Important: This is just an example!
This is a function.
argument1
This is the first argument.
argument2
This is the second argument.
Example: How to call my_function
Code:
my_function("ZippyDoc", "awesome")
Output:
"ZippyDoc is awesome!"

Documentation

The documentation for ZippyDoc can be found here.

Downloading ZippyDoc

ZippyDoc is still in a pretty messy stage, but it should already work reliably according to the current documentation. GitHub repository is coming soon, until that time you can download the conversion script here. It's a Python script, so you'll need a Python interpreter of some sort. No dependencies are necessary, it only uses standard library functionality. Simply run it with all files you wish to convert as arguments, and it will convert each of them into a file with the same name, but a .html extension instead of the original extension. It's strongly recommended to name your ZippyDoc source files with the .zpy extension.
+ > "ZippyDoc is awesome!"Result:
my_function(argument1, argument2)
Important: This is just an example!
This is a function.
argument1
This is the first argument.
argument2
This is the second argument.
Example: How to call my_function
Code:
my_function("ZippyDoc", "awesome")
Output:
"ZippyDoc is awesome!"

Documentation

The documentation for ZippyDoc can be found here.

Downloading ZippyDoc

ZippyDoc is now a PyPi package! To install it, make sure you have pip installed, and run pip install zippydoc. You can then use the zpy2html command anywhere, to convert your ZippyDoc source files to HTML. The GitHub repository can be found here.
diff --git a/index.zpy b/site/index.zpy similarity index 70% rename from index.zpy rename to site/index.zpy index 436d40e..dfe11c8 100644 --- a/index.zpy +++ b/site/index.zpy @@ -56,7 +56,5 @@ The documentation for ZippyDoc can be found {>documentation}(here). ## Downloading ZippyDoc -ZippyDoc is still in a pretty messy stage, but it should already work reliably according to the current documentation. GitHub repository is coming soon, until that time you can -{