EPY
Bringing stories to the command line
Shashank Sharma knows that the Linux CLI, once seen as the domain of the uber geek, also serves as the pathway to the myriad worlds of stories.
OUR EXPERT
Shashank Sharma is a trial lawyer in Delhi and an avid Arch user.
A popular quote, often attributed to Albert Einstein, goes, “If you want your children to be intelligent, read them fairy tales. If you want them to be more intelligent, read them more fairy tales.” Teddy Roosevelt was just as much a fan of reading, and is quoted to have said, “Now and then I am asked as to ‘what books a statesman should read,’ and my answer is, poetry and novels – including short stories under the head of novels.” With many seminal works now available in the public domain, and ebooks being churned out with incredible passion and frequency, for all this reading to be done, one needs the right tools for the job.
In addition to epy, which is an incredibly robust ebook reader that support a multitude of popular formats, we’ll also discuss ebook-convert, (see below left) a nifty utility that can be used to convert ebook files from one format to another.
CONVERTING EBOOKS
If you read ebooks on various devices such as tablets, desktop or Kindle, then it makes sense to retain ebooks in the format supported by all devices. While most desktop ebook readers support various popular ebook formats such as EPUB, MOBI and PDF, some devices such as Kindle are far more limited. It makes sense to have all your ebooks in the same file format so that they can easily be moved between devices per your convenience.
Thankfully, a nifty command-line utility does this trick. If you work with ebooks, you might already be familiar with Calibre, a popular graphical ebook manager. In addition to doubling as an ebook viewer, you can also use Calibre to download news and magazines from the web, share and backup your library, convert between ebook file formats, edit the metadata on your books and more.
You’ll find Calibre in the software repositories of most popular desktop distributions. Once installed, you can use the included ebook-convert command-line utility to quickly convert files from one format to another.
To convert an EPUB file to MOBI format, run the ebook-convert 2\ -\ gods-of-mars.mobi 2-Gods-of-Mars.epub command.
Depending on the source ebook, you might wish to adjust the base font size, or move the table of contents (TOC) from the start of the file to the end. These adjustments and more can also be done with ebookconvert. Refer to the project’s man page for more details.