Live data from Hacker News

Major Mode for Reading EPUBs in Emacs

github.com

61–70 of 70 posts

Re: Major Mode for Reading EPUBs in Emacs

#61

Earlier quoted context omitted.

F1-m translates to "C-h m", which is the standard Emacs command to show information about the current major-mode. It's not specific to nov.el.

I did not know that. And I have been using Emacs since 1984. I use "M-X apropos".

M-x apropos RET help RET

Re: Major Mode for Reading EPUBs in Emacs

#62
It would be nice to have an interface to calibre search of your ebook metadata. This can be done by wrapping calibredb.

Example use case. Run M-x calibre-search , prompt appears type title:space tags:scifi search is populated with the titles and metadata of matching books and you type to narrow hit enter book opens.

Also open-last-book and open-recent-books. I could probably add this to my existing wrapper.

Re: Major Mode for Reading EPUBs in Emacs

#63

It would be nice to have an interface to calibre search of your ebook metadata. This can be done by wrapping calibredb. Example use case. Run M-x calibre-search , prompt appears type title:space tags:scifi search is populated with the titles and metadata of matching books and you type to narrow hit enter book opens. Also open-last-book and open-recent-books. I could probably add this to my existing wrapper.

My solution to this has been to export the library as a bibtex file, which is a built in feature of Calibre, and then use ivy-bibtex (could just as easily use helm-bibtex) to search the library. You need to make sure the file path is part of your bibtex export, but this is easily done. Also make sure you export tags.

Re: Major Mode for Reading EPUBs in Emacs

#64
post #51

That's a pity the FB2 format is not nearly as popular as EPUB is. It's a single-file pure tidy (I mean a simple, intuitive, bloat-free, well-documented schema) XML with purely semantic layout and no formatting. It's a pleasure to write code processing it. The user/app/device is the only to decide how to view it (neither pages nor fonts are specified). Isn't this lovely?

EPUB's zip archive may encapsulate images and fonts. How do you achieve that with a single XML file? I guess it has a reduced feature set?

FB2 supports illustrations (jpg, png). As for CSS, fonts, and other such embeddings - they are anti-features from a reader's perspective. Why instead of adaptable, and user-tunable semantic markup would I prefer some guy's tastes, or some company's corporate style pushed on me?

Besides, there's a big surface for bugs in epub. It happened to me to buy an ebook which froze my reader until I weeded out CSS, and fonts from it with Calibre. Ironically, it also, made it easier to read.

Re: Major Mode for Reading EPUBs in Emacs

#65
post #63

It would be nice to have an interface to calibre search of your ebook metadata. This can be done by wrapping calibredb. Example use case. Run M-x calibre-search , prompt appears type title:space tags:scifi search is populated with the titles and metadata of matching books and you type to narrow hit enter book opens. Also open-last-book and open-recent-books. I could probably add this to my existing wrapper.

My solution to this has been to export the library as a bibtex file, which is a built in feature of Calibre, and then use ivy-bibtex (could just as easily use helm-bibtex) to search the library. You need to make sure the file path is part of your bibtex export, but this is easily done. Also make sure you export tags.

Sounds kind of manual compared to what I do now which is wrap calibredb in a script and narrow if needed via rofi.

https://github.com/davatorium/rofi

Presumably would be about as easy to do in elisp.

A call to calibredb in a library of thousands of books on ssd is only 1/3 -> 1/2 a second

Re: Major Mode for Reading EPUBs in Emacs

#66
post #63

Earlier quoted context omitted.

My solution to this has been to export the library as a bibtex file, which is a built in feature of Calibre, and then use ivy-bibtex (could just as easily use helm-bibtex) to search the library. You need to make sure the file path is part of your bibtex export, but this is easily done. Also make sure you export tags.

Sounds kind of manual compared to what I do now which is wrap calibredb in a script and narrow if needed via rofi. https://github.com/davatorium/rofi Presumably would be about as easy to do in elisp. A call to calibredb in a library of thousands of books on ssd is only 1/3 -> 1/2 a second

It is a little more manual, but I think the end result is a little faster during use. This half second delay you mention doesn't happen with my library of over a thousand books. If I had something more automatic, I'd still want to be able to use bibtex. I like having the same interface for reading and citing, as well as the same for both reading books and reading papers.

I bet there is a command line way to export a bibtex library, so it could be automated in elisp. It takes seconds though, and I only do it a few times a month. Doesn't matter though, I settled on this workflow because I was already using bibtex regularly for papers. Probably makes less sense if you aren't already happy with bibtex.

Re: Major Mode for Reading EPUBs in Emacs

#67

That's a pity the FB2 format is not nearly as popular as EPUB is. It's a single-file pure tidy (I mean a simple, intuitive, bloat-free, well-documented schema) XML with purely semantic layout and no formatting. It's a pleasure to write code processing it. The user/app/device is the only to decide how to view it (neither pages nor fonts are specified). Isn't this lovely?

> That's a pity the FB2 format is not nearly as popular as EPUB is.

It's made for readers by readers, so no DRM. A non-starter for publishing corporations, sadly.

Re: Major Mode for Reading EPUBs in Emacs

#68
Does anyone know of a tool like pdf-tools but for annotating epub?

Ideally I have an epub that I read on my kobo ereader. Afterwards I have a number of annotations (highlights) that I have listed in plain text.

I would like to be have the epub and the highlights side by side and be able to snap directly to the highlights position within the epub in order to take further notes.

Re: Major Mode for Reading EPUBs in Emacs

#69
post #68

Does anyone know of a tool like pdf-tools but for annotating epub? Ideally I have an epub that I read on my kobo ereader. Afterwards I have a number of annotations (highlights) that I have listed in plain text. I would like to be have the epub and the highlights side by side and be able to snap directly to the highlights position within the epub in order to take further notes.

For annotating, you can try org-noter:

https://github.com/weirdNox/org-noter

If you want to get your annotations into org mode/emacs, look at this guy's work:

https://beepb00p.xyz/orger.html

I haven't yet tried it, but I think he does something similar.

Re: Major Mode for Reading EPUBs in Emacs

#70

That's a pity the FB2 format is not nearly as popular as EPUB is. It's a single-file pure tidy (I mean a simple, intuitive, bloat-free, well-documented schema) XML with purely semantic layout and no formatting. It's a pleasure to write code processing it. The user/app/device is the only to decide how to view it (neither pages nor fonts are specified). Isn't this lovely?

> That's a pity the FB2 format is not nearly as popular as EPUB is. It's made for readers by readers, so no DRM. A non-starter for publishing corporations, sadly.

Publishing companies in Russia are pretty successful selling DRM-free books, you can download PDF, EPUB, and FB2 as you buy. They just spam Google "download (book title)" search results and sue every website distributing pirated copies.
Post reply on HN