aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore6
-rw-r--r--.travis.yml14
-rw-r--r--LICENSE22
-rw-r--r--README.md0
-rw-r--r--makefile35
-rw-r--r--mammoth/__init__.py0
-rw-r--r--setup.py20
-rw-r--r--test-requirements.txt1
-rw-r--r--tox.ini7
9 files changed, 105 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..85d6e1e
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,6 @@
+*.pyc
+/README
+/_virtualenv
+/*.egg-info
+/.tox
+/MANIFEST
diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 0000000..917e240
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,14 @@
+language: python
+python:
+ - "2.6"
+ - "2.7"
+ - "3.2"
+ - "3.3"
+ - "pypy"
+install:
+ - "touch README"
+ - "pip install . --use-mirrors"
+ - "pip install -r test-requirements.txt --use-mirrors"
+script: nosetests tests
+notifications:
+ email: false
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..7e70661
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,22 @@
+Copyright (c) 2013, Michael Williamson
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+1. Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+2. 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.
+
+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/README.md b/README.md
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/README.md
diff --git a/makefile b/makefile
new file mode 100644
index 0000000..431a1cc
--- /dev/null
+++ b/makefile
@@ -0,0 +1,35 @@
+.PHONY: test upload clean bootstrap setup
+
+test:
+ sh -c '. _virtualenv/bin/activate; nosetests tests'
+
+upload: setup assert-converted-readme
+ python setup.py sdist upload
+ make clean
+
+register: setup
+ python setup.py register
+
+README: README.md
+ pandoc --from=markdown --to=rst README.md > README || cp README.md README
+
+assert-converted-readme:
+ test "`cat README`" != "`cat README.md`"
+
+clean:
+ rm -f README
+ rm -f MANIFEST
+ rm -rf dist
+
+bootstrap: _virtualenv setup
+ _virtualenv/bin/pip install -e .
+ifneq ($(wildcard test-requirements.txt),)
+ _virtualenv/bin/pip install -r test-requirements.txt
+endif
+ make clean
+
+setup: README
+
+_virtualenv:
+ virtualenv _virtualenv
+ _virtualenv/bin/pip install 'distribute>=0.6.45'
diff --git a/mammoth/__init__.py b/mammoth/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/mammoth/__init__.py
diff --git a/setup.py b/setup.py
new file mode 100644
index 0000000..5f529c6
--- /dev/null
+++ b/setup.py
@@ -0,0 +1,20 @@
+#!/usr/bin/env python
+
+import os
+from distutils.core import setup
+
+def read(fname):
+ return open(os.path.join(os.path.dirname(__file__), fname)).read()
+
+setup(
+ name='mammoth',
+ version='0.1.0',
+ description='"Convert Word documents to simple and clean HTML"',
+ long_description=read("README"),
+ author='Michael Williamson',
+ author_email='mike@zwobble.org',
+ url='http://github.com/mwilliamson/python-mammoth',
+ packages=['mammoth'],
+ keywords="docx word office clean html",
+)
+
diff --git a/test-requirements.txt b/test-requirements.txt
new file mode 100644
index 0000000..02f2252
--- /dev/null
+++ b/test-requirements.txt
@@ -0,0 +1 @@
+nose>=1.2.1,<2.0
diff --git a/tox.ini b/tox.ini
new file mode 100644
index 0000000..dc9d543
--- /dev/null
+++ b/tox.ini
@@ -0,0 +1,7 @@
+[tox]
+envlist = py26,py27,py32,py33,pypy
+[testenv]
+changedir = {envtmpdir}
+deps=-r{toxinidir}/test-requirements.txt
+commands=
+ nosetests {toxinidir}/tests