Commit Graph

61 Commits

Author SHA1 Message Date
Martin A. Brown 8a554a430d adding 2016 LDP copyright to each file 2016-04-29 11:02:02 -04:00
Martin A. Brown e268b80e84 remove "random" text from MD5SUMS file
remove the date/time and hostname from the MD5SUMS file (why did I ever think
that was a good idea?)
2016-04-15 07:43:29 -07:00
Martin A. Brown dccbab5b39 call the MD5 generation util function 2016-04-02 10:47:07 -07:00
Martin A. Brown 5530c8f38f and use the MD5SUMS location specified in the OutputDocument 2016-04-01 22:38:35 -07:00
Martin A. Brown 753774c5e9 compute and generate an MD5SUMS file for each source document 2016-04-01 22:19:25 -07:00
Martin A. Brown f2ef7d2184 support --script mode anywhere and don't chdir() 2016-03-24 09:00:20 -07:00
Martin A. Brown 3f92a7a95c everybody gets unicode_literals 2016-03-14 22:18:09 -07:00
Martin A. Brown dcb8b3a217 switch to codecs.open and expect UTF-8 data 2016-03-14 21:42:31 -07:00
Martin A. Brown 26de64a2bb stop leaking FDs when guessing doctypes 2016-03-14 20:32:42 -07:00
Martin A. Brown f7505627a5 pep8/pyflakes fixes 2016-03-10 11:17:09 -08:00
Martin A. Brown c214724fcb group methods a bit more by their similarity
and change naming slightly so log lines at loglevel INFO align
2016-03-10 10:25:39 -08:00
Martin A. Brown f0cb2c3dfe only try to remove files once 2016-03-10 08:49:03 -08:00
Martin A. Brown 46d16f4ccb complete the propagation of **kwargs 2016-03-09 20:41:18 -08:00
Martin A. Brown 94ab1ac5d2 pass **kwargs through all processor tools
adjust all processor tools so they take runtime parameters through **kwargs
2016-03-09 18:08:56 -08:00
Martin A. Brown ca8b8e211f minor cosmetic improvements to generated shell file 2016-03-08 09:11:09 -08:00
Martin A. Brown 814dfec181 pep8/pyflakes fixes 2016-03-07 12:12:34 -08:00
Martin A. Brown 76fd27d1fa pep8/pyflakes fixes 2016-03-07 12:10:49 -08:00
Martin A. Brown dfc20c5617 move directory-handling logic to the processor
In preparation for supporting a separate --builddir (allowing minimal
disruption of real output directory during rebuild) factor all output
directory handling logic into the main processor object (BaseDoctype).
Simplify the generate() method.
Centralize all pre-build logic in hook_build_prepare().
Remove all hook logic from the OutputDirectory.
2016-03-07 11:34:09 -08:00
Martin A. Brown fc4c83307f do not mkdir() if we are in --script mode 2016-03-07 10:01:26 -08:00
Martin A. Brown 99d6232259 simplify text in commented lines 2016-03-07 10:00:51 -08:00
Martin A. Brown f87458c461 rearranging and renaming build setup methods
in preparation for supporting a build-directory, moving the os.chdir() and the
copying of image files into tldp/doctypes/common.py and adding a few hooks in
the main logic for building
2016-03-07 09:50:22 -08:00
Martin A. Brown b30e2af282 require exact signature match; stop with .lower()
was comparing for case insensitive matches when locating signatures; probably
a bad idea; better to simply require an exact match
2016-03-07 09:11:35 -08:00
Martin A. Brown 4c01ae4af7 simplify topological dependency solution
This patch prepares the way for simplifying the topological sort solution for
the classes which implement the document building logic.  Formerly, each
doctype class had to import networx itself and the @depends decorator stuffed
the dependencies into a graph in the class variable.

Now, each method tracks its dependencies (same decorator trick), but the
topological sort is not computed until just before running the job.  This is
more flexible, more obvious, simpler and features less code replication.

