renaming epub ebooks by author and title
Jun. 27th, 2013 07:40 pmI download a lot of ebooks from Project Gutenberg, the Internet Archive, Gutenberg Australia, Cory Doctorow's craphound site, and various other places. Usually the naming of the file is not sensible. For example, the epub ebook of Jules Verne's "Journey to the Centre of the Earth" on Project Gutenberg (the version with illustrations) is titled "pg18857-images.epub". Many other sites use the old paper-book library standard of reversing an author's name as 'surname, first name' which doesn't make sense on computers. Normally I have to rename these each time, but if I'm downloading works by an author like Jules Verne who has many books it can become a little tedious.
I've written a tiny script that saves me the trouble. It uses the nice commandline program
My script uses ebook-meta to extract the information to a temporary file, then uses sed to pull out the author's name (reversing it if need be) and pull out the title. Then it renames the original file as 'author - title'
I've put the little script behind the cut-tag:
( Read more... )
I've written a tiny script that saves me the trouble. It uses the nice commandline program
ebook-meta that comes as a part of the lovely program Calibre.My script uses ebook-meta to extract the information to a temporary file, then uses sed to pull out the author's name (reversing it if need be) and pull out the title. Then it renames the original file as 'author - title'
I've put the little script behind the cut-tag:
( Read more... )