04-09-2013, 03:12 AM | #1 |
Junior Member
Posts: 9
Karma: 10
Join Date: Feb 2013
Location: Warsaw, Poland
Device: PocektBook Touch HD3, onyx t68Lynx,onyx m92,prs-650
|
add_format conditionally, without overwriting
calibredb add_format adds format unconditionally overwriting old format, when needed.
But I need to do something like if there is "format" for "book_id" then do nothing, else add_format is any simple way to this? |
04-09-2013, 03:49 AM | #2 |
creator of calibre
Posts: 43,849
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
|
Advert | |
|
04-09-2013, 08:23 AM | #3 |
Junior Member
Posts: 9
Karma: 10
Join Date: Feb 2013
Location: Warsaw, Poland
Device: PocektBook Touch HD3, onyx t68Lynx,onyx m92,prs-650
|
Thanks. But how can I use it?
Now I'm using calibre from debian. And I copied cp -via src/calibre/library/cli.py /usr/lib/calibre/calibre/library/cli.py but only effect was: Code:
Traceback (most recent call last): File "/usr/bin/calibredb", line 20, in <module> sys.exit(main()) File "/usr/lib/calibre/calibre/library/cli.py", line 1415, in main return command(args[2:], dbpath) File "/usr/lib/calibre/calibre/library/cli.py", line 464, in command_add_format do_add_format(get_db(dbpath, opts), id, fmt[1:], path, opts) File "/usr/lib/calibre/calibre/library/cli.py", line 432, in do_add_format replace=opts.replace) TypeError: add_format_with_hooks() got an unexpected keyword argument 'replace' |
04-09-2013, 08:29 AM | #4 |
Wizard
Posts: 4,552
Karma: 950151
Join Date: Nov 2008
Device: Sony PRS-950, iphone/ipad (Marvin/iBooks/QuickReader)
|
If you mean you are using Calibre from the Debian repository then you will not be able to do so until Debian update their Calibre release.
It is strongly recommended that Calibre does NOT use the repository installs but instead uses the binary installs available via the Calibre download pages. The repository versions are always a long way out-of-date. Kovid's link shows that the change is now available for those who run Calibre from source. For everyone else it will be available in next Friday's binary Calibre releases. |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Metadata download overwriting Author/Title fields | economix | Library Management | 3 | 11-17-2011 08:27 PM |
Automatic overwriting ebooks... | Johansen | Library Management | 3 | 09-09-2011 09:36 PM |
restrict overwriting by downloaded metadata | adrian1944 | Library Management | 3 | 05-17-2011 01:07 PM |
Calibre not overwriting ePub CSS font info | jswinden | Calibre | 4 | 04-06-2010 01:29 PM |