pdbtxt2html(1)

πŸ“¦ version 1.4.4, in debian bookworm, ubuntu jammy, ubuntu noble

πŸ’– pdbtxt2html β€” the Doc Text to HTML glow-up πŸ’–

okay so bestie, welcome to pdbtxt2html, section 1 of the General Commands Manual πŸŽ€ she's a Doc Text to HTML converter for Palm Pilots and honestly? she ate.


✨ SYNOPSIS ✨

pdbtxt2html [ -t ] file.txt [ file.html ]
pdbtxt2html -v

like, that's the whole vibe. two modes, no drama πŸ’…


🌸 DESCRIPTION 🌸

so here's the tea: pdbtxt2html takes text that was already converted from a Doc(4) file by way of txt2pdbdoc(1) and turns it into HTML. glow-up complete ✨

and if you don't hand her an HTML filename? no worries babe, the generated HTML just goes straight to standard output. she'll just... say it out loud into the terminal. main character behavior honestly 🫢

πŸŽ€ Document Title πŸŽ€

the first line of the file becomes the HTML document title. that's it, that's the rule. first line = the name of the whole thing, periodt.

πŸ”– Bookmarks πŸ”–

okay this part is kinda iconic. she peeks at the last line of the file, and if it's got a string wrapped up between < and >, that string is officially the bookmark marker. πŸ’–

then she scans the ENTIRE file looking for lines that begin with that marker (leading whitespace does not count, she ignores it, she's not petty). those lines get turned into HTML headings. slay.

now the level math, listen closely because it's lowkey specific:

  • the number of whitespace characters after the first bookmark marker sets heading level 1.
  • for every heading after that, the level is the number of whitespace characters between the bookmark marker and the bookmark text, minus the number from that first bookmark, plus one.

so like, whitespace is literally doing the heavy lifting here. respect her. 🧚

🌈 Embedded URLs 🌈

any valid URLs (valid according to RFC 1630) that are just vibing inside the text get turned into hyperlinks. clickable. gorgeous. the ones she recognizes are:

  • ftp
  • gopher
  • http
  • https
  • mailto
  • news
  • telnet
  • wais

that's the whole roster, no cap πŸ¦‹


πŸ‘‘ OPTIONS πŸ‘‘

  • -t β€” compile a table of contents and drop it in between the first heading and the body. like a little snack before the meal πŸ“
  • -v β€” print the version number to standard output and then exit. she says hi and leaves. iconic.

πŸ’€ EXAMPLE πŸ’€

okay so to convert a Doc file to HTML, you literally just:

txt2pdbdoc alice.pdb alice.txt
pdbtxt2html alice.txt alice.html

two lines. done. go off πŸ’…


πŸ¦‹ SEE ALSO πŸ¦‹

also, academic queen moment: Tim Berners Lee. Universal Resource Identifiers in WWW, Network Working Group of the Internet Engineering Task Force, June 1994.

http://info.internet.isi.edu/in-notes/rfc/files/rfc1630.txt

πŸ’œ AUTHOR πŸ’œ

Paul J. Lucas <pauljlucas@mac.com> β€” thank you for your service king 🫑✨


bestie reminder: this page is part of txt2pdbdoc, dated January 21, 2005, and it lives in section 1 of the manual (pdbtxt2html(1)). fr fr. bye ily πŸ’–πŸŒˆπŸŽ€
πŸ“¦ where this page comes from