Commit 5596f81d authored by Jeff Licquia's avatar Jeff Licquia Committed by Fabian Wolff

Import Debian changes 2.6-1

doclifter (2.6-1) unstable; urgency=low

  * New upstream version...
  * ...which fixes python2.6 issues differently.  Undo patch in NMU.
  * Switch to 3.0 (quilt) source format, undoing quilt integration
    in NMU.
  * Update Standards-Version and fix lintian warnings.
  * Tweak manlifter so it works without python-profiler.
  * Add -o option to manlifter, to match the man page.  Closes: #580243.
  * Update copyright to reflect GPL -> BSD switch.
  * Add Recommends for groff-base to get GNU eqn.
parents d6e807b6 f8e3ce4d
This diff is collapsed.
This diff is collapsed.
# Makefile for the doclifter project
VERS=$(shell sed <doclifter.spec -n -e '/Version: \(.*\)/s//\1/p')
VERS=2.6
MANDIR=/usr/share/man/man1
BINDIR=/usr/bin
DOCS = README COPYING TODO BUGS doclifter.spec \
DOCS = README COPYING TODO BUGS \
doclifter.xml doclifter.1 manlifter.xml manlifter.1
TEST = docliftertest1.man test.troff
SOURCES = doclifter manlifter Makefile $(DOCS) $(TEST)
SOURCES = doclifter manlifter Makefile $(DOCS) $(TEST) docbook-duck.png
all: doclifter-$(VERS).tar.gz
......@@ -35,5 +35,21 @@ doclifter-$(VERS).tar.gz: $(SOURCES)
rm -fr doclifter-$(VERS)
ls -l doclifter-$(VERS).tar.gz
dist: doclifter-$(VERS).tar.gz doclifter.html manlifter.html
ln -sf doclifter-$(VERS).tar.gz doclifter.tar.gz
test:
doclifter -v docliftertest1.man
pychecker:
@echo "Expect: Local variable (lst) not used"
@ln -f doclifter doclifter.py
@-pychecker --only --quiet --limit 50 doclifter.py
@rm -f doclifter.py doclifter.pyc
dist: doclifter-$(VERS).tar.gz
clean:
rm -f doclifter.html manlifter.html doclifter.1 manlifter.1 *.tar.gz
rm -f *.pyc docliftertest.xml
rm -f SHIPPER.* index.html
release: doclifter-$(VERS).tar.gz doclifter.html manlifter.html
shipper -u -m -t; make clean
......@@ -7,16 +7,13 @@ a really good job requires human polishing. This tool aims to do everything
that can be mechanized, and to preserve any troff-level information that might
have structural implications in XML comments.
This tool does most of the hard parts, but not all. TBL tables
diagrams are translated into DocBook table markup and and PIC into
SVG, but EQN is not translated.
This tool does the hard parts. TBL tables are translated into DocBook
table markup, PIC into SVG, and EQN into MathML (relying on pic2svg
and GNU eqn for the last two).
Test loads are included in the distribution. The code has been tested
in about the most brutal possible way; it has been run against every
single man page in all sections of a full Fedora Core installation.
It lifts over 95% of these pages without requiring any hand-hacking.
There is a detailed change log in the RPM spec file.
Eric S. Raymond
November 2003
There is a detailed change log in the NEWS file.
Bugs:
* Docbook 5 translation is incomplete; inclusions won't work,
entities are untested.
* I haven't come up with a reliable way to distinguish command synopses
from stuff that should be treated as plain text. This has a couple
of consequences:
......@@ -17,20 +20,5 @@ Bugs:
* CA.pl.1ssl -- CA.pl is not properly tagged as a command.
Edge cases in which we could do better --
* sox(1), soxmix(1)
These are totally hosed.
Other things to do:
* Stereotyped .in/ta/ti pattern in emacs.1
* Stereotyped .in patterns under DIAGNOSTICS in compress.1.
Big projects:
* Translate EQN to MathXML.
See the BUGS file for other, more minor problems mainly due to bad markup.
doclifter (2.6-1) unstable; urgency=low
* New upstream version...
* ...which fixes python2.6 issues differently. Undo patch in NMU.
* Switch to 3.0 (quilt) source format, undoing quilt integration
in NMU.
* Update Standards-Version and fix lintian warnings.
* Tweak manlifter so it works without python-profiler.
* Add -o option to manlifter, to match the man page. Closes: #580243.
* Update copyright to reflect GPL -> BSD switch.
* Add Recommends for groff-base to get GNU eqn.
-- Jeff Licquia <licquia@debian.org> Sat, 19 Feb 2011 17:17:25 -0500
doclifter (2.3-2.1) unstable; urgency=low
* Non-maintainer upload.
......
......@@ -5,13 +5,14 @@ Maintainer: Jeff Licquia <licquia@debian.org>
Homepage: http://www.catb.org/~esr/doclifter/
Vcs-Bzr: http://bzr.licquia.org/doclifter/debian/
Vcs-Browser: http://bzr.licquia.org/loggerhead/doclifter/debian/
Build-Depends: debhelper (>= 5), quilt
Standards-Version: 3.7.3
Build-Depends: debhelper (>= 5)
Standards-Version: 3.9.1
Package: doclifter
Architecture: all
Depends: python (>=2.2)
Recommends: plotutils
Depends: python (>=2.2), ${misc:Depends}
Recommends: plotutils, groff-base
Suggests: python-profiler
Description: Convert troff to DocBook
Lifting documents from presentation level to semantic level is hard,
and a really good job requires human polishing. This tool aims to do
......
......@@ -5,10 +5,37 @@ It was downloaded from http://www.catb.org/~esr/doclifter/
Upstream Author: Eric S. Raymond
Copyright (from the doclifter script):
Copyright (from COPYING in the source):
By Eric S. Raymond, copyright 2002, 2006.
Released as open source the Gnu General Public License.
COPYRIGHTS
On Debian GNU/Linux systems, the complete text of the GNU General
Public License can be found in `/usr/share/common-licenses/GPL'.
Copyright (c) 2002, 2003, 2007, and 2010 by Eric S. Raymond.
BSD LICENSE
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.<P>
Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.<P>
Neither name of the doclifter project nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Description: Add -o to manlifter
The manlifter man page refers to a -o option, but manlifter itself
doesn't recognize it. This patch adds the option.
Author: Jeff Licquia <licquia@debian.org>
Last-Update: 2011-02-19
--- doclifter-2.6.orig/manlifter 2011-02-19 16:20:58.000000000 -0500
+++ doclifter-2.6/manlifter 2011-02-19 16:22:15.000000000 -0500
@@ -574,6 +574,8 @@
mandir = val
elif (switch == '-m'): # Make a patch from the last fetched page
makepatch = True
+ elif (switch == '-o'): # Specify output directory
+ outdir = val
elif (switch == '-p'): # Specify patch directory
patchdir = os.path.abspath(val)
elif (switch == '-P'):
@@ -660,7 +662,7 @@
finally:
os.system("rm -f doclifter_test%s.py*" % os.getpid())
# Gather options
- (options, arguments) = getopt.getopt(sys.argv[1:], "d:ef:hI:mp:Pqs:Svw")
+ (options, arguments) = getopt.getopt(sys.argv[1:], "d:ef:hI:mo:p:Pqs:Svw")
# Do the real work
if "-P" in sys.argv and hotshot:
prof = hotshot.Profile("manlifter.prof")
Description: Remove dependency on the Python profiler
This patch removes the dependency on the Python profile present in
manlifter, which keeps doclifter out of contrib.
Author: Jeff Licquia <licquia@debian.org>
Forwarded: not-needed
Last-Update: 2011-02-19
--- doclifter-2.6.orig/manlifter
+++ doclifter-2.6/manlifter
@@ -4,7 +4,10 @@
# Sees all files in section 1 through 8 by default.
import sys, os, getopt, signal, time, re, commands, cStringIO, stat
-import hotshot, hotshot.stats
+try:
+ import hotshot, hotshot.stats
+except ImportError:
+ hotshot = False
mandir = "/usr/share/man"
patchdir = os.path.abspath("prepatch")
@@ -659,7 +662,7 @@ if __name__ == "__main__":
# Gather options
(options, arguments) = getopt.getopt(sys.argv[1:], "d:ef:hI:mp:Pqs:Svw")
# Do the real work
- if "-P" in sys.argv:
+ if "-P" in sys.argv and hotshot:
prof = hotshot.Profile("manlifter.prof")
prof.runcall(doclifter_driver, options, arguments)
prof.close()
# Description: apply fixes for python2.6:
# - remove import of obsolete package sre (replaced it with re)
# - rename 'with' variable as 'with_var' and 'as' as 'as_var'
# - replace 'string' exception with an Exception subclass object
# Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=580246
# Origin: http://patches.ubuntu.com/d/doclifter/doclifter_2.3-2ubuntu1.patch
# Author: Mathieu Comandon <strycore@gmail.com>
# Author: Serafeim Zanikolas <sez@debian.org>
--- a/doclifter
+++ b/doclifter
@@ -126,7 +126,7 @@
$Id: doclifter,v 1.1336 2006/12/22 14:41:03 esr Exp $
"""
# Requires Python 2.2a
-import sys, os, glob, re, sre, string, exceptions, copy, tempfile, time, pprint
+import sys, os, glob, re, string, exceptions, copy, tempfile, time, pprint
# This is a speed hack recommended by Armin Rigo. It cuts runtime by about 33%
# and makes it possible for psyco 1.2 to reduce runtime another 33%.
@@ -349,6 +349,10 @@
self.message = message
self.retval = retval
+class DropoutException(exceptions.Exception):
+ "Hack to escaope out of a depply nested block."
+ pass
+
class SemanticHintsRegistry:
"Represent all the semantic information gathered during a run."
def __init__(self):
@@ -370,7 +374,7 @@
text = re_compile(with_hi).sub(r"<%s>\1</%s>"%(tag,ender),text)
text = re_compile(r"\b("+token+")\b").sub(r"<%s>\1</%s>" % (tag, ender), text)
pass
- except sre.sre_compile.error:
+ except re.error:
pass
return text
def read(self, input):
@@ -385,8 +389,8 @@
if line.startswith('.\\" | '):
print line
# Someday we'll have more declarations
- (mark, token, as, markup) = line[5:].split()
- if mark != "mark" or as != "as":
+ (mark, token, as_var, markup) = line[5:].split()
+ if mark != "mark" or as_var != "as":
continue
self.post(token, markup)
def __repr__(self):
@@ -1252,8 +1256,8 @@
for j in range(len(tbl[tbli])):
if tbl[tbli][j][0] == '^':
lastheaderline = tbli - 2;
- raise "dropout"
- except "dropout":
+ raise DropoutException()
+ except DropoutException:
pass
if lastheaderline < 0 and rowsep:
# Our first fallback is the location of the first ruler line.
@@ -6370,8 +6374,8 @@
return result
def styleargs(self, args, tag, attribute="", prefix=""):
return self.process_punct(args, lambda x: self.stylehook(x, tag, attribute, prefix), 1)
- def replacemacro(self, args, with):
- return self.process_punct(args, lambda x: [with] + x, 1)
+ def replacemacro(self, args, with_var):
+ return self.process_punct(args, lambda x: [with_var] + x, 1)
def eval(self, args):
"Evaluate a macro, returning a list."
if args[0][0] == '.':
python26-fixes.patch
profiler
manlifter-outdir
......@@ -2,16 +2,14 @@
#export DH_VERBOSE=1
include /usr/share/quilt/quilt.make
build: build-stamp
build-stamp: patch
build-stamp:
dh_testdir
# Nothing needs to be build. We *could* depends on xmlto and
# regenerate the docs.
touch build-stamp
clean: unpatch
clean:
dh_testdir
dh_testroot
rm -f build-stamp configure-stamp
......
version=2
http://catb.org/~esr/doclifter/doclifter-(.*)\.tar\.gz
version=3
http://www.catb.org/~esr/doclifter/doclifter-(.*)\.tar\.gz
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -21,8 +21,6 @@ your formatter is generating a correct beginning-of-body even after
the section title, and an end-of-body event at the end of the
paragraph.
.PP
The -a in this sentence should get decorated with an option tag.
.PP
This is an ordinary paragraph started by a \fB.PP\fR macro.
A second line illustrates the effect of filling.
.PP
......@@ -225,7 +223,7 @@ Now we'll test PIC translation to SVG.
.PS
box "box"
.PE
This line tests recognition of \v'-.4m'\fIsuperscripting\*(ic\fR\v'.4m')
This line tests recognition of \v'-.4m'\fIsuperscripting\fR\v'.4m')
,br
This line tests recognition of the \uother\d superscript idiom.
......
This diff is collapsed.
'\" t
.\" Title: manlifter
.\" Author:
.\" Generator: DocBook XSL Stylesheets v1.73.2 <http://docbook.sf.net/>
.\" Date: 05/27/2008
.\" Manual:
.\" Source:
.\" Author: [see the "Author" section]
.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
.\" Date: 11/24/2010
.\" Manual: Documentation Tools
.\" Source: manlifter
.\" Language: English
.\"
.TH "MANLIFTER" "1" "05/27/2008" "" ""
.TH "MANLIFTER" "1" "11/24/2010" "manlifter" "Documentation Tools"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
manlifter \- mass-conversion script and test harness for doclifter
manlifter \- mass\-conversion script and test harness for doclifter
.SH "SYNOPSIS"
.HP 10
\fBmanlifter\fR [\-d\ \fIoption\fR] [\-e] [\-f\ \fIlistfile\fR] [\-h] [\-I\ \fImandir\fR] [\-o\ \fIoutdir\fR] [\-p\ \fIpatch\-directory\fR] [\-q] [\-v] [\-s\ \fIsection\fR] \fIname\fR...
.HP 10
.HP \w'\fBmanlifter\fR\ 'u
\fBmanlifter\fR [\-d\ \fIoption\fR] [\-e] [\-f\ \fIlistfile\fR] [\-h] [\-I\ \fImandir\fR] [\-m] [\-o\ \fIoutdir\fR] [\-p\ \fIpatch\-directory\fR] [\-P] [\-q] [\-v] [\-s\ \fIsection\fR] \fIname\fR...
.HP \w'\fBmanlifter\fR\ 'u
\fBmanlifter\fR [\-S]
.SH "DESCRIPTION"
.PP
......@@ -25,7 +42,7 @@ is a script that sequences
to convert an entire manual\-page tree to XML\-Docbook, optionally also generating HTML from the XML\&. Another use is as a torture\-test tool for doclifter; it logs errors to standard output and collects timings\&.
.PP
Called without any file arguments, manlifter tries to convert all man pages installed on the system, placing the resulting xml files under
\fIxmlman\fR
xmlman
in the current directory\&. Each successfully translated page foo\&.N is copied to manN/foo\&.xml beneath the output directory, regardless of what source directory it came from\&.
.PP
For each source file examined, if the destination file exists and is newer than the source, the conversion is skipped; thus, incremental runs of
......@@ -46,10 +63,10 @@ developers for debugging that program\&.
In either of the above cases,
\fBmanlifter\fR
will uncompress the file if it has a
\fI\&.gz\fR,
\fI\&.bz2\fR
\&.gz,
\&.bz2
or
\fI\&.Z\fR
\&.Z
suffix on the name\&.
.PP
Options are as follows:
......@@ -76,31 +93,47 @@ Normally, run doclifter on the files named by each line in the argument file\&.
\-h
.RS 4
Also generate HTML translations into the output directory\&. DocBook citerefentry markup is transformed to hyperlinks in the directory, and a contents listing is generated to
\fIindex\&.html\fR\&.
index\&.html\&.
.RE
.PP
\-I
.RS 4
Specify the root of the manual\-page tree\&. By default this is
\fI/usr/share/man\fR\&.
/usr/share/man\&.
.RE
.PP
\-m
.RS 4
Make a patch to correct the last page fetched\&. It is copied, an editor is called on the copy (using tghe environment variable
\fB$EDITOR\fR), and then
\fBdiff\fR(1)
is called to drop the patch in the prepatch directory\&. Fails with an error if such a patch is already present\&.
.RE
.PP
\-o
.RS 4
Set the output directory into which XML\-DocBook translations will be dropped\&. By default this is
\fIxmlman\fR
xmlman
under the current directory in batch mode, or the current directory otherwise\&.
.RE
.PP
\-p
.RS 4
Interpret the argument as the name of a patch directory (the default name is
\fIprepatch\fR
prepatch
under the current directory)\&. Each file named
\fIfoo\&.N\&.patch\fR
foo\&.N\&.patch
is interpreted as a patch to be applied to the manual page foo(N) before doclifter translates it\&.
.RE
.PP
\-P
.RS 4
Enable profiling using the Python hotshot module; this is only useful for tuning
doclifter
so it runs faster\&. Raw data is written to
manlifter\&.prof, and a digested report is appended to the log on standard output\&. Warning: the raw data files can become huge, and the postprocessing for report generation can take as long as the actual processing (or longer!)\&.
.RE
.PP
\-q
.RS 4
Normally, pass the \-q (quiet) option to each doclifter call\&. In error\-filter mode, return a list of files on which translation failed\&.
......@@ -131,7 +164,7 @@ emits a logfile to standard output\&. The file begins with a timestamp line and
was run\&.
.PP
The first line of each stanza beguns with "! ", followed by the pathname of the source manual pager, followed by "=" and the return status of doclifter run on that file\&. Following that is a space and
\fBdoclifter\fR\'s runtime in seconds\&.
\fBdoclifter\fR\*(Aqs runtime in seconds\&.
.PP
This initial line may be followed by information messages and the error output of the doclifter run\&.
.PP
......@@ -152,7 +185,7 @@ HTML generation is painfully slow\&. Unfortunately, there is little we can do to
.SH "AUTHOR"
.PP
Eric S\&. Raymond
<esr@thyrsus\&.com>
esr@thyrsus\&.com
.PP
There is a project web page at
\fIhttp://www\&.catb\&.org/~esr/doclifter/\fR\&.
\m[blue]\fBhttp://www\&.catb\&.org/~esr/doclifter/\fR\m[]\&.
......@@ -5,6 +5,10 @@
<refmeta>
<refentrytitle>manlifter</refentrytitle>
<manvolnum>1</manvolnum>
<refmiscinfo class='date'> Sun Nov 28 2004</refmiscinfo>
<refmiscinfo class='source'>manlifter</refmiscinfo>
<refmiscinfo class='productname'>manlifter</refmiscinfo>
<refmiscinfo class='manual'>Documentation Tools</refmiscinfo>
</refmeta>
<refnamediv id='name'>
<refname>manlifter</refname>
......@@ -19,8 +23,10 @@
<arg choice='opt'>-f <replaceable>listfile</replaceable></arg>
<arg choice='opt'>-h</arg>
<arg choice='opt'>-I <replaceable>mandir</replaceable></arg>
<arg choice='opt'>-m</arg>
<arg choice='opt'>-o <replaceable>outdir</replaceable></arg>
<arg choice='opt'>-p <replaceable>patch-directory</replaceable></arg>
<arg choice='opt'>-P</arg>
<arg choice='opt'>-q</arg>
<arg choice='opt'>-v</arg>
<arg choice='opt'>-s <replaceable>section</replaceable></arg>
......@@ -110,6 +116,15 @@ the directory, and a contents listing is generated to
this is <filename>/usr/share/man</filename>.</para></listitem>
</varlistentry>
<varlistentry>
<term>-m</term>
<listitem><para>Make a patch to correct the last page fetched. It is
copied, an editor is called on the copy (using tghe environment
variable <envar>$EDITOR</envar>), and then
<citerefentry><refentrytitle>diff</refentrytitle><manvolnum>1</manvolnum></citerefentry>
is called to drop the patch in the prepatch directory. Fails with an
error if such a patch is already present.</para></listitem>
</varlistentry>
<varlistentry>
<term>-o</term>
<listitem><para>Set the output directory into which
XML-DocBook translations will be dropped. By default this is
......@@ -125,6 +140,16 @@ interpreted as a patch to be applied to the manual page foo(N) before
doclifter translates it.</para></listitem>
</varlistentry>
<varlistentry>
<term>-P</term>
<listitem><para>Enable profiling using the Python hotshot module; this
is only useful for tuning <application>doclifter</application> so it
runs faster. Raw data is written to
<filename>manlifter.prof</filename>, and a digested report is appended
to the log on standard output. Warning: the raw data files can become
huge, and the postprocessing for report generation can take as long
as the actual processing (or longer!).</para></listitem>
</varlistentry>
<varlistentry>
<term>-q</term>
<listitem><para>Normally, pass the -q (quiet) option to each doclifter call.
In error-filter mode, return a list of files on which translation failed.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment