Register Guidelines E-Books Today's Posts Search

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

Notices

Reply
 
Thread Tools Search this Thread
Old 04-09-2013, 03:12 AM   #1
kjonca
Junior Member
kjonca began at the beginning.
 
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?
kjonca is offline   Reply With Quote
Old 04-09-2013, 03:49 AM   #2
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: 43,849
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
http://bazaar.launchpad.net/~kovid/c...revision/14764
kovidgoyal is offline   Reply With Quote
Advert
Old 04-09-2013, 08:23 AM   #3
kjonca
Junior Member
kjonca began at the beginning.
 
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'
kjonca is offline   Reply With Quote
Old 04-09-2013, 08:29 AM   #4
itimpi
Wizard
itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.
 
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.
itimpi is offline   Reply With Quote
Reply


Forum Jump

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


All times are GMT -4. The time now is 08:29 PM.


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