dpanalyzer Wiki
postprocessing tool for Project Gutenberg Distributed Proofreaders
Status: Alpha
Brought to you by:
ensegre
usage: dpanalyzer.py [options] infile
Reports paragraph structure of DP-formatted text
positional arguments:
infile input file, dp formatted
optional arguments:
-h, --help show this help message and exit
-v, --version show program's version number and exit
-i INPUT_ENCODING, --input_encoding INPUT_ENCODING
Encoding of the input file (python 3 only). Must be an
encoding name understood by python. Default: latin-1
for DP-int files; use utf-8 for DPcanada.
-b, --no-bracket_check
Don't check the nesting of []. Checking it ensures the
correct tagging when notes or figures contain text
which ends by ] at end of line (e.g. [Greek:],
[**notes]), but may cause problems if the text has
lone closing ].
-r, --report_lines report parsed line content (pass 1)
-c, --report_continuing_paragraphs
report about paragraphs continuing across page breaks,
interrupted by footnotes and figures
-f, --fnote_symbols report symbols used for footnote references, compared
with those found in footnote bodies
-n, --report_page_numbers
report original image file names and new labels
-V, --verbose print more things for debug
-s, --leave_hyphen_star
leaves -* in hyphenated words rejoined across
paragraphs interrupted by a page break
-p NUMBERING_LIST, --page_number NUMBERING_LIST
renumbers pages according to the string given in the
following. The numbering string can contain any
combination of: arabic numbers and ranges (numbers
separated by :), eventually preceded by r or R
(meaning lowercase or uppercase roman numbers), h or H
(hebrew numbers, using initial vs. final version of
the last letter), or B for blank pages. Example: -p
r1:32,B,1:51,B,52:336 for a book with a preface on
pages i-xxxii, a blank page before the text, and 336
text pages with an unnumbered plate between page 51
and 52. The numeration is silently extended to pages
beyond the specification, with the last style
indicated. Default is arabic numbering starting from
1.
-T, --display_toc print on stdout the list of chapter and pages where
they begin
-L, --display_lof print on stdout the list of figures and pages where
they occur
-o {dpredux,latex,html,pgrst}, --output_format {dpredux,latex,html,pgrst}
(planned) format of the output generated. Only html so
far
-F {inline,paragraph,chapter,end}, --footnote_placement {inline,paragraph,chapter,end}
placement of the footnotes in html output (and latex
possibly): embed in text (planned), or move them after
the paragraph they are referenced to, at the end of
the chapter or at the end of the book (default).
-S {progressive,note-page,page-note,chapter-note,chicago},
--footnote_labels {progressive,note-page,page-note,chapter-note,chicago}
format of the labels to be generated for footnotes
-P PREAMBLE_FILE, --preamble PREAMBLE_FILE
use alternate PREAMBLE_FILE for latex, html instead of
the default preamble