html2pdbtxt(1)
π html2pdbtxt β the manual page, bestie edition π
okay so you found html2pdbtxt(1), a General Commands Manual page, and honestly? it's giving "let me turn your HTML into something your Palm Pilot can actually read" and I am obsessed. sit down, grab a strawberry π, and let's get into it.
β¨ NAME β¨
html2pdbtxt β HTML to Doc Text converter for Palm Pilots π«Ά
β¨ SYNOPSIS β¨
html2pdbtxt [ -bchars ] [ -ttitle ] [ -uURL ] file.html [ file.txt ]
html2pdbtxt -v
β¨ DESCRIPTION β¨
So basically html2pdbtxt converts HTML into text that's suitable for conversion to a Doc(4) file via txt2pdbdoc(1). no cap. π
And if you don't give it a text filename? the generated text just goes straight to standard output. easy.
πΈ HTML Tags πΈ
These HTML tags (and their corresponding ending tags) are recognized, periodt:
ADDRESS, A NAME, BLOCKQUOTE, BR, CENTER, DIV, DL, DT, H1, H2, H3, H4, H5, H6, OL, OPTION, PRE, P, SELECT, SCRIPT, STYLE, TABLE, TITLE, UL.
In all cases, the most "reasonable" thing is done given the constraints of the Doc(4) format, which is essentially plain text. like, that's the vibe check it's working with.
ALT attributes (typically found in IMG tags) have their text extracted and placed between brackets [like this]. π
All other HTML tags are stripped. gone. not invited. π
π¦ Character Entities π¦
Both HTML character and numeric (decimal and hexadecimal) entity references are converted to their byte value according to the ISO 8859-1 (Latin 1) character set, so they appear properly on the Pilot. β¨
For example, résumé'' becomes resume'' with accented letter 'e's.
π Document Title π
Unless specified with the -t option, the HTML file is scanned for <TITLE> ... </TITLE> tags and, if found, the title is extracted and put on line 1 of the generated file. main character energy, line one. π
π Bookmarks π
Bookmarks are placed into the generated file wherever <A NAME="..."> tags are found in the HTML file.
β¨ OPTIONS β¨
-bcharsβ Specify the character sequence that is to serve as the bookmark indicator. The default is(*). (See the CAVEATS.) π-ttitleβ Specify the title of the document that is to appear on line 1 of the generated file, overriding any title found inside the HTML file between<TITLE>...</TITLE>tags.-uurlβ Specify the URL the HTML file supposedly came from and put it on the line after the title, if any, in the generated file. π-vβ Print the version number to standard output and exit.
β¨ EXAMPLE β¨
To convert an HTML file to Doc:
html2pdbtxt -u http://www.wonderland.org/ alice.html alice.txt
txt2pdbdoc "`head -1 alice.txt`" alice.txt alice.pdb
ate. no crumbs. π₯
β¨ CAVEATS β¨
bestie listen, these are the real ones. read them fr fr.
- Some Doc readers have a "feature" whereby, during the scan for bookmarks phase, they recognize the bookmark sequence of characters anywhere in the text and not just at the beginning of a line. π
- Some Doc readers do not allow the bookmark sequence to contain the
>character since they interpret that as the sequence delimiter, e.g.,<->>will be interpreted as the sequence being merely-. - Ordered lists (via the
OLtag) are treated as unordered lists (like theULtag) because it would greatly complicate the code since it would have to be parsed rather than simple substitutions being performed. lowkey a shortcut, highkey a fact. π
β¨ SEE ALSO β¨
International Standards Organization. ``ISO 8859-1: Information Processing -- 8-bit single-byte coded graphic character sets -- Part 1: Latin alphabet No. 1.'' 1987.
World Wide Web Consortium. ``Character entity references in HTML 4.0.'' HTML 4.0 Specification, http://www.w3.org/
β¨ AUTHOR β¨
Paul J. Lucas <pauljlucas@mac.com> π
and that's the whole page, gorgeous. this one's from the html2pdbtxt manual page, source html2pdbtxt, dated January 21, 2005 β go forth and convert, bestie π§π
π¦ where this page comes from
- debian bookworm: txt2pdbdoc 1.4.4-8+b1
- ubuntu jammy: txt2pdbdoc 1.4.4-8
- ubuntu noble: txt2pdbdoc 1.4.4-8build2
- Copyright (C) 1998 Paul J. Lucas
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms