On Thu, Mar 28, 2024 at 6:00 PM Julian H. Stacey wrote:
> Thanks to Laura for mentioning various interesting tools.
> Anyone know of syntax suggestions for CLI (command line interpreters)
> for .groff .html .pdf to [various] .epub ?
My notes on creating pdf from html via the command line:
https://www.distasis.com/cpp/books.htm
I also have some information on this page about converting PDF or HTML
that's been converted to PDF to a series of graphics files with
imagemagick:
https://www.distasis.com/recipes/portp.htm
Some older hand held devices could handle graphics but not PDF
formats, so I converted stories to multiple graphics files to view and
read them on the device.
I have some tips for using SciTE:
https://www.distasis.com/cpp/scitetip.htm
It's a cross-platform programming editor. It's a GUI not a command
line or console tool, but it's highly customizable. So, I use a lot
of command line utilities in conjunction with it and it will shell out
and execute them. The information may give you some useful ideas for
command line tools that work with documents.
I haven't needed to use groff for anything.
I use this program to view man pages.
https://github.com/ghaerr/elks/blob/1b6110b73fbb123021a5a29b05d8fa9caef3323…
This has some useful utilities including one to convert BSD style man
pages to the more standard, older format:
https://mandoc.bsd.lv/
There's a Windows port of an older version of the program for people
who need Windows support at work or elsewhere:
https://embedeo.org/ws/doc/man_windows/
mupdf has command line tools for pdf and ebook formats. I haven't
really done much with them, but that may be your best bet on where to
start for epub and pdf utilities.
Some ultra-lightweight command line pdf tools:
pdftxt - https://litcave.rudi.ir/https://github.com/pts/pdfconcat
Here's my list of PDF and Postscript utilities:
https://lmemsm.dreamwidth.org/3702.html
They're not all command line but many of them are.
I have created an ebook from the command line. I did it a while ago
and I never had a chance to document the steps. It involved creating
some XML files to use with HTML pages and then using zip to package
them. There was a specific argument I had to use with zip to get it
into the proper format for an epub archive. I'd have to look at my
notes. It's been too long since I was working on it. Creating an
ebook from the command line once you have the HTML pages and the
needed XML files can be done though and it's not a difficult process.
I typically create the HTML and XML files directly in a programming
editor by hand.
> I would add rules to my Makefile macros to convert between various formats:
> http://www.berklix.org/~jhs/src/bsd/fixes/FreeBSD/src/jhs/share/mk/berklix2…
Interesting. Look forward to reading through it in more detail. By
the way, this is a great topic for a discussion. I love comparing
notes on the wonderful FLOSS utilities that are out there.
> I made some notes on .epub a while back, http://www.berklix.com/~jhs/epub/
> but so far only noticed manual driven GUI (graphical user interface tools),
> not seen any CLI to .epub yet.
I thought I made a list of command line and conversion tools, but I
can't find it. I do mention command line tools including conversion
tools on my Converting to Open Source web page, but they're mixed in
with GUI tools. I remember looking for command line tools for epub
several years ago. As you mentioned, most are GUI based. I found one
command line epub validator program. It was licensed as Open Source
but the group working on it weren't very into the whole Free Software
philosophy. I probably still have the code someplace, but it's not
really that useful.
I could keep going about interesting FLOSS command line utilities and
conversion programs, so I'll just stop now. If you ever want to
discuss it further or want more ideas for interesting command line
programs, feel free to email me.
Best wishes.
Laura
If you're involved with a Document Freedom Day event, please register it at
the DFF web site: https://digitalfreedoms.org/
There's more information on Document Freedom day available here:
https://digitalfreedoms.org/dfd
Also, please let us know about your Document Freedom Day events on this
mailing list.
Twenty-five days and counting down to Document Freedom Day on March 27, 2024.
Want to know how you can get involved? Help organize a local or
virtual event on topics related to the theme of Document Freedom.
Invite people to attend. You can post about it here and on other
social media platforms. Check out our list of Free Social Media
platforms if you need a few ideas for reaching out to people:
https://wiki.softwarefreedomday.org/SFDMarketingSites
Want to attend a Document Freedom Day event? A new web site and event
map are coming soon. In the meantime, you can ask on this list if
anyone's running an event in your area or hosting a virtual event.