View Single Post
Old 10-23-2012, 04:01 PM   #20
Xwang
Connoisseur
Xwang ought to be getting tired of karma fortunes by now.Xwang ought to be getting tired of karma fortunes by now.Xwang ought to be getting tired of karma fortunes by now.Xwang ought to be getting tired of karma fortunes by now.Xwang ought to be getting tired of karma fortunes by now.Xwang ought to be getting tired of karma fortunes by now.Xwang ought to be getting tired of karma fortunes by now.Xwang ought to be getting tired of karma fortunes by now.Xwang ought to be getting tired of karma fortunes by now.Xwang ought to be getting tired of karma fortunes by now.Xwang ought to be getting tired of karma fortunes by now.
 
Posts: 77
Karma: 2136220
Join Date: Sep 2012
Device: none
Quote:
Originally Posted by JimmXinu View Post
No, there isn't, calibre doesn't allow you to control the file names directly.

But since you're already changing the title/authors, you can do other things. Replace common words/phrases with abbreviations: 'Federal Aviation Administration' with 'FAA', etc.
Code:
mi.title = mi.title.replace('Federal Aviation Administration','FAA')
You can also force them to be no more than a max length something like so:
Code:
mi.title = mi.title.replace('Federal Aviation Administration','FAA')
mi.title = mi.title[:-5][:100]
Jim
Maybe I can add field to my db to maintain the entire title in case the original one is too long (so that to not waste info maybe useful in the future).
The check on the length of the title should be run every time the "OK" button is pushed on the metadata GUI, so that to avoid the long filename is created at all.
Is it possible to link a plugin function to such an action?
Otherwise I can create a plugin to scan for the entire library in a manner similar to this one to cut the title if necessary by saving the entire title in the additional db field.
Xwang
Xwang is offline   Reply With Quote