DOCBOOK2GJOTS(1)

πŸ“¦
version 3.2.1 Β· 2 versions
, in fedora 43, fedora 44

πŸ’– DOCBOOK2GJOTS(1) πŸ’–

okay bestie, gather round, because we're talking about docbook2gjots β€” a little General Commands Manual legend that turns your fancy DOCBOOK files into cute lil' gjots notes. she's simple, she's scrappy, she's giving ✨ chaos goblin with a purpose ✨.


🌸 NAME 🌸

docbook2gjots β€” Convert a DOCBOOK file to gjots format (on stdout)


πŸ¦‹ SYNOPSIS πŸ¦‹

docbook2gjots [ DOCBOOK-file ]

πŸ’… DESCRIPTION πŸ’…

so basically, docbook2gjots converts a DOCBOOK XML file into gjots format. that's it, that's the whole vibe. πŸŽ€

and how does she do it? she uses gawk(1) to perform the conversion. no cap, that's the engine under the hood.

now here's the part where the structure happens β€” these tags:

<preface>, <chapter>, <section>, <sect1>, <sect2>, <sect3> and <sect4>

are what define your NewEntry and NewFolder boundaries. so they should definitely have <title> tags, fr fr. no title, no boundaries, no slay. πŸ™ˆ

real talk though: this is a quick and dirty hack using gawk(1). it does no formal checking of XML or SGML syntax, and it does not validate against the DOCBOOK DTD. consequently, if the syntax of the file is broken, the conversion will probably fail. lowkey brutal but at least she's honest. πŸ’€

okay but here's the dream πŸ’­ β€” it's intended that a round-trip can be made, so that gjots(1) can be used as a tool at all stages of DOCBOOK production. mainly as an outline processor to help the author organise and order the work. iconic behaviour honestly.

so picture this: a document may well start its life in gjots(1) while the initial thoughts are being marshalled. then, as the document forms up, it can be converted to DOCBOOK with the following command β€” which automatically adds tags such as <?xml...>, <para> etc:

gjots2docbook -b file.gjots >file.xml
docbook2pdf file.xml

or, starting with an existing DOCBOOK file:

docbook2gjots file.xml >file.gjots

in the latter case, the document will already have a lot of DOCBOOK tags, so to convert back to docbook, add the -e and -p options:

gjots2docbook -b -p -e file.gjots >file.xml
docbook2pdf file.xml

see how it comes full circle?? that's the round-trip, bestie. πŸ”₯πŸ‘‘


πŸ‘‘ AUTHOR πŸ‘‘

Written by Bob Hepple <bhepple@freeshell.org>

http://bhepple.freeshell.org/gjots


Copyright (c) 2002 Robert Hepple

This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

translation: she's free to use, but if she breaks, that's on you, not on Bob. πŸ’œ

🌈 SEE ALSO 🌈


and that's the whole page, bestie 🫢 β€” this was DOCBOOK2GJOTS(1) from the General Commands Manual, and yes, she's still rocking that DOCBOOK2GJOTS(1) energy all the way down at the bottom of the page too. go forth, convert your docs, and stay slay. πŸ’–βœ¨πŸŽ€πŸ¦‹πŸŒΈ

πŸ“¦ where this page comes from