Sample Header Ad - 728x90

How to cat the first page of an epub file?

1 vote
1 answer
267 views
epubcat book.epub 1 3 # outputs plain text of pages 1 through 3 I don’t know if epubs have the concept of “pages.” If not, perhaps we can say each 400 chars are a page? A general solution that works for other ebook formats is better (mobi, azw3, etc). My own thoughts are currently on first converting the book to text via ebook-convert or pandoc and then extracting the needed amount, but this seems awfully inefficient as I intend to only get a little of the beginning of the content. You can download an example file that can be used for testing [here](http://82.102.11.148:8080//tmp/Time%20to%20Put%20Your%20Galleons%20Where%20Your%20Mouth%20Is%20-%20Tsume%20Yuki.epub) .
Asked by HappyFace (1694 rep)
Apr 10, 2020, 09:32 AM
Last activity: May 5, 2022, 11:46 PM