Commit Graph

407 Commits

Author SHA1 Message Date
Martin A. Brown 369d53eb35 be louder about the signature finding (or not) 2016-03-02 23:51:27 -08:00
Martin A. Brown 17772e948c call xmllint before doing any other work
important to validate the document before processing it;
Note!  Adding this feature flushed out a number of sketchy corners of a few of
our documents, but almost everything validated already.
2016-03-02 23:50:19 -08:00
Martin A. Brown 2094199462 pyflakes/pep8 fixes 2016-03-01 22:58:37 -08:00
Martin A. Brown ee88d451a8 pyflakes/pep8 fixes 2016-03-01 22:53:07 -08:00
Martin A. Brown 6e11db3957 add a test case for when user specifies only stem as arg 2016-03-01 22:46:57 -08:00
Martin A. Brown 7f26728ec1 say "source" documents instead of "total" (less confusing) 2016-03-01 22:41:16 -08:00
Martin A. Brown 9cb92dce7c build() only returns 0 (success) for all builds
before, the build() function lacked the logic to retain, and return that there
was a failure during the building of one of the documents; it now returns
a 1, which is passed directly to sys.exit(), if any single build fails
2016-03-01 22:21:29 -08:00
Martin A. Brown 97181b167a temporarily forgetting about other doctypes 2016-03-01 21:50:58 -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 efa2c9432a bump up verbosity of failed excute() to logger.info 2016-03-01 21:38:04 -08:00
Martin A. Brown bf99f97eba print out detail files in sorted order 2016-03-01 21:37:42 -08:00
Martin A. Brown 51250d4a47 add a tiny bit more verbosity to output detail 2016-03-01 20:17:23 -08:00
Martin A. Brown 4939347e85 adjust verbose output a tad 2016-03-01 20:12:01 -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 76d5886e54 fix skipping SCSI-2.4-HOWTO (bad stem/ext handling)
source document identification was skipping any documents which lived in their
own directory AND whose names had a dot; fixed and test support added
2016-03-01 19:49:28 -08:00
Martin A. Brown 08ef4c35bf only say we are removing, if removing 2016-03-01 18:38:58 -08:00
Martin A. Brown dd6cda7726 improve diagnostic error messages a little bit 2016-03-01 14:32:14 -08:00
Martin A. Brown dfa729b9e5 restore driver.py to functionality
after refactoring into a bunch of separate functions, the tests finally pass
again
2016-03-01 14:10:51 -08:00
Martin A. Brown ae89d6814a inverted logic; caught in testing code 2016-03-01 13:36:09 -08:00
Martin A. Brown 2feb454c18 create more functions for the driver.py
Rearrange the logic for handling the various arguments so that it is
less obnoxious; breaking it into functions makes it easier to read (and test).
2016-03-01 13:21:26 -08:00
Martin A. Brown 4ec06998b4 correct the labeling in the --help output 2016-03-01 13:21:11 -08:00
Martin A. Brown 7664d35090 use abspath before looking for documents 2016-03-01 11:35:06 -08:00
Martin A. Brown b54962900d allow case-insensitive matching for document types
The Python names for the document types are upper-cased and probably not
predictably named for the end user; allow a case-insensitive match when trying
to turn off building or listing for a particular document type.
2016-03-01 11:01:32 -08:00
Martin A. Brown aff926bb58 improve the handling of --skip 2016-03-01 10:30:18 -08:00
Martin A. Brown fe54af73a5 add default (system) configuration file 2016-03-01 09:04:45 -08:00
Martin A. Brown 8792b4c83a make individual assertions 2016-03-01 08:20:57 -08:00
Martin A. Brown 6e2041692e skip orphaned documents passed into build() 2016-03-01 07:31:52 -08:00
Martin A. Brown c4ee8366f9 reporting when skipping a dir/file in sourcedir 2016-03-01 07:31:19 -08:00
Martin A. Brown 388215186e adding main() as entry point 2016-03-01 07:15:35 -08:00
Martin A. Brown bb14a8cb51 allow file to be specified for summary
also allow the creation of an in-memory OutputDirectory object before build
2016-02-29 21:32:20 -08:00
Martin A. Brown dfc9855991 logic overhaul; abstract inventory creation
each function was creating its own inventory; this is not necessary
also, if a user wants only to build a single document, it is not necessary to
scan the entire source and output directory (small, but perceptible speedup to
the end user)
better checking of the various different possible argument types, since an
argument can be a filename, a status_class or a stem
2016-02-29 20:33:33 -08:00
Martin A. Brown 16885508da pep8/pyflakes 2016-02-29 20:33:14 -08:00
Martin A. Brown 363bba8a37 pep8/pyflakes 2016-02-29 20:32:36 -08:00
Martin A. Brown 56b1a027ca access inventory by status class name
create method getByStatusClass() and add testing
2016-02-29 18:03:16 -08:00
Martin A. Brown d807c02173 create and use general function arg_issourcedoc
a source document is defined as either a file with a known ending (e.g. .xml,
.sgml) or a directory name containing a file with the directory name plus a
known extension

