Commit Graph

706 Commits

Author SHA1 Message Date
Martin A. Brown 4fbc08c1be adjust to deal with new action --publish 2016-03-07 18:56:07 -08:00
Martin A. Brown 88f07a1c69 switch from attribute "type" to "doctype" 2016-03-07 18:55:47 -08:00
Martin A. Brown 9dd87b4d7a add an empty entry for "working" attribute 2016-03-07 18:54:32 -08:00
Martin A. Brown bd7b08ce23 OK, so a can be anything, not just a directory 2016-03-07 18:54:08 -08:00
Martin A. Brown 87e1161212 add support to driver for --builddir logic
create the --builddir before building
if --publish, swap the built directory with the output directory
then --remove the old content
2016-03-07 18:52:13 -08:00
Martin A. Brown b2a8ac28d2 adding an empty attribute called "build" 2016-03-07 15:04:54 -08:00
Martin A. Brown 8c6ceba912 adding a function to swap directories 2016-03-07 15:04:16 -08:00
Martin A. Brown 5f24879875 adding a function to swap directories 2016-03-07 15:04:04 -08:00
Martin A. Brown 8064ef71e8 changed the error message 2016-03-07 13:54:55 -08:00
Martin A. Brown 015b3459f4 more refactoring, heading toward --publish
created function removeOrphans() and removeUnknownDoctypes()
and the function runbuild() ugly name; which is called from all three of the
main work functions, build(), publish() and script()
2016-03-07 13:50:15 -08:00
Martin A. Brown a4331ac48e fix the invocation of summary() in the test 2016-03-07 13:24:40 -08:00
Martin A. Brown dab1fc6bbc abstract error-handling; prepare for --publish
abstract the error-handling away from the one-large run() function into each
of the functions (show_doctypes, show_statustypes, detail, summary, etc.)
add the function publish(), which will call build() and ensure success before
running any of the publishing
2016-03-07 13:21:38 -08:00
Martin A. Brown 30d44a75f8 better refactoring of the large "run" method 2016-03-07 12:39:22 -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 517a29b4a8 switch to using os.EX_OK for sys.exit()
also more preparation for switching to use --builddir
2016-03-07 12:02:25 -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 c390e71b4a removing all chdir() and resource copying logic
the logic for making sure to chdir() into the build directory has been
sequestered into doctypes/common.py (and output.py); additionally, it is
smarter to put the resource copying logic, there, as well
2016-03-07 10:20:55 -08:00
Martin A. Brown 98b19ac5ce do not mkdir() if we are in --script mode 2016-03-07 10:01:42 -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 7308f331ff parameterize the --resources to copy at build time 2016-03-07 09:39:34 -08:00
Martin A. Brown 9c8746e486 and report on the output directory, if present 2016-03-07 09:15:17 -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 853aec028b a bit more info, when --verbose 2016-03-07 09:04:25 -08:00
Martin A. Brown 59bcafb874 add --publish option
in preparation for separating --publish and --build, add the option
2016-03-07 09:03:57 -08:00
Martin A. Brown a002fd926d add --publish option
in preparation for separating --publish and --build, add the option
2016-03-07 09:00:15 -08:00
Martin A. Brown 0e955fce06 check --builddir/--pubdir on same filesystem
ensure that both the --builddir and the --pubdir are on the same filesystem
so that we can (reasonably) safely os.rename() after the build is done
2016-03-07 08:39:34 -08:00
Martin A. Brown bfc8328181 be just a touch more informative about what went wrong 2016-03-07 08:13:50 -08:00
Martin A. Brown 88ee1bf5fa support new option --builddir 2016-03-07 08:06:17 -08:00
Martin A. Brown 0889c79830 adjust the TODO list 2016-03-06 14:52:43 -08:00
Martin A. Brown d1d5b13989 remove one item; add two more 2016-03-06 11:40:20 -08:00
Martin A. Brown e6b6ea7b40 add support for --doctypes and --statustypes
provide CLI-discoverable listing of supported source document types and status
types
2016-03-06 11:29:13 -08:00
Martin A. Brown bfd6c1a0a1 tldp/doctypes/docbook4xml.py
correct dependency listings for validated source removal
2016-03-05 19:24:05 -08:00
Martin A. Brown 760cd392f4 use newer, simpler topo-sort for dependency tracking 2016-03-05 17:08:33 -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 7d287b44e5 the required items should say asciidoc_ 2016-03-05 15:58:26 -08:00
Martin A. Brown 428e577c0d try not to go over 80 chars (attempt #3) 2016-03-04 21:44:50 -08:00
Martin A. Brown cec2730e9a and add a2x in the software dependency list 2016-03-04 21:34:59 -08:00
Martin A. Brown 93fb5b3356 quote that argument 2016-03-04 21:34:44 -08:00
Martin A. Brown d8f14c9e55 initial support for asciidoc format 2016-03-04 17:10:30 -08:00
Martin A. Brown f617cca3d3 add support for Asciidoc detection 2016-03-04 17:10:21 -08:00
Martin A. Brown 50af88ebde switch to os.path.exists(), prep for chunked is own subdir 2016-03-04 17:07:36 -08:00
Martin A. Brown 1dbc0e5f8b always log the contents of the tldp-build-* files in --debug mode 2016-03-04 17:06:55 -08:00
Martin A. Brown 0815c3748f adding package_data, version to 0.4.8 2016-03-04 13:51:47 -08:00
Martin A. Brown 4a8a7aad7f a few more TODO items 2016-03-04 13:51:32 -08:00
Martin A. Brown 812bde4595 bumping version (should make this a generated file) 2016-03-04 13:50:27 -08:00
Martin A. Brown bf3d559fc6 but do not set system default for sourcedir or pubdir 2016-03-04 13:50:00 -08:00
Martin A. Brown 7c3c3589ff improve the stock supplied defaults 2016-03-04 13:48:52 -08:00