1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257
|
Name: doclifter
Version: 2.1
Release: 1
URL: http://www.catb.org/~esr/doclifter/
Source0: %{name}-%{version}.tar.gz
License: GPL
Group: Applications/System
Requires: python2
Summary: converts man/mdoc/ms/me/mm documents to DocBook
BuildRoot: %{_tmppath}/%{name}-root
BuildArch: noarch
#Keywords: DocBook, man, ms, mm, me, mdoc, lifting, XML, SGML
%description
The doclifter program translates documents written in troff macros 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 everything
that can be mechanized, and to preserve in XML comments any troff-level
information that might have structural implications. Also includes manlifter,
a driver script that can be used to convert entire manual-page hierarchies.
%prep
%setup -q
%build
make doclifter.1
%install
[ "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && rm -rf "$RPM_BUILD_ROOT"
mkdir -p "$RPM_BUILD_ROOT"%{_bindir}
mkdir -p "$RPM_BUILD_ROOT"%{_mandir}/man1/
cp doclifter manlifter "$RPM_BUILD_ROOT"%{_bindir}
cp doclifter.1 manlifter.1 "$RPM_BUILD_ROOT"%{_mandir}/man1/
%clean
[ "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && rm -rf "$RPM_BUILD_ROOT"
%files
%defattr(-,root,root,-)
%doc README COPYING
%{_mandir}/man1/doclifter.1*
%{_bindir}/doclifter
%{_mandir}/man1/manlifter.1*
%{_bindir}/manlifter
%changelog
* Fri Jan 14 2005 Eric S. Raymond <esr@snark.thyrsus.com> - 2.1-1
- Interrupt handlers are refactored so manlifter can be aborted with
a single ^C; as a result, exit values 4 and 5 have swapped places.
In manlifter, don't remove the result file unless we're in batchmode.
Lifts 96% of 11121 pages in a full Fedora Core 3 install.
* Fri Dec 24 2004 Eric S. Raymond <esr@snark.thyrsus.com> - 2.0-1
- Added manlifter to the distribution. doclifter no longer strips off file
extensions before appending .xml. Major improvement in parsing of
displays; C function prototypes are now recognized in them.
* Sat Nov 20 2004 Eric S. Raymond <esr@snark.thyrsus.com> - 1.15-1
- Fix logic for flushing mdoc namediv. Handle tables within mdoc lists better.
Strip out some pod2man-generated cliches.
* Thu Sep 2 2004 Eric S. Raymond <esr@snark.thyrsus.com> - 1.14-1
- Added -e option to set encoding in the output XML. Documented
required file extensions for mm, me, ms. Now lift some trivial uses
of eqn(1) markup. Better handling of mm header markup. Interpret
the X source distribution's local macros as a secondary markup.
Nuke   it's documented but apparently not actually defined.
* Fri Aug 13 2004 Eric S. Raymond <esr@snark.thyrsus.com> - 1.13-1
- Manual date now goes in refentryinfo, as Steve Cheng suggested.
Restored correct parsing of multicommand synopses.
* Tue Jul 27 2004 Eric S. Raymond <esr@golux.thyrsus.com> - 1.12-1
- Implemented handling of mdoc .Brq macro. Code no longer chokes on
multiple Synopsis headers.
* Mon Jul 26 2004 Eric S. Raymond <esr@snark.thyrsus.com> - 1.11-1
- Speed optimizations. Improved pod2man detection. Close <anchor/> properly.
.UN before .SH or .SS sets the XML ID of the generated section.
Boldfaced lines immediately before tables are interpreted as titles. .UR now
generates <link> for local links. Improved .RE handling that fixes
a couple of edge cases. Multiline table entries are now interpreted as full
blocks, so commands work normally there.
* Tue Jul 6 2004 Eric S. Raymond <esr@snark.thyrsus.com> - 1.10-1
- Enhance to handle lynx dump pages. Fix .Fa interpretation.
Gets 96% of 10862 Fedora Core 2 pages.
* Tue Jun 1 2004 Eric S. Raymond <esr@snark.thyrsus.com> 1.9-1
- John Franklin's support for the Vt macro in mdoc. Tuning for Psyco.
* Mon Mar 1 2004 Eric S. Raymond <esr@snark.thyrsus.com> 1.8-1
- Avoid choking on malformed tables in Qt pages. Fix minor bug in handling
of nested .if/.ie requests. Process Fa macro correctly.
* Tue Feb 17 2004 Eric S. Raymond <esr@snark.thyrsus.com> 1.7-1
- Handle .Pa tags in synopses better. This version lifts 96% of 10316
man pages in a full Fedora Core 1 installation.
* Fri Jan 2 2004 Eric S. Raymond <esr@snark.thyrsus.com> 1.6-1
- Simpler, better entity translation logic; the -s and -x options are gone.
* Mon Dec 29 2003 Eric S. Raymond <esr@snark.thyrsus.com> 1.5
- Fixes to RPM packaging.
* Wed Dec 26 2003 Eric S. Raymond <esr@snark.thyrsus.com> 1.4
- Handle .TQ reduction. Translate attempts to fake up double quotes
in text with `` and ''. Catch a few more .RS/.RE cases.
* Mon Dec 15 2003 Eric S. Raymond <esr@snark.thyrsus.com> 1.3
Process .RS/.RE tags to generate list nesting. As a side effect,
this change fixes bad interactions between .ig and .TP. Fix a bug in
gathering hints from function prologs. Use <varname>
rather than <symbol> for variables. Work around a common bug in ISC
man pages. Evaluate one-line .el macros properly.
* Mon Dec 08 2003 Eric S. Raymond <esr@snark.thyrsus.com> 1.2
- SGML-generation support removed; the -s and -x options now
control whether troff special characters are translated to the
ISO entity set or the XHTML entity set.
Corrected a bug in processing of synopses with multiple commands.
Handle \f[012434] font changes in synopses correctly. -D option
supports posting hints at startup time. Better recognition of
filenames and commands in running text. Error return values
now convey more information.
* Thu Dec 04 2003 Eric S. Raymond <esr@snark.thyrsus.com> 1.1
- Fixed a bug in conditional evaluation that twadmin(8) tickled.
Better detection of pure inclusions. Better blank-section
elimination. Kleene star recognized as ... synonym in command
synopses. Correct some bugs in semantic-hint collection.
Limited internationalization -- recognize "NAME" in a couple
of different languages. Recognize Qt manual pages and use their
conventions. Better lifting of mandoc-generated pages. Translate
groff-style \[...] escapes, flag unknown ones. Can now parse
K&R style function prototypes as well as ANSI ones. This version
lifts 96% of 9829 manual pages in a full Red Hat 9 installation
with Fedora updates to *validated* XML-DocBook.
* Thu Nov 20 2003 Eric S. Raymond <esr@snark.thyrsus.com> 1.0.6
- Lots of changes made so the XML output will pass validation.
Appropriately wrap <citerefentry> sequences generated from SEE ALSO.
Clean up generated <sbrk/> tags when we don't find a function or
command synopsis. Push back folded highlights so paragraph generation
doesn't get screwed up. Don't generate invalid class attribute for
<programlisting> and <symbol>. The .RS command no longer ends a
.IP or .TP entry. Correct .Ql so it doesn't generate spurious
line breaks. Fix a bug in <group> syntax processing. Declare <envar>
<constant>, and <errorcode> in-line tags (avoids fooups in processing
mdoc). Fix lexer bug that dropped a character after triple-quote in tokens.
Evaluate groff-style \\n[...] register escapes, \\n(.$., \w, and .g.
Generate IDs correctly even when section titles are in CJK. Accept
options starting with +. The mdoc interpreter can now deal with an
out-of-order Synopsis section. This version lifts 94% of 9829 manual
pages in a full Red Hat 9 installation with Fedora updates.
* Tue Oct 21 2003 Eric S. Raymond <esr@snark.thyrsus.com> 1.0.5
- Translate Version 8 .L macro and friends. Fix some minor markup
problems in doclifter.xml.
* Tue Mar 18 2003 Eric S. Raymond <esr@snark.thyrsus.com> 1.0.4
- Improved synopsis line detection. Added Berkely Bsx. Ox, Nx macros.
Implemented extended groff ab, als, nop and return requests. Some
effort is now made to identify markup that refers to section headers
and lift it to link tags (by Aaron Hawley). Corrected erroneous
handling of string quotes around request arguments. Implemented
mdoc .Ex and .Rv macros. Better handling of \d, \u, and \v troff
requests.
* Fri Feb 14 2003 Eric S. Raymond <esr@snark.thyrsus.com> 1.0.3
- Enable translation of PIC diagrams using pic2plot. Lift highlighted
.*_t and errno appropriately. Implemented .fam and \F groff
extensions. Improved synopsis line detection. Interpret DS/DE in
manual pages (it's illegal but unambiguous). Work around common
error of putting an opening ' at the left margin. This version lifts
96% of 6705 manual pages in a Red Hat 8.0 install.
* Thu Feb 13 2003 Eric S. Raymond <esr@snark.thyrsus.com> 1.0.2
- Corrected a bug in processing of the .SM highlight on manual pages.
This affects other font changers with two-character names, notably CW.
* Tue Sep 17 2002 Eric S. Raymond <esr@snark.thyrsus.com> 1.0.1
- Prevent some false matches on mwww macros. Don't generate
entity inclusion files into the internal set; Tim Waugh says
it's not necessary and indeed it seems not to be when I'm using xmlto.
* Sat Aug 17 2002 Eric S. Raymond <esr@snark.thyrsus.com> 1.0.0
- Better firewalling against unbalanced font changes -- unbalanced
markup can no longer break the translation. Drastically
improved parsing of function prototypes. Support for mwww macros.
Added groff-1.18's euro and micro signs. Also now interpreting
various historical fossils from Ultrix and elsewhere that show up
on Linux manual pages. This version lifts 95% of the 5548 man pages
in a full Red Hat 7.3 workstation install.
* Tue Jul 30 2002 Eric S. Raymond <esr@snark.thyrsus.com> 0.99
- C declaration parsing for sections 2 and 3 by Pradeep Padala.
Improvements in command-synopsis parsing. Applied Michael
Smith's XML-compliance patch. Default changed to XML to
go with 7.3 toolchain. Added -s option. This version lifts
97% of 4253 man pages in a full Red Hat 7.3 install.
* Mon Jul 15 2002 Eric S. Raymond <esr@snark.thyrsus.com> 0.95
- Point release for Pradeep Padala.
Added Windows port fix. Better command marking from synopsis
sections. Oops, allow tildes in URLs. We can handle multiple
stacked .TP entries now. Implement groff mso, ignore ftr.
Crude, non-semantic lifting of function synopses.
* Tue Nov 9 2001 Eric S. Raymond <esr@snark.thyrsus.com> 0.9
- Add mm support. Resolve Latin 1 and Latin 2 entities correctly.
Don't let line numbering be confused by saved sections. Handle
non-syntactic [] in optional filename extensions. Improved
generation of included entities.
* Mon Nov 5 2001 Eric S. Raymond <esr@snark.thyrsus.com> 0.8
- Catch and foil attempts to rename immutable macros. Better
handling of unbalanced highlights. Multiple name lines are
now passed through with the first one parsed. 96% success on
sections 1 and 8 of a full Red Hat install.
* Tue Oct 31 2001 Eric S. Raymond <esr@snark.thyrsus.com> 0.7
- Multiple vertically-stacked hanging tags are now translated into
Synopsis sections. Mdoc bibliography macros are supported.
Paragraphed text in Synopsis sections is now handled. Tcl/Tk
extension macros are processed. 92% success on section 1 of a
full Red Hat install.
* Tue Oct 18 2001 Eric S. Raymond <esr@snark.thyrsus.com> 0.6
- Better handling of weird highlight and paragraphing combinations.
* Tue Oct 2 2001 Eric S. Raymond <esr@snark.thyrsus.com> 0.5
- Support for Berkeley mdoc.
* Wed Sep 5 2001 Eric S. Raymond <esr@snark.thyrsus.com> 0.4
- Don't rely on compilerlike.py being available.
* Tue Sep 4 2001 Eric S. Raymond <esr@snark.thyrsus.com> 0.3
- More steps towards mandoc interpretation. Checkpoint release for
Jorge Godoy and Jeffrey Franks.
* Fri Aug 31 2001 Eric S. Raymond <esr@snark.thyrsus.com> 0.2
- Extra arguments of .TH are now passed through. \c is now handled
properly rather than just being nuked. Now formats a dozen or
so more problem pages. Magic inclusion semantics and -I. Full
support for extended groff_char(7) characters. Implemented .tr.
* Mon Aug 27 2001 Eric S. Raymond <esr@snark.thyrsus.com> 0.1
- Initial build.
* Thu Aug 16 2001 Eric S. Raymond <esr@snark.thyrsus.com> 0.0
- First RCS commit. Project launched
# The following sets edit modes for GNU EMACS
# Local Variables:
# mode:rpm-spec-mode
# End:
|