create a small function (arg_issourcedoc), which takes a filename and returns
that filename if it is (possibly) a source document or, if it is a directory,
finds the main file in the directory which represents the main document
2016-02-29 17:59:49 -08:00
Martin A. Brown 17a60e367a make the action --options a mutually exclusive group 2016-02-29 17:56:41 -08:00
Martin A. Brown fa73f93080 messed up indentation 2016-02-29 11:37:13 -08:00
Martin A. Brown ddb5424941 get 100% coverage on the utils.py module 2016-02-29 11:32:01 -08:00
Martin A. Brown 6cdf0b65c1 explicitly stringify values at "input"
user can pass in a dict(); os.environ always contains string values, though,
so make sure that the dict() looks like what would be returned from os.environ
2016-02-29 10:48:03 -08:00
Martin A. Brown 98dd5ecdf8 no config validation yet
(and, I should not have used such terms inline in code)
2016-02-27 11:29:05 -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 fe520cd583 add logging logic to driver.py 2016-02-27 10:52:35 -08:00
Martin A. Brown 5f11427f38 remove pipe from script 2016-02-27 10:46:18 -08:00
Martin A. Brown 55cc7d5775 improve visual grouping of --help output
use argparse's ArgumentGroups to separate the argparse options for each of the
processors
2016-02-27 09:45:32 -08:00
Martin A. Brown eac92b5354 add the document stem to the __repr__ 2016-02-26 23:18:50 -08:00
Martin A. Brown 066f319156 change wrapped function name to "timing" for log entry 2016-02-26 23:18:24 -08:00
Martin A. Brown ee68a453d2 exit 1 and report extra args on CLI 2016-02-26 23:18:02 -08:00
Martin A. Brown 9137946a05 adding timing to a few methods 2016-02-26 23:02:00 -08:00
Martin A. Brown e6833f3989 and comma-separated in --verbose mode, too 2016-02-26 22:22:00 -08:00
Martin A. Brown 57055e582d better production of status list 2016-02-26 22:19:30 -08:00
Martin A. Brown 1c4f283482 handle the images and resources during publication 2016-02-26 22:18:02 -08:00
Martin A. Brown de514fd41b user can now specify file, stem or nothing for build 2016-02-26 19:07:05 -08:00
Martin A. Brown 39c4a13d88 repair logic for when there is no index.sgml 2016-02-26 19:04:51 -08:00
Martin A. Brown f739e365c0 do not bother generating index.sgml unless desirable/necessary 2016-02-26 18:15:27 -08:00
Martin A. Brown 9ffdd1df5d support SourceDocument as directory nam
allow the driver to use the new feature of sources.py and SourceDocument, so
user can refer to simply a directory as the document
2016-02-26 18:04:39 -08:00
Martin A. Brown e7c85fb2ec allow construction of SourceDocument with file or directory 2016-02-26 13:22:20 -08:00
Martin A. Brown f40ff2f915 unused function 2016-02-26 12:21:04 -08:00
Martin A. Brown f1bc2121a6 moving hook_build_{success,failure} to BaseDoctype 2016-02-26 12:08:05 -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 89d8f14231 pyflakes fix 2016-02-26 12:06:27 -08:00
Martin A. Brown 3a0bb65961 switch to the DAG model 2016-02-26 12:06:17 -08:00
Martin A. Brown 84477c0f45 move cleanup() method to BaseDoctype 2016-02-26 11:58:56 -08:00
Martin A. Brown 66f11e5f3b move cleanup() method to BaseDoctype 2016-02-26 11:58:43 -08:00
Martin A. Brown 5602ab68dd pep8 fixes 2016-02-26 11:56:28 -08:00
Martin A. Brown ca43130a6d spit out the contents of the STDERR, STDOUT and executed script if failure 2016-02-26 11:24:42 -08:00
Martin A. Brown c5e14d6ccf "all" is a good default for --list 2016-02-26 11:24:19 -08:00
Martin A. Brown 9d1f066085 better PDF generation logic; add cleanup()
try to make the PDF first with jw, but don't quit if that fails
fall back to PDF generation with dblatex and tell the user
cleanup any generated index.sgml (if we made it)
2016-02-26 11:22:00 -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 f112fc98d1 switch to the DAG model 2016-02-26 10:10:29 -08:00
Martin A. Brown 2b65730f25 adjusting logging verbosity 2016-02-26 01:07:09 -08:00
Martin A. Brown 4e76494cce rework the build sequence
adapt all of the methods to the new topological-sort driven technique
2016-02-26 01:02:16 -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 2d052e443e --skip option needs to have an empty list default 2016-02-26 00:30:05 -08:00
Martin A. Brown 65a80f1339 add __name__ to getLogger() calls 2016-02-25 12:29:55 -08:00
Martin A. Brown bb6fef9635 implement skipping logic in build (driver.py) 2016-02-25 12:29:38 -08:00
Martin A. Brown 44fc44d15a remove logging logic from utils 2016-02-25 12:29:12 -08:00
Martin A. Brown 595e610213 adding --skip feature 2016-02-25 12:28:41 -08:00
Martin A. Brown 859b7f893f pull logger straight from logging; use abs imports 2016-02-25 11:39:18 -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 b86f92f742 inspect/call the argparse method for each doctype 2016-02-25 10:38:38 -08:00
Martin A. Brown 81375b84c5 revert to name knowndoctypes (classes only)
no need to itemize knowndoctypemodules after moving the config_fragment
functions to the staticmethod argparse on each class
2016-02-25 10:37:45 -08:00
Martin A. Brown 7903d5f497 config_fragment becomes staticmethod in class
the config_fragment function becomes a part of each doctype class, allowing
better encapsulation of most/all document type handling logic
the config_fragment function becomes a staticmethod called argparse
2016-02-25 10:35:46 -08:00
Martin A. Brown 92a9042a74 add automatic detection of config_fragments 2016-02-25 09:58:11 -08:00
Martin A. Brown eb4e3d8c38 inspect for classes and modules 2016-02-25 09:51:17 -08:00
Martin A. Brown 03881d20de use case-insensitive sorting 2016-02-25 09:31:49 -08:00
Martin A. Brown db28d83480 decrease logging yak; remove unused functions 2016-02-24 09:26:23 -08:00
Martin A. Brown 89cb766ad7 clean up the stray index.sgml left hanging around 2016-02-23 23:30:07 -08:00
Martin A. Brown 4c7e92ca17 a wee bit more logging and better emphasis on the word SUCCESS 2016-02-23 22:54:57 -08:00
Martin A. Brown 7db6bb842e add an asterisk for log readers 2016-02-23 22:44:39 -08:00
Martin A. Brown fc2cdf975d switch all processors to generated shell scripts 2016-02-23 22:44:17 -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 8630157046 adapt to generated shellscript model 2016-02-23 21:59:47 -08:00
Martin A. Brown c6ebbf8a64 make a bit less noise in routine operation 2016-02-23 21:59:20 -08:00
Martin A. Brown 120d44ffa5 make a bit more noise when building and skipping 2016-02-23 21:58:56 -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 f1343deb00 try out a shellscript writing technique instead 2016-02-23 21:17:30 -08:00
Martin A. Brown 7da0670d23 add just a bit more warning bells 2016-02-23 21:17:01 -08:00
Martin A. Brown 83b998cb51 trying to write and execute a shell script 2016-02-23 21:16:44 -08:00
Martin A. Brown cf8c314981 --pubdir type checker should be an arg_isdirectory 2016-02-23 13:13:52 -08:00
Martin A. Brown 8c69e05f94 beefing up some testing for new functions 2016-02-23 13:10:10 -08:00
Martin A. Brown 2fef28a299 adjust the logging information 2016-02-23 12:25:54 -08:00
Martin A. Brown 6ad64ea0e0 add an arg_isfile 2016-02-23 12:18:46 -08:00
Martin A. Brown d5524f09ee move generic function into BaseDoctype 2016-02-23 12:18:33 -08:00
Martin A. Brown 80011bcf9d move generic function into BaseDoctype 2016-02-23 12:18:17 -08:00
Martin A. Brown 3788c4d265 get rid of the paths in mabrown home dir 2016-02-23 12:16:17 -08:00
Martin A. Brown 53c91eebe6 rename the hooks so they start with hook_ 2016-02-23 11:58:29 -08:00
Martin A. Brown a415484b5a separate operations by method and dependencies
use the generalized build sequence running supported by doctypes/common.py
2016-02-23 11:57:37 -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 1475cf7890 use arg_ checking functions; add build_precheck
rename platform_check to build_precheck
refer to arg_ checking functions from utils
ensure that just before each build we validate executables
avoid FD leakage by using with ... context for outf (stdout)
2016-02-23 11:05:28 -08:00
Martin A. Brown 11834a17cc initial work on supporting build verb 2016-02-23 11:05:04 -08:00
Martin A. Brown b4895a2e0b use arg_ checking functions from utils.py 2016-02-23 11:04:43 -08:00
Martin A. Brown 58246eb6e7 add config.py to the tldp package 2016-02-23 11:04:20 -08:00
Martin A. Brown 6c4fd88944 adding arg_* handlers; fix FD leakage in execute
fix FD leakage in function execute: must close stdout and stderr if
execute opens them (process logging in per-document logdir)
add functions arg_isloglevel, arg_isdirectory and arg_isexecutable
2016-02-23 11:02:36 -08:00
Martin A. Brown f9453185df deleting unnecessary platform.py file 2016-02-23 09:44:12 -08:00
Martin A. Brown 51fabb65d7 change platform to config 2016-02-23 09:43:27 -08:00
Martin A. Brown 13bb8d3129 remove reference to platform 2016-02-23 09:43:06 -08:00
Martin A. Brown 3a0ee539fa adding [%(default)s] to each argparse entry 2016-02-23 09:08:08 -08:00
Martin A. Brown 5508d1113b repair detail() and status() generation functions
and pass args into all driver functions
2016-02-23 09:00:27 -08:00
Martin A. Brown f567a0be13 add status_classes for user interaction 2016-02-23 08:59:56 -08:00
Martin A. Brown 04c10a6af9 refer to %(default)s; shorter lines 2016-02-23 08:59:37 -08:00
Martin A. Brown 7bb5e35aeb add detail method to source and output documents
the detail method produces some output listing about the
document and will soon include more verbosity
2016-02-23 08:44:16 -08:00
Martin A. Brown abb471c912 refer to status_classes and pep8 fix 2016-02-23 08:44:05 -08:00
Martin A. Brown 5dee57763c pep8 fix 2016-02-23 08:43:44 -08:00
Martin A. Brown d3be338b75 begin logic for user interaction in driver.py 2016-02-22 21:22:42 -08:00
Martin A. Brown 4fb18c8822 rename sources/outputs to singular; remember newer files 2016-02-22 21:22:17 -08:00
Martin A. Brown 01acf2dfa6 add a property/function for reporting missing files 2016-02-22 21:21:48 -08:00
Martin A. Brown c821eadac1 improve command-line utility; work out the kinks (before testing) 2016-02-22 21:21:24 -08:00
Martin A. Brown ce7f703929 itemize valid types for status codes
and standardize on name 'orphan' (not 'orphans' or 'orphaned')
assume that SourceCollection and OutputCollection keys are always sorted
2016-02-22 20:24:19 -08:00
Martin A. Brown b62b732a23 correct location of logging.debug message, suppress None in cfg 2016-02-22 20:23:59 -08:00
Martin A. Brown 25add163cb rely on LDPDocumentCollection 2016-02-22 20:02:12 -08:00
Martin A. Brown fb0001a397 adding commonal parent class LDPDocumentCollection
factored out the dict-like behaviour (and added sorting behaviour)
from SourceCollection and OutputCollection to LDPDocumentCollection
2016-02-22 20:00:24 -08:00
Martin A. Brown 6fe55dc912 and deal with the problem ofg None 2016-02-22 18:03:44 -08:00
Martin A. Brown b6edf39aeb try the loglevel before using it 2016-02-22 17:46:41 -08:00
Martin A. Brown 2087719782 removing extraneous sample invocations 2016-02-22 17:28:15 -08:00
Martin A. Brown 15fe8fc3b6 factor out --dump-cli and --dump-env logic into functions 2016-02-22 17:27:27 -08:00
Martin A. Brown f6eedfcb7b flesh out CLI options and add --loglevel option 2016-02-22 17:10:45 -08:00
Martin A. Brown 7486a26cc3 initial commit of main 'ldptool' driver program 2016-02-22 16:20:15 -08:00
Martin A. Brown 82f5b63006 make CascadingConfig behave more like ArgumentParser 2016-02-22 16:19:05 -08:00
Martin A. Brown cfd54d4524 pep8 fixes 2016-02-22 13:04:26 -08:00
Martin A. Brown 4e07f2a52f absolute imports (and move isdirectory to utils) 2016-02-22 13:04:16 -08:00
Martin A. Brown 0a32e87dfc moving isdirectory into utils 2016-02-22 13:04:03 -08:00
Martin A. Brown bfd07eb4d5 remove superlong opts, make --help output prettier 2016-02-22 12:55:35 -08:00
Martin A. Brown 8b7c4a574c adding the main config module for the application 2016-02-22 12:34:26 -08:00
Martin A. Brown 3f37d09fe9 add configurables and discovery of files
add argparse-style support to each doctype module, for path-configurables
also add the runtime discovery of files needed for document handling (e.g. XSL
and DSSSL files)
2016-02-22 12:32:35 -08:00
Martin A. Brown 468f0f6317 adding firstfoundfile function 2016-02-22 12:32:16 -08:00
Martin A. Brown c1c4b2b79c separate init and config resolution; dump configs
separate the initialization process from the resolution
of configurations
add logic to dump configuration file formatted outputs, as well
2016-02-22 12:30:34 -08:00
Martin A. Brown a959db5485 initial configuration snippets 2016-02-21 17:49:14 -08:00
Martin A. Brown 372ae734de adding some logic for repproducing received configurations 2016-02-21 17:48:46 -08:00
Martin A. Brown e7af014a73 initial commit of cascading config
this utility allows resolution of configuration data from multiple sources;
for example, 'compiled-in' defaults, system configuration file, user
configuration file, process environment and, of course, command-line options
2016-02-21 12:19:51 -08:00
Martin A. Brown a88451c124 report number of files involved 2016-02-20 20:10:35 -08:00
Martin A. Brown 19f01a0a4c begin refactoring of directory document handling 2016-02-19 00:55:53 -08:00
Martin A. Brown b1840b03bf record the 'broken' field in sdoc/odoc
and add function to list_broken (analogically appropriate)
2016-02-19 00:54:39 -08:00
Martin A. Brown f200c0efc2 add function stem_and_ext to the utils 2016-02-19 00:54:16 -08:00
Martin A. Brown d7fac8d65f move logic from SourceCollection to scansourcedirs
moving the source dir scanning logic into a function (in preparation for
further refactoring of single-file or entire-directory source document
detection)
adapting tests (by changing the name from SourceCollection to scansourcedirs).
no other tests required
added new test to ensure that an empty SourceCollection() returned as expected
2016-02-18 23:31:18 -08:00
Martin A. Brown 3ddb77b55e adding some docstrings 2016-02-18 23:07:53 -08:00
Martin A. Brown 6762743f66 docstrings for functions 2016-02-18 23:07:44 -08:00
Martin A. Brown f04b2dfbd0 pep8 fix 2016-02-18 23:07:14 -08:00
Martin A. Brown 1578e282cc ensure that statfiles includes directories
statfiles was not including directories; it does now
2016-02-18 21:55:56 -08:00
Martin A. Brown 88f518ede7 add docstrings and text to utils functions 2016-02-18 17:23:26 -08:00
Martin A. Brown 7d3843c535 adding a bunch of docstring docs 2016-02-18 13:58:53 -08:00
Martin A. Brown 28f7a8468c minor documentation fixes 2016-02-18 13:58:30 -08:00
Martin A. Brown 809ddc545b adding # -*- coding: utf8 -*- 2016-02-18 13:25:02 -08:00
Martin A. Brown bf768d0277 adding basic docstrings 2016-02-18 13:22:48 -08:00
Martin A. Brown 605b57a1ea sorted(), so dirs and docs are processed stably
use sorted() on the sourcedirs and the contents of each directory so that the
directories are always handled in order and the documents are also handled in
order
adjust logging also to refer to "Source collection dir" rather than just "dir"
2016-02-18 09:17:25 -08:00
Martin A. Brown 20ae6bd25c add stem to logging entries
for consistency, make sure that stem is included on logging lines
2016-02-18 09:16:45 -08:00
Martin A. Brown a34738301f removing extraneous logging entry 2016-02-18 09:16:37 -08:00
Martin A. Brown d643883e50 change name_index to name_indexhtml; adapt tests
also minor logging adjustments for clarity and consistency
2016-02-18 09:15:47 -08:00
Martin A. Brown 62198e5973 in execute, before Popen, ensure cmd[0] has +x
rename is_executable() to isexecutable()
adjust testing code to match change to execute()
2016-02-18 09:13:46 -08:00
Martin A. Brown 2550047d23 pep8/pyflakes corrections 2016-02-17 19:38:27 -08:00
Martin A. Brown ef355ad8fb add inventory category for broken outputs 2016-02-17 19:30:25 -08:00
Martin A. Brown d3b6ad8e56 add iscomplete property to OutputDirectory 2016-02-17 19:19:48 -08:00
Martin A. Brown ffc0ad6547 improve readability, parallelism of methods by inverting logic 2016-02-17 19:05:23 -08:00
Martin A. Brown 1039dea0e6 let the prebuild_hook call clean 2016-02-17 19:04:51 -08:00
Martin A. Brown eed25efbba simplify cleaning; add (unused) name_epub 2016-02-17 19:04:21 -08:00
Martin A. Brown f5a65cf843 put stem in logging like many other logging lines 2016-02-17 19:03:37 -08:00
Martin A. Brown fd3b931423 include hooks for prebuild and postbuild states 2016-02-17 18:31:51 -08:00
Martin A. Brown bc810dd36c deal with the ENOENT problem in statfiles() 2016-02-17 18:16:20 -08:00
Martin A. Brown a0de081099 minor logging tweaking 2016-02-17 17:56:42 -08:00
Martin A. Brown 54a8477a33 renaming to inventory.py (and affected tests) 2016-02-17 16:39:42 -08:00
Martin A. Brown c425c2a8e8 completed first round of testing of driver code 2016-02-17 13:50:55 -08:00
Martin A. Brown 2bcb55e2a0 flipping the stem/dirname arguments 2016-02-17 13:50:06 -08:00
Martin A. Brown 2b0b241019 adjusting format names 2016-02-17 13:49:33 -08:00
Martin A. Brown a8284f3afa repair mtime comparison logic
repair mtime comparison logic for source and output directories after
generalizing the statfiles() function in utils.py
add a __repr__ to the Inventory object
2016-02-17 12:04:37 -08:00
Martin A. Brown 46edc205e0 factor out the call to os.stat(); broken links 2016-02-17 11:31:08 -08:00
Martin A. Brown 9301a54ab2 switch to using statfiles 2016-02-17 11:19:48 -08:00
Martin A. Brown 515595cac9 improve statfiles, deprecate ill-conceived fileset
statfiles now returns a dict() of statinfo and can handle relative paths
2016-02-17 11:18:47 -08:00
Martin A. Brown f72583fca6 improve and generalize statfiles and getfileset
statfiles is the heavy lifter; call os.stat() while walking the directory
simplify getfileset; use the keys returned in the statinfo dict()
2016-02-17 10:17:19 -08:00
Martin A. Brown 01be89c949 pep8 fixes 2016-02-17 09:12:07 -08:00
Martin A. Brown c99dbefa92 shorter __repr__ can fit on one line 2016-02-17 08:35:53 -08:00
Martin A. Brown c1ccc544a3 adjust logic into an inventory object 2016-02-17 08:35:36 -08:00
Martin A. Brown bc1c154108 inital commit of driver file for handling the porcelain logic 2016-02-17 00:22:31 -08:00
Martin A. Brown dab2f1f8b1 adding support for documents to know their status 2016-02-17 00:17:49 -08:00
Martin A. Brown 8a1afb6e24 allow creation of empty OutputCollection; fixes
Allow creation of an empty OutputCollection so that the object can be handed
around in driver.py for higher-level document wrangling.
Also, repair one inobvious statement, thank you pep8/pyflakes
2016-02-16 23:43:07 -08:00
Martin A. Brown 23a5e40d52 shortening knowndoctypes to kdt 2016-02-16 23:42:57 -08:00
Martin A. Brown 6e3362b9aa a bunch of filesystem stat()ing functions 2016-02-16 23:42:22 -08:00
Martin A. Brown f17d164b52 allow creation of empty SourceCollection; fixes
Allow creation of an empty SourceCollection, which can be handed around in the
driver to allow for higher-level document wrangling
fix bad, always-failing directory check (thank you, testing)
clarify handling of documents living in a directory and the generation of the
fileset
2016-02-16 23:40:09 -08:00
Martin A. Brown f39237d307 removing commented block that lives in superclass, BaseDoctype 2016-02-16 23:39:56 -08:00