Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre > Library Management

Notices

Reply
 
Thread Tools Search this Thread
Old 06-20-2012, 09:40 PM   #1
affa
Connoisseur
affa can extract oil from cheeseaffa can extract oil from cheeseaffa can extract oil from cheeseaffa can extract oil from cheeseaffa can extract oil from cheeseaffa can extract oil from cheeseaffa can extract oil from cheeseaffa can extract oil from cheeseaffa can extract oil from cheese
 
Posts: 56
Karma: 1234
Join Date: Apr 2011
Device: kindle
good practice question / re-converting

So I understand that in order to get certain changes to 'stick', you need to reconvert. I believe the cover is the key element in this regard, since some/all metadata does get updated when pushing to a device.

This has set off a mild OCD paranoia for me -- as soon as I make any change (say, fixing a casing issue in the title) I instantly reconvert. This is because I've grown tired of uploading a file, only to find i need to delete, reconvert, and resend to get the right cover.

Is there any way to tell which files have been updated but still need to be re-converted to, say, mobi, to get the changes to stick?

I'd think a simple date comparison between last metadata change (or just cover change?) and the creation date of your format of choice (in my case, mobi) would allow the generation of a column (or report) which shows you which files need reconversion.

Thoughts? Solutions?
affa is offline   Reply With Quote
Old 06-22-2012, 03:42 AM   #2
travger
Evangelist
travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.travger ought to be getting tired of karma fortunes by now.
 
travger's Avatar
 
Posts: 480
Karma: 270594
Join Date: Aug 2010
Device: palm tx, Windows7, Galaxy A5
I'm not sure if this could be automated, on that it's better if more knowledgeable heads chime in. As far as I know, Calibre keeps only one date and it's affected even by looking at the 'Edit' screen.
But first solution that came to me: yes/no custom column. You can turn title red if it's 'No' and keep the column out of sight.
travger is offline   Reply With Quote
Advert
Old 06-22-2012, 04:20 AM   #3
kiwidude
calibre/Sigil Developer
kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.
 
Posts: 4,601
Karma: 2092290
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
Use the Modify ePub plugin instead of reconverting, far less risk of creating issues with your ePubs.

As for the other part, the easiest way is to just kick off a conversion as soon as Modify ePub has done its work. Also if you have the formats visible as a custom column like I do, then you can quickly see which books only have ePub versions and know that they need converting to mobi. In addition to this I have a "Done" yes/no like Travger suggested.
kiwidude is offline   Reply With Quote
Old 06-22-2012, 05:33 AM   #4
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 11,703
Karma: 6658935
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by kiwidude View Post
Also if you have the formats visible as a custom column like I do, then you can quickly see which books only have ePub versions and know that they need converting to mobi.
If the question is whether or not one must re-convert, then you can use a variant of the formats column that shows the time the format file (.epub, .mobi, etc) was last changed. One possible template for the custom column is
Code:
program: formats_modtimes('yyyy-MM-dd hh:mm:ss')
Do note that a column displaying this information can slow down calibre because it must query the file system for every format to get the times. A slowdown will be especially pronounced if you sort on the column or if your library is on a NAS. My guess is that the slowdown won't be too noticable until one has more than 5,000 books in the library, and maybe not even then.

Now to run amok a little bit ...

Just for fun, I decided to create a yes/no display telling me if a book has formats that are older than my "master" format (EPUB). I wrote a custom formatter function that compares the dates of the formats using one as a "golden" copy. The function is intended to be used in a "column built from other columns" with "show checkmarks" checked and a sort type of "yes/no".

The function returns '' if there are zero or one formats or if there is no "golden" format, resulting is displaying nothing in the column. Otherwise it returns 'no' if any of the non-golden formats are older than the golden one resulting in displaying a red X, and it returns 'yes' if the golden format is the oldest resulting in a green check.

The function definition is:
Code:
Function: myFunc (or whatever you want to call it)
Arg count: 1
Documentation: (whatever you want to write)
Program code:
def evaluate(self, formatter, kwargs, mi, locals, golden):
	fmi = mi.format_metadata
	golden = golden.upper()
	if len(fmi) <= 1 or fmi.get(golden, None) is None:
		return ''
	g = sorted(fmi.items(), key=lambda x:x[1]['mtime'])
	if g[0][0] == golden:
		return 'yes'
	return 'no'
Assuming that the function name is myFunc (as above) and that the golden format is EPUB, the template for the composite column is
Code:
program: myFunc('EPUB')
If you want to have the golden format differ for each book you must create another custom text column and enter the golden format name in that. You would then change the template to pass that field into myFunc instead of the constant string ("field('#lookupkey')" instead of 'EPUB').
chaley is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Converting .html to .mobi Question gilvezan Conversion 1 05-30-2011 01:14 PM
Converting Microsoft Word documents to PDF for the eDGe (with good results) borisb enTourage Archive 1 10-22-2010 01:31 PM
Question: Converting for Kindle from ePub CarolineNH Amazon Kindle 9 09-08-2010 09:25 AM
Clueless converting question el.astrologo Workshop 8 03-02-2009 11:19 AM
Simple converting question Liam Nolan Sony Reader 4 11-18-2007 04:24 PM


All times are GMT -4. The time now is 07:02 PM.


MobileRead.com is a privately owned, operated and funded community.