diff --git a/ChangeLog b/ChangeLog new file mode 100644 index 0000000..1b6378a --- /dev/null +++ b/ChangeLog @@ -0,0 +1,207 @@ + +2016-04-21 Martin A. Brown + * bumping version to tldp-0.7.7 + * Debian packaging attempt #1, created build with 'native' source format + which will not be accepted + * add debian/copyright file + * ldptool manpage (sphinx-generated for Debian; statically installed in RPM) + * switch --detail reporting to use predictable DOCTYPE and STATUSTYPE names + +2016-04-09 Martin A. Brown + * bumping version to 0.7.5 + * remove 'random' text from .LDP-source-MD5SUMS + * remove the --builddir if empty after complete run + +2016-04-02 Martin A. Brown + * bumping version to 0.7.2 + * using filesystem age for determining build need will not work; switch + to using content hash (MD5) to determine whether a rebuild is necessary or + not + * create .LDP-source-MD5SUMS in each output directory that lists all of + the hashes of the source files used to create that output directory + * remove testing and references to statfiles() and supporting friends + * add a 'lifecycle' test to the testing suite + * report on running success and failure counts during the run (to allow + interruptability if the user wishes) + +2016-03-28 Martin A. Brown + * bumping version to 0.7.0 + * support better handling of --verbose; --verbose yes, --verbose false + * update and improve documentation in stock configuration file + * provide better feedback on directory existence (or not) rather than + silently doing something unpredicable + +2016-03-27 Martin A. Brown + * bumping version to 0.6.7 + * correct situation where publish() was not propagating errors returned + from the build() function; add test + * add broken example Docbook 4 XML file to test suite + * use unicode_literals in all testing code, too + +2016-03-24 Martin A. Brown + * bumping version to 0.6.2 + * fix all sorts of runtime requirements to build under Ubuntu + and run the full test suite on Travis CI + +2016-03-15 Martin A. Brown + * bumping version to 0.6.0 + * full support for Python3, all unicode-ified and happy + * add test to fall back to iso-8859-1 for SGML docs + * success testing with tox under Python 2.7 and 3.4 + +2016-03-14 Martin A. Brown + * bumping version to 0.5.5 + * use sgmlcheck for Linuxdoc sources + * adjust reporting of discovered documents + * use context to prevent more FD leakage + * begin changes to support Python3; e.g. io.StringIO, absolute_import + unicode changes, lots of codecs.open(), unicode_literals, + +2016-03-11 Martin A. Brown + * handle EPIPE and INT with signal.SIG_DFL + +2016-03-10 Martin A. Brown + * bumping version to 0.5.3 + * create long running tests that exercise more of the code in the likely + way that a user would use the utility + * add testing for Docbook 5 XML + * improve look and consistency for --list (--detail) output + * improve README.rst + +2016-03-09 Martin A. Brown + * remove unused markdown and rst skeleton processors + * pass **kwargs through all processor tools + +2016-03-07 Martin A. Brown + * add support for --builddir, ensure that --builddir is on the same + filesystem as --pubdir + * add new option --publish; can't replace a directory atomically, but + get as close as possible by swapping the newly built output (from + --builddir) with the old one (formerly in --pubdir) + * switch to using 'return os.EX_OK' from functions in driver.py that + can be tested and/or wrapped in sys.exit(function(args)) + * testing improvements for Asciidoc and driver.py + +2016-03-06 Martin A. Brown + * provide user-discoverable support for --doctypes and --statustypes + * correct removal of Docbook4XML generated source document during build + +2016-03-05 Martin A. Brown + * use a simplified technique (arbitrary attributes on function objects) + to generate the DAG used for topological sorting and build order + generation (thanks to Python mailing lists for the idea) + +2016-03-04 Martin A. Brown + * bumping version to 0.4.8 + * add FO generation XSL + * do not set a system default for --sourcedir / --pubdir (user must + specify, somehow) + * DocBook5/DocBook4: process xincludes before validation with xmllint + * add support for AsciiDoc detection and processing + +2016-03-03 Martin A. Brown + * validate all documents (where possible) before processing + * provide support for DocBook 5.0 (XML) + * correct --loglevel handling in driver.py (finally works properly!) + * complete support for --script output + +2016-03-02 Martin A. Brown + * bumping version to 0.4.5 + * fix handling of STEMs which contain a '.' in the name + * review signature identification in each DOCTYPE processor and + validate and reconcile errors with PUBLIC / SYSTEM identifiers + for the SGML and XML declarations + * make sure that build() exits non-zero if ANY build fails + +2016-03-01 Martin A. Brown + * bumping version to 0.4.2 + * support a system configuration file /etc/ldptool + * add entry points and make first full installable build + * allow empty OutputDirectory() object + * begin overhauling the porcelain in driver.py + +2016-02-29 Martin A. Brown + * overhaul generation of inventory object from sources/outputs + * add command-line features and options; actions in particular + * continue improving coverage, at 100% on utils.py + * complete CascadingConfig object creation + +2016-02-26 Martin A. Brown + * generate a DAG for each processor class, so dependencies can + be localized (controlled, abstracted) to each processor class + * use topological sort of the DAG to drive generation of the shellscript, + which leads to massive simplification of the generate() method + * user can specify explicit file to process + * better PDF generation logic (relying on jw) + * provide support for --script outputs (logical equiv. of --dryrun) + * if a document processor is missing prerequisites, gripe to logging + and skip to the next document + * support a SourceDocument named by its directory + * add timing to each processor (some documents take minutes to process, + others just a few seconds; good for users trying to understand which...) + +2016-02-25 Martin A. Brown + * overhaul where and how logging module gets called; driver.py is main + * adding --skip feature; can skip STEM, DOCTYPE or STATUSTYPE + * automatically detect configuration fragments in document processors + with object inspection + +2016-02-23 Martin A. Brown + * add support for --detail (and --verbose) for both source and output docs + * pass args into all driver functions + * get rid of platform.py and references (not necessary any longer) + * fix FD leakage in function execute() and add test case (prevent reversion) + (and start switching to contextlib 'with' usage to avoid in future) + * start generalizing the build process for all doctypes in common.py + * move all generic functionality into BaseDoctype object + * revise fundamental execution approach; generate a shellscript (which can + be executed or simply printed) + * make logging readability improvements: clarity, relevance and alignment + +2016-02-22 Martin A. Brown + * adding ArgumentParser wrapper so can support config file + envars + * all sorts of work for support cascading configuration + * allow each processor to have its own configuration fragment, e.g. + --docbook4xml-xmllint; owned by the Docbook4XML object + * add support for --dump-cfg, --dump-env, --dump-cli, --debug-options + * adding the license text (MIT) and all of that stuff + * creating and fixing the setup.py + +2016-02-19 Martin A. Brown + +2016-02-18 Martin A. Brown + * process and report on documents in case-insensitive stem-sorted order + * add many docstrings for internal usage + * move all source directory scanning logic out of the SourceCollection + object; easier to test and simpler to understand + +2016-02-17 Martin A. Brown + * add logic for testing file age, assuming a fresh checkout of the + source documents; use filesystem age to determine whether or not + a document rebuild is necessary + * initial support for driver.py (eventually, the main user entry point + and inventory.py (for managing the identification and pairing of + source and output documents) + +2016-02-16 Martin A. Brown + * adding tons of testing for document types, edge cases, duplicate + stems, sample valid and broken documents + +2016-02-15 Martin A. Brown + * first processor, Linuxdoc, reaches success + * provide better separation between a SourceCollection and the + individual SourceDocuments; analogously, between OutputDirectory + and OutputCollection + * provide similar dict-like behaviour for SourceCollection and + OutputCollection (which is known to the user as --pubdir) + +2016-02-12 Martin A. Brown + * first processor, Linuxdoc, fleshed out, created (failed) + * generate skeletons for other supported source document formats + * automate detection of source document format; add initial testing tools + +2016-02-11 Martin A. Brown + * core source collection and output directory scanning complete + +2016-02-10 Martin A. Brown + * initial commit and basic beginnings diff --git a/contrib/debian-release.sh b/contrib/debian-release.sh new file mode 100644 index 0000000..675b2a6 --- /dev/null +++ b/contrib/debian-release.sh @@ -0,0 +1,26 @@ +#! /bin/bash +# +# + +set -e +set -x +set -o pipefail + +PACKAGE=$(dpkg-parsechangelog | awk '/Source:/{print $2}') +VERSION=$(dpkg-parsechangelog | awk -F'[- ]' '/Version:/{print $2}') + +PREFIX="${PACKAGE}-${VERSION}" +TARBALL="../${PACKAGE}_${VERSION}.orig.tar.xz" + +git archive \ + --format tar \ + --prefix "${PREFIX}/" \ + "${PREFIX}" \ + | xz \ + --compress \ + --to-stdout \ + > "${TARBALL}" + +exec debuild "$@" + +# -- end of file diff --git a/contrib/rpm-release.py b/contrib/rpm-release.py new file mode 100644 index 0000000..841e302 --- /dev/null +++ b/contrib/rpm-release.py @@ -0,0 +1,29 @@ +#! /usr/bin/python +# +# + +from __future__ import print_function + +import os +import sys + +opd = os.path.dirname +opj = os.path.join + +sys.path.append(opd(opd(__file__))) +from tldp import VERSION + +fin = open(opj(opd(__file__), 'tldp.spec.in')) +fout = open(opj(opd(__file__), 'tldp.spec'), 'w') + +def transform(mapping, text): + for tag, replacement in mapping.items(): + text = text.replace(tag, replacement) + return text + +subst = {'@VERSION@': VERSION} +print(subst) + +fout.write(transform(subst, fin.read())) + +# -- end of file diff --git a/contrib/tldp.spec b/contrib/tldp.spec index 5bec0a4..adf70a1 100644 --- a/contrib/tldp.spec +++ b/contrib/tldp.spec @@ -1,11 +1,11 @@ %define sourcename tldp %define name python-tldp -%define version 0.7.7 -%define unmangled_version 0.7.7 -%define unmangled_version 0.7.7 +%define version 0.7.10 +%define unmangled_version 0.7.10 +%define unmangled_version 0.7.10 %define release 1 -Summary: processing tools for Asciidoc, DocBook XML, DocBook SGML and Linuxdoc +Summary: automatic publishing tool for DocBook, Linuxdoc and Asciidoc Name: %{name} Version: %{version} Release: %{release} @@ -31,8 +31,8 @@ Requires: libxslt-tools Requires: python-networkx %description -tldp - processing tools for Asciidoc, DocBook XML, DocBook SGML and Linuxdoc -============================================================================ +tldp - automatic publishing tool for DocBook, Linuxdoc and Asciidoc +=================================================================== A toolset for publishing multiple output formats (PDF, text, chunked HTML and single-page HTML) from each source document in one of the supported formats. diff --git a/contrib/tldp.spec.in b/contrib/tldp.spec.in new file mode 100644 index 0000000..99506f5 --- /dev/null +++ b/contrib/tldp.spec.in @@ -0,0 +1,65 @@ +%define sourcename tldp +%define name python-tldp +%define version @VERSION@ +%define unmangled_version @VERSION@ +%define unmangled_version @VERSION@ +%define release 1 + +Summary: automatic publishing tool for DocBook, Linuxdoc and Asciidoc +Name: %{name} +Version: %{version} +Release: %{release} +Source0: %{sourcename}-%{unmangled_version}.tar.gz +License: MIT +Group: Development/Libraries +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot +Prefix: %{_prefix} +BuildArch: noarch +Vendor: Martin A. Brown +BuildRequires: python-setuptools +Requires: asciidoc +Requires: jing +Requires: htmldoc +Requires: sgmltool +Requires: openjade +Requires: docbook-utils +Requires: docbook-utils-minimal +Requires: docbook-dsssl-stylesheets +Requires: docbook-xsl-stylesheets +Requires: docbook5-xsl-stylesheets +Requires: libxslt-tools +Requires: python-networkx + +%description +tldp - automatic publishing tool for DocBook, Linuxdoc and Asciidoc +=================================================================== +A toolset for publishing multiple output formats (PDF, text, chunked HTML and +single-page HTML) from each source document in one of the supported formats. + + * Asciidoc + * Linuxdoc + * Docbook SGML 3.x (though deprecated, please no new submissions) + * Docbook SGML 4.x + * Docbook XML 4.x + * Docbook XML 5.x (basic support, as of 2016-03-10) + +TLDP = The Linux Documentation Project. + + +%prep +%setup -n %{sourcename}-%{unmangled_version} + +%build +python setup.py build + +%install +python setup.py install --single-version-externally-managed -O1 --root=$RPM_BUILD_ROOT --record=INSTALLED_FILES +install -D --mode 0644 docs/ldptool.1 %{buildroot}%{_mandir}/man1/ldptool.1 +perl -pi -e 's,(/etc/ldptool/ldptool.ini),%config(noreplace) $1,' INSTALLED_FILES + +%clean +rm -rf $RPM_BUILD_ROOT + +%files -f INSTALLED_FILES +%defattr(-,root,root) +%{_mandir}/man1/ldptool.1* diff --git a/debian/changelog b/debian/changelog index cbe873d..bcc58b7 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,13 +1,5 @@ -tldp (0.7.7) unstable; urgency=low +tldp (0.7.10-1) unstable; urgency=low - * creating a manpage to satisfy Lintian, bumping version - * renamed source package to 'tldp' * Initial release (Closes: #822181) - -- Martin A. Brown Tue, 19 Apr 2016 15:40:13 -0400 - -python3-tldp (0.7.5) UNRELEASED; urgency=low - - * first attempt at Debianization - - -- Martin A. Brown Tue, 19 Apr 2016 15:40:13 -0400 + -- Martin A. Brown Wed, 27 Apr 2016 17:09:56 +0000 diff --git a/debian/control b/debian/control index 59b703d..37159d4 100644 --- a/debian/control +++ b/debian/control @@ -1,6 +1,6 @@ Source: tldp Maintainer: Martin A. Brown -Section: python +Section: text X-Python3-Version: >= 3.4 Priority: optional Homepage: https://github.com/tLDP/python-tldp @@ -10,6 +10,8 @@ Build-Depends: debhelper (>= 9), python3-networkx, python3-nose, python3-coverage, + python3-setuptools, + python3-sphinx, htmldoc, fop, jing, @@ -39,4 +41,3 @@ Description: automatic publishing tool for DocBook, Linuxdoc and Asciidoc DocBook SGML, DocBook XML, Linuxdoc and Asciidoc formats. This tool automatically detects the source format and generates a directory containing chunked and single-page HTML, a PDF and a plain text output. - diff --git a/debian/copyright b/debian/copyright index d1789a1..6fe2cc5 100644 --- a/debian/copyright +++ b/debian/copyright @@ -7,18 +7,18 @@ Files: * Copyright: 2016 Linux Documentation Project License: MIT -Files: extras/dsssl/* extras/css/* -Copyright: 2000-2003 - Greg Ferguson (gferg@metalab.unc.edu) -License: GPL-2.0+ - +# Files: extras/dsssl/* extras/css/* +# Copyright: 2000-2003 - Greg Ferguson (gferg@metalab.unc.edu) +# License: GPL-2.0+ +# Files: extras/dsssl/* extras/xsl/* extras/css/* Copyright: 2000-2002 - David Horton (dhorton@speakeasy.net) License: GFDL-1.2 -Files: tests/sample-documents/Docbook-4.2-WHYNOT/images/* tests/sample-documents/DocBookSGML-Larger/images/bullet.png tests/sample-documents/Linuxdoc-Larger/images/* -Copyright: Copyright (C) 2011-2012 O'Reilly Media -License: MIT - +# Files: tests/sample-documents/Docbook-4.2-WHYNOT/images/* tests/sample-documents/DocBookSGML-Larger/images/bullet.png tests/sample-documents/Linuxdoc-Larger/images/* +# Copyright: Copyright (C) 2011-2012 O'Reilly Media +# License: MIT +# Files: extras/collateindex.pl Copyright: 1997-2001 Norman Walsh License: MIT @@ -42,23 +42,23 @@ License: MIT TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -License: GPL-2.0+ - This package is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - . - This package is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - . - You should have received a copy of the GNU General Public License - along with this program. If not, see - . - On Debian systems, the complete text of the GNU General - Public License version 2 can be found in "/usr/share/common-licenses/GPL-2". - +# License: GPL-2.0+ +# This package is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# . +# This package is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# . +# You should have received a copy of the GNU General Public License +# along with this program. If not, see +# . +# On Debian systems, the complete text of the GNU General +# Public License version 2 can be found in "/usr/share/common-licenses/GPL-2". +# License: GFDL-1.2 On Debian systems, the complete text of the GFDL-1.2 can be found in /usr/share/common-licenses/GFDL-1.2 diff --git a/debian/python3-tldp.lintian-overrides b/debian/python3-tldp.lintian-overrides new file mode 100644 index 0000000..d2f22d7 --- /dev/null +++ b/debian/python3-tldp.lintian-overrides @@ -0,0 +1 @@ +library-package-name-for-application diff --git a/debian/rules b/debian/rules index 1009a1c..e4ea5a0 100755 --- a/debian/rules +++ b/debian/rules @@ -15,4 +15,5 @@ override_dh_installman: override_dh_clean: (cd docs && \ rm -rf -- ./_build) + rm -rf -- ./$(PYBUILD_NAME).egg-info dh_clean diff --git a/debian/source/format b/debian/source/format index 89ae9db..163aaf8 100644 --- a/debian/source/format +++ b/debian/source/format @@ -1 +1 @@ -3.0 (native) +3.0 (quilt) diff --git a/setup.py b/setup.py index 14c2375..85fcab2 100644 --- a/setup.py +++ b/setup.py @@ -3,6 +3,7 @@ import os import glob from setuptools import setup +from tldp import VERSION with open(os.path.join(os.path.dirname(__file__), 'README.rst')) as r_file: @@ -11,12 +12,12 @@ with open(os.path.join(os.path.dirname(__file__), 'README.rst')) as r_file: setup( name='tldp', - version='0.7.7', + version=VERSION, license='MIT', author='Martin A. Brown', author_email='martin@linux-ip.net', url="http://en.tldp.org/", - description='tools for processing all TLDP source documents', + description='automatic publishing tool for DocBook, Linuxdoc and Asciidoc', long_description=readme, packages=['tldp', 'tldp/doctypes'], test_suite='nose.collector', diff --git a/tldp/__init__.py b/tldp/__init__.py index 59d377a..84627d7 100644 --- a/tldp/__init__.py +++ b/tldp/__init__.py @@ -6,3 +6,5 @@ import tldp.config import tldp.outputs import tldp.sources import tldp.inventory + +VERSION="0.7.10"