meronos / voyage (public) (License: Unspecified) (since 2017-10-25) (hash sha1)
Voyage from Yesteryear by James Patrick Hogan (HTML ebook)
No history found.

Readme:
Voyage from Yesteryear by James Patrick Hogan

An electronic book that you can read and bookmark. Contrary to many other incompatible book formats this one is powered by the Web, at least your environment's implementation of a Web browser. It is not perfect, but is widely accessible due to popularity of the Web, and also made with archiving in mind. Your bookmarks go in the source and should be placed under revision control, which is much more solid than whatever bookmarking application you use.

Absolutely no weird or hard to parse input formats! The source is a plain text that in a matter of seconds can be translated with GNU Awk to an HTML document that meets your expectations of standard conformancy. The decision to choose a custom format comes from realization that the Web places the burden of device support on the shoulders of Web developers, so the development process should clearly separate content from form to provision for unexpected technology breakthroughs.

While this ebook was originally intented for viewing on screens that are large enough, I realized very soon that mobile support is in order. Most desktops, laptops and also tablets in landscape mode will qualify for original 'desktop' version as long as they have at least 1024 px horizontal resolution. 4:3, 16:10 and 16:9 aspect ratios are all fine. If not, it is a bug and you should fix it by fumbling with CSS in the source file. Devices rendering web pages to off-screen buffer such as smartphones (or tablets that are sufficiently small, buggy or in portrait mode) are also supported by the virtue of having a single source and a special 'mobile' pre-processing program (included in the distribution), which applies custom fixes required by mobile Web browsers (meta-viewport HTML tag is a most notable crutch). Narrated version for people with disabilities will come if someone volunteers to do the task, as I am not aware of implications and definitely don't have experience dealing with screen readers.

Producing different outputs is as easy as writing a GNU Awk program. The distribution contains three already prepared programs. The first will allow you to split the source into multiple Web pages, conveniently cross-referenced. The second will spit the document in a single stream, in case you find it more convenient to transmit or store a lone file. The third will produce a mobile-friendly book, with all pages in a single file to facilitate 'sharing', that is, transmission over tricky communication channels, such as ADB, Bluetooth or email.

You are free to change the source format as you wish, as long as you can write a program to make an HTML document from it. I am not claiming that this is the definite format for ebooks, because the goal was not to support every use case in the wild, rather than compile this precise book by the title of "Voyage from Yesteryear" into something your Web browser can understand.

Awk by default reads stdin and writes to stdout. I suggest you compile a single document with this line:

LC_ALL=C gawk -f desktop.awk <source >book.html

Where 'book.html' is a file you want to write to.

If you wish to split the book to multiple pages, then you should run another program. It will handle output redirection for you. There is no way to control where these separate files will end up apart from changing the source. Pages will be written to their assigned locations.

LC_ALL=C gawk -f pages.awk <source

And the following line will prepare a mobile-friendly version. At present there is no multi-page version for mobile devices and I am not planning to add one.

LC_ALL=C gawk -f mobile.awk <source >mobile.html
Hints:
Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://rocketgit.com/user/meronos/voyage

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@ssh.rocketgit.com/user/meronos/voyage

Clone this repository using git:
git clone git://git.rocketgit.com/user/meronos/voyage

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a merge request:
... clone the repository ...
... make some changes and some commits ...
git push origin main