View Single Post
Old 11-20-2012, 06:14 AM   #17
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 26,135
Karma: 5381911
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
It really isn't that hard.

Code:
title=`ebook-meta file.mobi | grep '^Title' | head -n1 | cut -d: -f 2`
id=`calibredb list --separator : --fields title | grep "$title" | cut -d: -f1`
calibredb add_format $id file.mobi
kovidgoyal is offline   Reply With Quote