The next commit or two will convert the remaining doctype classes to use this
techinque.
2016-03-05 17:04:45 -08:00
Martin A. Brown 92e7c8bc89 lowering verbosity on reporting tool/data detection 2016-03-04 07:58:03 -08:00
Martin A. Brown 9a5bd5fd05 scripts look stupid without a final newline 2016-03-03 23:45:05 -08:00
Martin A. Brown 0ee742b64b add internal support for dumping shellscript
added support to the BaseDoctype class so that it can dump a script instead of
executing the script
2016-03-03 11:22:09 -08:00
Martin A. Brown 369d53eb35 be louder about the signature finding (or not) 2016-03-02 23:51:27 -08:00
Martin A. Brown d28460aaff bump up verbosity of failed excute() to logger.info 2016-03-01 21:38:16 -08:00
Martin A. Brown 17ffc0434f make the sought text more obvious in logging output 2016-03-01 19:51:19 -08:00
Martin A. Brown 8792b4c83a make individual assertions 2016-03-01 08:20:57 -08:00
Martin A. Brown 36e92b83d9 perform the processor prebuild check first
it is smarter to perform the non-destructive check first, rather than blowing
away the output directory and then reporting that it is impossible to rebuild
the document output tree
2016-02-27 11:13:58 -08:00
Martin A. Brown eac92b5354 add the document stem to the __repr__ 2016-02-26 23:18:50 -08:00
Martin A. Brown 9137946a05 adding timing to a few methods 2016-02-26 23:02:00 -08:00
Martin A. Brown 80d692efba massive simplification of generate() method
move hook_build_success() and hook_build_failure() into BaseDoctype;
subclasses can always override, if need be
2016-02-26 12:06:34 -08:00
Martin A. Brown 66f11e5f3b move cleanup() method to BaseDoctype 2016-02-26 11:58:43 -08:00
Martin A. Brown 06194feba8 build sequence resilience/terseness) improvements
it would be a problem if there's no self.required; don't protect against it
be clearer about which methods in which class are being called (debug)
do not fail with AssertionError if missing a tool, just skip to next doc
always call the processor AND output hook_build_{failure,success} methods
2016-02-26 11:19:30 -08:00
Martin A. Brown 62f96f3bcb add a postamble, too (extra newlines, only) 2016-02-26 10:10:45 -08:00
Martin A. Brown 2b65730f25 adjusting logging verbosity 2016-02-26 01:07:09 -08:00
Martin A. Brown 74bdfcd44f improve logging a little bit 2016-02-26 01:00:43 -08:00
Martin A. Brown 85b2b15c3b build a graph of method dependencies
to allow individual subclasses of BaseDoctype to be able to implement as many
methods as they want to create document outputs, the BaseDoctype now
implements a graph of method dependencies.  The sequence of tasks is
determined by applying the @depends decorator to the methods in the
heavy-lifting classes which actually implement the document procsesing.

For example, the Linuxdoc class will probably have about 6 or 7 methods to
generate the outputs, whereas, the more complex DocbookSGML class will have at
least two or three more to handle the build-time index-generation (if
necessary for the document).
2016-02-26 00:30:37 -08:00
Martin A. Brown 65a80f1339 add __name__ to getLogger() calls 2016-02-25 12:29:55 -08:00
Martin A. Brown e74197eb01 pull logger straight from logging; add BaseDoctype
rely directly on the logging module directly instead of through tldp.utils
add the BaseDoctype to all of the modules (even though not all are
implemented)
2016-02-25 11:37:14 -08:00
Martin A. Brown ce359dfa32 generic method shellscript() cannot test if job is done 2016-02-23 22:37:59 -08:00
Martin A. Brown ad2a1763ec move method shellscript into BaseDoctype
and fix a few errors in the generated DocBook XML 4.x script
2016-02-23 21:58:03 -08:00
Martin A. Brown 7da0670d23 add just a bit more warning bells 2016-02-23 21:17:01 -08:00
Martin A. Brown 80011bcf9d move generic function into BaseDoctype 2016-02-23 12:18:17 -08:00
Martin A. Brown df75f051db generalizing build sequence logic
ready for use in first doctype (linuxdoc)
2016-02-23 11:56:58 -08:00
Martin A. Brown 08df7acbe2 rework tracking of success vector 2016-02-23 11:08:04 -08:00
Martin A. Brown 51fabb65d7 change platform to config 2016-02-23 09:43:27 -08:00
Martin A. Brown 809ddc545b adding # -*- coding: utf8 -*- 2016-02-18 13:25:02 -08:00