3 ms·
It appears this site (Github pages) is trying to require Javascript in order to read it. At the same time the top comment is suggesting EPUB should not require
by 1vuio0pswjnm7 3y ago
It appears this site (Github pages) is trying to require Javascript in order to read it.
At the same time the top comment is suggesting EPUB should not require Javascript.
I never use the HTML markup, CSS, etc. when I read an "ebook". I dump it to text and read it with less(1). I do not need to see images. I just want to search and read text. I use stupid simple shell scripts; something like the following.
#!/bin/sh
printf "(\n"
for x in ${1-*.epub};do
echo printf \'\\n\\n,,,,,,,,,,,,,,,,,,,,, "$x" ,,,,,,,,,,,,,,,,,,,,,,,\\n\\n\'
7z l $x|sed -n "s/.* /7z x -so $x /;/nav.xhtml/d;/[tx]ml$/p"|sort -n
done
echo ")|tr -cd '[\\\12\40-\176]'"
Example usage:
epub.sh 1.epub |sh > 1.htm
links -dump 1.htm > 1.txt
less 1.txt
If I need to to adjust the order of the sections, I do something like
epub.sh 1.epub > 1.sh
vi 1.sh
1.sh > 1.htm
links -dump 1.htm > 1.txt
If I want to save the "ebook", I can compress the .txt smaller than any of the "ebook" formats.
zstd -19 1.txt
zstdless 1.txt.zst
Plain text is portable for me; works on both BSD and Linux.