{ "info": { "author": "Martin A. Brown", "author_email": "martin@linux-ip.net", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Topic :: Software Development :: Documentation", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "tldp - tools for publishing from TLDP sources\n=============================================\n\n.. image:: https://api.travis-ci.org/martin-a-brown/python-tldp.svg\n :target: https://github.com/tLDP/python-tldp\n\n.. image:: http://img.shields.io/badge/license-MIT-brightgreen.svg \n :target: http://opensource.org/licenses/MIT\n :alt: MIT license\n\nThis package was written for the Linux Documentation Project (TLDP) to help\nwith management and publication automation of source documents. The primary\ninterface provided is a command-line tool caalled `ldptool`. The canonical\nlocation of this software is:\n\n https://github.com/tLDP/python-tldp/\n\nThe `ldptool` executable can:\n\n- crawl through any number of source collection directories\n- crawl through a single output collection\n- match the sources to the outputs (based on document stem name)\n- describe supported source formats (`--formats`)\n- describe the meaning of document status (`--statustypes`)\n- describe the collection by type and status (`--summary`)\n- list out individual document type and status (`--list`)\n- build the expected (non-configurable) set of outputs (`--build`)\n- build and publish the outputs (`--publish`)\n- produce runnable shell script to STDOUT (`--script`)\n\nThe tools in this package process source documents in the `TLDP document\nrepository `_ and generate the following set of\noutputs from each source document.\n\n- .pdf, PDF\n- .txt, text\n- -single.html, a one-page HTML document\n- .html, a multipage HTML document\n\n(We may add other output formats; an epub format is under consideration.)\n\nSupported input formats are:\n\n- Asciidoc\n- Linuxdoc\n- Docbook SGML 3.x (though deprecated, please no new submissions)\n- Docbook SGML 4.x\n- Docbook XML 4.x\n- Docbook XML 5.x (basic support, as of 2016-03-10)\n\n\nExample usages\n--------------\nIf your attempts to run the below commands don't work or generate errors, see\nalso `Minimal configuration`_.\n\nHere are some example usages against a live checkout of the LDP source\nrepository and a local cache of the output tree:\n\nTo see what work needs to be done, `ldptool --list`::\n\n $ ldptool --list\n orphan Bugzilla-Guide\n new DocBook XML 4.x DocBook-Demystification-HOWTO\n stale DocBook XML 4.x Linux-Dictionary\n broken DocBook SGML 3.x/4.x PHP-Nuke-HOWTO\n stale Linuxdoc User-Group-HOWTO\n\nTo see publication status of each document:::\n\n $ ldptool --list all | head -n 3\n published Linuxdoc 3-Button-Mouse \n published Linuxdoc 3D-Modelling \n published Linuxdoc 4mb-Laptops \n\nTo get more information about the newer or missing files in a specific\ndocument:::\n\n $ ldptool --verbose --list Linux-Dictionary\n stale DocBook XML 4.x Linux-Dictionary\n doctype \n output dir /home/mabrown/tmp/en/Linux-Dictionary\n source file /home/mabrown/vcs/LDP/LDP/guide/docbook/Linux-Dictionary/Linux-Dictionary.xml\n newer source /home/mabrown/vcs/LDP/LDP/guide/docbook/Linux-Dictionary/Contributors.xml\n newer source /home/mabrown/vcs/LDP/LDP/guide/docbook/Linux-Dictionary/D.xml\n newer source /home/mabrown/vcs/LDP/LDP/guide/docbook/Linux-Dictionary/J.xml\n newer source /home/mabrown/vcs/LDP/LDP/guide/docbook/Linux-Dictionary/O.xml\n newer source /home/mabrown/vcs/LDP/LDP/guide/docbook/Linux-Dictionary/S.xml\n\nTo see what the entire source collection looks like, use `ldptool --summary`:::\n\n $ ldptool --summary\n By Status Type\n --------------\n source 503 3-Button-Mouse, 3D-Modelling, 4mb-Laptops, and 500 more ...\n output 503 3-Button-Mouse, 3D-Modelling, 4mb-Laptops, and 500 more ...\n published 503 3-Button-Mouse, 3D-Modelling, 4mb-Laptops, and 500 more ...\n stale 0 \n orphan 0 \n broken 1 HOWTO-INDEX\n new 0 \n\n By Document Type\n ----------------\n Linuxdoc 226 3-Button-Mouse, 3D-Modelling, and 224 more ...\n Docbook4XML 130 8021X-HOWTO, abs-guide, and 128 more ...\n Docbook5XML 1 Assembly-HOWTO\n DocbookSGML 146 ACP-Modem, and 145 more ...\n\nTo build and publish a single document:::\n\n $ ldptool --publish DocBook-Demystification-HOWTO\n $ ldptool --publish ~/vcs/LDP/LDP/howto/docbook/Valgrind-HOWTO.xml\n\nTo build and publish anything that is new or updated work:::\n\n $ ldptool --publish\n $ ldptool --publish work\n\nTo (re-)build and publish everything, regardless of state:::\n\n $ ldptool --publish all\n\nTo generate a specific output (into a --builddir):::\n\n $ ldptool --build DocBook-Demystification-HOWTO\n\nTo generate all outputs into a --builddir (should exist):::\n\n $ ldptool --builddir ~/tmp/scratch-directory/ --build all\n\nTo build new/updated work, but pass over a trouble-maker:::\n\n $ ldptool --build --skip HOWTO-INDEX\n\nTo loudly generate all outputs, except a trouble-maker:::\n\n $ ldptool --build all --loglevel debug --skip HOWTO-INDEX\n\nTo print out a shell script for building a specific document:::\n\n $ ldptool --script TransparentProxy\n $ ldptool --script ~/vcs/LDP/LDP/howto/docbook/Assembly-HOWTO.xml\n\n\nLogging\n-------\nThe `ldptool` utility is largely written to be interactive or a supervised\nbatch process. It uses STDERR as its logstream and sets the default loglevel\nat logging.ERROR. At this log level, in `--script`, `--build` and `--publish`\nmode, it should report nothing to STDERR. To increase progress verbosity,\nsetting the loglevel to info (`--loglevel info`) may help with understanding\nwhat work the tool is performing. If you need to collect diagnostic\ninformation for troubleshooting or bug reports, `ldptool` supports `--loglevel\ndebug`.\n\n\nConfiguration\n-------------\nThe `ldptool` comes with support for reading its settings from the\ncommand-line, environment or a system and/or user-specified configuration\nfile. If you want to generate a sample configuration file to edit and use\nlater, you can run:::\n\n ldptool --dump-cfg > my-ldptool.cfg\n ldptool --configfile my-ldptool.cfg --list\n LDPTOOL_CONFIGFILE=/path/to/ldptool.cfg ldptool --list\n\n\nSource document identification\n------------------------------\nTLDP's source repository contains many separate directories containing\ndocuments (e.g. LDP/howto/docbook, LDP/howto/linuxdoc). Each of these\ndirectories may contain documents; to `ldptool` each of these is a\n`--sourcedir`.\n\nA source document (in a `--sourcedir`) can be a file or a directory. Here are\ntwo examples. The Assembly-HOWTO.xml is an entire document stored as a single\nfile. The directory BRIDGE-STP-HOWTO exists and contains its main document, a\nfile named BRIDGE-STP-HOWTO.sgml. In the case of a source document that is a\ndirectory, the stem name of the primary document must match the name of the\ndirectory.::\n\n Assembly-HOWTO.xml\n BRIDGE-STP-HOWTO/\n BRIDGE-STP-HOWTO/BRIDGE-STP-HOWTO.sgml\n BRIDGE-STP-HOWTO/images\n BRIDGE-STP-HOWTO/images/hardware-setup.eps\n BRIDGE-STP-HOWTO/images/hardware-setup.png\n BRIDGE-STP-HOWTO/images/old-hardware-setup.eps\n BRIDGE-STP-HOWTO/images/old-hardware-setup.png\n\nEach document for a single run of `ldptool` can be uniquely identified by its\nstem name. In the above, the stems are `Assembly-HOWTO` and\n`BRIDGE-STP-HOWTO`. It is an error to have two documents with the same stem\nname and the second discovered document will be ignored.\n\nThere is a directory containing the output collection. Each directory is named\nby the stem name of the source document and contains the output formats for\neach source document. Here are the corresponding output directories for the\nabove two documents:::\n\n Assembly-HOWTO/\n Assembly-HOWTO/Assembly-HOWTO.html\n Assembly-HOWTO/Assembly-HOWTO.pdf\n Assembly-HOWTO/Assembly-HOWTO-single.html\n Assembly-HOWTO/Assembly-HOWTO.txt\n Assembly-HOWTO/index.html\n Assembly-HOWTO/mips.html\n Assembly-HOWTO/nasm.html\n ... and more ...\n \n BRIDGE-STP-HOWTO/\n BRIDGE-STP-HOWTO/BRIDGE-STP-HOWTO.html\n BRIDGE-STP-HOWTO/BRIDGE-STP-HOWTO.pdf\n BRIDGE-STP-HOWTO/BRIDGE-STP-HOWTO-single.html\n BRIDGE-STP-HOWTO/BRIDGE-STP-HOWTO.txt\n BRIDGE-STP-HOWTO/images\n BRIDGE-STP-HOWTO/images/hardware-setup.eps\n BRIDGE-STP-HOWTO/images/hardware-setup.png\n BRIDGE-STP-HOWTO/images/old-hardware-setup.eps\n BRIDGE-STP-HOWTO/images/old-hardware-setup.png\n BRIDGE-STP-HOWTO/index.html\n ... and more ...\n\n\nMinimal configuration\n---------------------\nThe most important configuration parameters that `ldptool` takes are the set\nof source directories (in which to find documents) and the output directory,\nin which to create the resulting outputs. It will not be able to run unless\nit has at least one --sourcedir and an existing --pubdir directory.\n\nIf you have an LDP checkout in your home directory, here's an example which\nwould process all of the Linuxdoc HOWTO docs:::\n\n mkdir LDP-output-tree\n ldptool --sourcedir $HOME/LDP/LDP/howto/linuxdoc --pubdir LDP-output-tree\n\nIf you would like to create a sample configuration file for use later (or for\ncopying into the system location, `/etc/ldptool/ldptool.ini`, you can generate\nyour own config file as follows:::\n\n ldptool > sample-ldptool.cfg \\\n --sourcedir $HOME/LDP/LDP/faq/linuxdoc/ \\\n --sourcedir $HOME/LDP/LDP/guide/linuxdoc/ \\\n --sourcedir $HOME/LDP/LDP/howto/linuxdoc/ \\\n --sourcedir $HOME/LDP/LDP/howto/docbook/ \\\n --sourcedir $HOME/LDP/LDP/guide/docbook/ \\\n --sourcedir $HOME/LDP/LDP/ref/docbook/ \\\n --sourcedir $HOME/LDP/LDP/faq/docbook/ \\\n --pubdir $HOME/LDP-output/ \\\n --loglevel info \\\n --dump-cfg\n\nThen, you can run the same configuration again with:::\n\n ldptool --configfile sample-ldptool.cfg\n\nThe `ldptool` program tries to locate all of the tools it needs to process\ndocuments. Each source format requires a certain set of tools, for example, to\nprocess DocBook 4.x XML, `ldptool` needs the executables xmllint, xstlproc,\nhtml2text, fop and dblatex. It also requires the XSL files for generating FO,\nchunked HTML and single-page HTML. All of the items are configurable on the\ncommand-line or in the configuration file, but here's a sample config file\nstanza:::\n\n [ldptool-docbook4xml]\n xslchunk = /usr/share/xml/docbook/stylesheet/ldp/html/tldp-sections.xsl\n xslsingle = /usr/share/xml/docbook/stylesheet/ldp/html/tldp-one-page.xsl\n fop = /usr/bin/fop\n dblatex = /usr/bin/dblatex\n xsltproc = /usr/bin/xsltproc\n html2text = /usr/bin/html2text\n xslprint = /usr/share/xml/docbook/stylesheet/ldp/fo/tldp-print.xsl\n xmllint = /usr/bin/xmllint\n\nThe above stanza was generated by running `ldptool --dump-cfg` on an Ubuntu\n14.04 system which had all of the software dependencies installed. If your\ndistribution does not supply ldp-docbook-xsl, for example, you would need to\nfetch those files, put them someplace in the filesystem and adjust your\nconfiguration file or command-line invocations accordingly.\n\n\nSoftware dependencies\n---------------------\nThere are a large number of packages listed here in the dependency set. This\nis because the supporting software for processing Linuxdoc and the various\nDocBook formats is split across many upstream packages and repositories.\n\nThe generated python packages (see below) do not include the explicit\ndependencies to allow the package manager (e.g. apt, zypper, dnf) to install\nthe dependencies. This would be a nice improvement.\n\nHere are the dependencies needed for this tool to run:\n\nUbuntu / Debian\n+++++++++++++++\n- linuxdoc-tools{,-text,-latex}\n- docbook{,-dsssl,-xsl,-utils}\n- htmldoc{,-common}\n- xsltproc\n- fop\n- sgml2x\n- opensp\n- openjade\n- ldp-docbook-xsl\n- ldp-docbook-dsssl\n- html2text\n- docbook5-xml\n- docbook-xsl-ns\n- jing\n- asciidoc\n- libxml2-utils\n\nOpenSUSE\n++++++++\n- htmldoc\n- openjade\n- sgmltool\n- html2text\n- docbook{,5}-xsl-stylesheets\n- docbook-dsssl-stylesheets\n- docbook-utils-minimal\n- docbook-utils\n- jing\n- asciidoc\n- libxml2-tools\n- libxslt-tools\n\nThere are a few additional data files that are needed, specifically, the TLDP\nXSL and DSSSL files that are used by the respective DocBook SGML (openjade) and\nDocBook XML (xsltproc) processing engines to generate the various outputs.\n\nOn Debian-based systems, there are packages available from the distributor\ncalled ldp-docbook-{xsl,dsssl}. There aren't any such packages for RPM (yet).\n\n\nSupported Python versions\n-------------------------\nThis package was developed against Python-2.7.8 and Python-3.4.1 (on\nOpenSUSE). It has been used on Python-2.7.6 (Ubuntu-14.04) and Python-3.4.2 and Python-2.7.9 (on Debian 8).\n\nContinuous Integration testing information and coverage can be reviewed at\n`this project's Travis CI page `_.\n\n\nInstallation\n------------\nThis is a pure-Python package, and you should be able to use your favorite\nPython tool to install it on your system. The python-tldp package (`ldptool`)\nrequires a large number of other packages, most of which are outside of the\nPython ecosystem. There's room for improvement here, but here are a few\ntidbits.\n\nBuild an RPM::\n\n python setup.py sdist && rpmbuild -ta ./dist/python-tldp-${VERSION}.tar.gz\n\nThere's a generated file, `contrib/tldp.spec`, which makes a few changes to the\nsetuptools stock-generated specfile. It adds the dependencies, marks the\nconfiguration file as %config(noreplace), adds a manpage and names the binary\npackage `python-tldp`.\n\nBuild a DEB::\n\nCheck to see if the package is available from upstream. It may be included in\nthe Debian repositories already::\n\n apt-cache search tldp\n\nThe quick and dirty way is as follows::\n\n python setup.py --command-packages=stdeb.command bdist_deb\n\nBut, there is also a `debian` directory. If you are working straight from the\ngit checkout, you should be able to generate an installable (unsigned) Debian\npackage with::\n\n bash contrib/debian-release.sh -us -uc\n\nInstall using pip:\n\nUnknown. Because the tool relies so heavily on system-installed non-Python\ntools, I have not bothered to try installing the package using pip. It should\nwork equivalently as well as running the program straight from a checkout.\nIf you learn anything here or have suggestions, for me, please feel free to\nsend them along.\n\n\nLinks\n-----\n\n* `Canonical python-tldp repository `_\n* `Source tree on GitHub `_\n* `Output documentation tree (sample) `_", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://en.tldp.org/", "keywords": null, "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "tldp", "package_url": "https://pypi.org/project/tldp/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/tldp/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://en.tldp.org/" }, "release_url": "https://pypi.org/project/tldp/0.7.13/", "requires_dist": null, "requires_python": null, "summary": "automatic publishing tool for DocBook, Linuxdoc and Asciidoc", "version": "0.7.13" }, "last_serial": 2114387, "releases": { "0.7.0": [ { "comment_text": "", "digests": { "md5": "55da812cceae2d1659c67caf3eeaf6fb", "sha256": "024e853ebabd2eb8ad7dbe41ea0cffc4d50d74a6b427b97296f684794e3bd70c" }, "downloads": -1, "filename": "tldp-0.7.0.tar.gz", "has_sig": false, "md5_digest": "55da812cceae2d1659c67caf3eeaf6fb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 37212, "upload_time": "2016-03-30T05:26:00", "url": "https://files.pythonhosted.org/packages/f4/20/637a0889416db708434573593861c8b0aeb9db77274acaf9f9d0655c5722/tldp-0.7.0.tar.gz" } ], "0.7.12": [ { "comment_text": "", "digests": { "md5": "6242e65308790ff9941b61872ba77ce3", "sha256": "8a99e38d2b960b550d09136b20a419a58099c07da242cc1749f7ae6f7b33e4b1" }, "downloads": -1, "filename": "tldp-0.7.12.tar.gz", "has_sig": false, "md5_digest": "6242e65308790ff9941b61872ba77ce3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 50359, "upload_time": "2016-04-30T22:32:50", "url": "https://files.pythonhosted.org/packages/39/4c/cdab2321f77713a82890005be84198d337932c6b4f811a40468457363a43/tldp-0.7.12.tar.gz" } ], "0.7.13": [ { "comment_text": "", "digests": { "md5": "66e4f10994d69d8e3d41f9c4389cd55b", "sha256": "3e805e8ef7de4a99db1855aad5bb37dca2b42a30590128e174bac25858e2fc33" }, "downloads": -1, "filename": "tldp-0.7.13.tar.gz", "has_sig": false, "md5_digest": "66e4f10994d69d8e3d41f9c4389cd55b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 51390, "upload_time": "2016-05-13T16:31:08", "url": "https://files.pythonhosted.org/packages/9e/0a/ab517ecaa2d55e052a20233c65925b7e8159c489b958464ae935d4f5f7f4/tldp-0.7.13.tar.gz" } ], "0.7.2": [ { "comment_text": "", "digests": { "md5": "bb78f37f67f21016ea74c416c1ca116a", "sha256": "813e6bdec8893f1414078d69afbc5880849823f5088e4eeb9c74259a9e1c30fe" }, "downloads": -1, "filename": "tldp-0.7.2.tar.gz", "has_sig": false, "md5_digest": "bb78f37f67f21016ea74c416c1ca116a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 37888, "upload_time": "2016-04-02T21:26:44", "url": "https://files.pythonhosted.org/packages/e0/b5/62ec22ca11200c2fe54f252d1723798bbad4211db666c5483e9dc0b3d006/tldp-0.7.2.tar.gz" } ], "0.7.3": [ { "comment_text": "", "digests": { "md5": "fa70d0d2d41c3ec8ca3977c82f4c52f8", "sha256": "b14e9d6ec8c37c0f17b1eeacf94107ca705fa1acfe0f230ce5ecf81e85d5ac5d" }, "downloads": -1, "filename": "tldp-0.7.3.tar.gz", "has_sig": false, "md5_digest": "fa70d0d2d41c3ec8ca3977c82f4c52f8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 37944, "upload_time": "2016-04-15T14:57:44", "url": "https://files.pythonhosted.org/packages/75/6f/ad0cb747591109e86729652b52a953efa35d96ae513c4983246f06011939/tldp-0.7.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "66e4f10994d69d8e3d41f9c4389cd55b", "sha256": "3e805e8ef7de4a99db1855aad5bb37dca2b42a30590128e174bac25858e2fc33" }, "downloads": -1, "filename": "tldp-0.7.13.tar.gz", "has_sig": false, "md5_digest": "66e4f10994d69d8e3d41f9c4389cd55b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 51390, "upload_time": "2016-05-13T16:31:08", "url": "https://files.pythonhosted.org/packages/9e/0a/ab517ecaa2d55e052a20233c65925b7e8159c489b958464ae935d4f5f7f4/tldp-0.7.13.tar.gz" } ] }