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

Go Back   MobileRead Forums > E-Book Software > Calibre > Plugins

Notices

Reply
 
Thread Tools Search this Thread
Old 03-27-2011, 10:36 PM   #16
lgladen
Member
lgladen has a complete set of Star Wars action figures.lgladen has a complete set of Star Wars action figures.lgladen has a complete set of Star Wars action figures.
 
Posts: 19
Karma: 258
Join Date: Feb 2011
Device: evo
@kiwidude - The Quality check plugin still shows as 1.1 in my preferences (and the plugin updater). The new functionality is there, but the version number's wrong.
lgladen is offline   Reply With Quote
Old 03-28-2011, 04:41 AM   #17
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,228
Karma: 1334002
Join Date: Oct 2010
Location: London, UK
Device: Kindle Paperwhite 3G, iPad 3, iPad Air
@Igladen - thanks for pointing that out. I forgot to bump it. I've put the correct zip on the first post now, so just install again.
kiwidude is offline   Reply With Quote
Old 03-28-2011, 01:06 PM   #18
dasimser
Member
dasimser began at the beginning.
 
Posts: 18
Karma: 46
Join Date: Dec 2008
Location: Ottawa, ON, Canada
Device: Kobo Aura
@kiwidude - Thanks for all the great plugins! I use just about all of them regularly, and truly appreciate all the effort you put into them.

I have a suggestion for another quality check option that I (and hopefully others) would find useful. I always do an ePub to ePub conversion on my books, primarily to adjust the fonts and to insert the metadata page (i.e. book jacket). I would be useful to be able to check for the existence of the metadata page to determine whether I have missed converting any books.
dasimser is offline   Reply With Quote
Old 03-28-2011, 02:06 PM   #19
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,228
Karma: 1334002
Join Date: Oct 2010
Location: London, UK
Device: Kindle Paperwhite 3G, iPad 3, iPad Air
Hi dasimer, glad you like the plugins, always love getting feedback.

That sounds an interesting idea. Right now I know absolutely zero about the internals of an ePUB in terms of detecting a Calibre jacket but I'm sure if I looked into it or asked in the dev forum someone could give me a pointer. I know how to get the EPUB content (having done that for the Extract ISBN plugin), what I don't know is how to use that set of internal EPUB files to identify a jacket being amongst them. Perhaps there is a simple regex I can apply or similar. If anyone throws the answer at me I will add this sooner, otherwise I will put it on the list for a future release.

I'm going to be releasing a new version of nearly every plugin this weekend anyway to support Kovid's plugin API changes coming in 0.7.53, so if anyone has any further details on this or other ideas they would like added to Quality Check this week would be as good a time as any to see them happen...
kiwidude is offline   Reply With Quote
Old 03-28-2011, 02:09 PM   #20
ptom
Member
ptom began at the beginning.
 
Posts: 10
Karma: 10
Join Date: Mar 2011
Device: nook color
really great plugin! The new function just saved me so much time. Thanks!
ptom is offline   Reply With Quote
Old 03-28-2011, 06:22 PM   #21
jackie_w
Wizard
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 2,824
Karma: 4193095
Join Date: Sep 2009
Location: UK
Device: Sony PRS-350, PB360, Kobo Glo/AuraHD/Aura6"/AuraH2O
Quote:
Originally Posted by kiwidude View Post
...Right now I know absolutely zero about the internals of an ePUB in terms of detecting a Calibre jacket but I'm sure if I looked into it or asked in the dev forum someone could give me a pointer. I know how to get the EPUB content (having done that for the Extract ISBN plugin), what I don't know is how to use that set of internal EPUB files to identify a jacket being amongst them. Perhaps there is a simple regex I can apply or similar. If anyone throws the answer at me I will add this sooner, otherwise I will put it on the list for a future release.
Some ideas:
  • First find the .opf file.

    and then:
  • Find the <spine> section and search for (part of)
    Code:
    <itemref idref="calibre_jacket"/>
    or
  • find the <manifest> section and search for (part of):
    Code:
    <item href="jacket.xhtml" id="calibre_jacket" media-type="application/xhtml+xml"/>
    or maybe
  • look for jacket.xhtml as one of the content files inside the epub although I suppose it's possible this name may not be uniquely specific to calibre.
jackie_w is offline   Reply With Quote
Old 03-28-2011, 06:48 PM   #22
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,228
Karma: 1334002
Join Date: Oct 2010
Location: London, UK
Device: Kindle Paperwhite 3G, iPad 3, iPad Air
@jackie_w - thx for the pointers. I did a search of the code using some of your terms and found the Calibre code in here:
src\calibre\ebooks\oeb\transforms\jacket.py

Looks like it uses an XPATH expression to find some meta in the spine, so I should be able to use the same approach. I will include it in the next release.
kiwidude is offline   Reply With Quote
Old 03-29-2011, 09:04 PM   #23
dasimser
Member
dasimser began at the beginning.
 
Posts: 18
Karma: 46
Join Date: Dec 2008
Location: Ottawa, ON, Canada
Device: Kobo Aura
@kiwidude,

Thanks for considering the book jacket check. Since you asked for other suggestions, I might as well go to town and suggest that if you found the book jacket, you could also check for metadata mismatches between the jacket and the library.

... or am I just pushing my luck, now?
dasimser is offline   Reply With Quote
Old 03-30-2011, 04:01 AM   #24
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,228
Karma: 1334002
Join Date: Oct 2010
Location: London, UK
Device: Kindle Paperwhite 3G, iPad 3, iPad Air
@dasimer - haha, if you don't ask you never know.

I will take a look at it when I look into the jacket stuff to see how easy it is to do that.
kiwidude is offline   Reply With Quote
Old 04-01-2011, 12:53 PM   #25
theducks
Grand Sorcerer
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 14,831
Karma: 5654321
Join Date: Aug 2009
Location: (The original) Silicon Valley, USA
Device: Galaxy Tab 2, Astak Pocket Pro, K4NT
on Device: Stray OPF find and Eliminater

For whatever reason

Stray OPF files get left behind when their book file is (re)moved from the device folders.

My current work flow is to plod through hundreds of folders, spot and remove.

In all Valid cases, there is a book format with the exact same base filename (and the date-time stamp is within a minute) located within the same folder.

(Probably applies only to devices that appear/used as folders)
theducks is offline   Reply With Quote
Old 04-01-2011, 07:36 PM   #26
DoctorOhh
US Navy, Retired
DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.
 
DoctorOhh's Avatar
 
Posts: 8,861
Karma: 12755553
Join Date: Feb 2009
Location: North Carolina
Device: Nexus 7
Quote:
Originally Posted by theducks View Post
(Probably applies only to devices that appear/used as folders)
This is probably true.

Are you using save to disk or Connect to folder. If you use save to disk uncheck Save metadata in OPF file.
DoctorOhh is offline   Reply With Quote
Old 04-01-2011, 08:25 PM   #27
theducks
Grand Sorcerer
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 14,831
Karma: 5654321
Join Date: Aug 2009
Location: (The original) Silicon Valley, USA
Device: Galaxy Tab 2, Astak Pocket Pro, K4NT
Quote:
Originally Posted by dwanthny View Post
This is probably true.

Are you using save to disk or Connect to folder. If you use save to disk uncheck Save metadata in OPF file.
But I WANT the metadata (OPF) when there is a Book there , it speeds up the 'what is on the device' fetch (except for false ones )
My Astake ignore the presence, so Delete from the device is one source) There seems to be some Calibre process that allows me to create more orphans (I suspect it is 'Delete selected books (library view) from device'. No hard eveidnce.)
theducks is offline   Reply With Quote
Old 04-02-2011, 03:42 AM   #28
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,228
Karma: 1334002
Join Date: Oct 2010
Location: London, UK
Device: Kindle Paperwhite 3G, iPad 3, iPad Air
@theducks - ok, I think I have replicated what you are doing. If I understand correctly you are using the "Save to disc" function to put your books in a folder, because you want the metadata opf file to be there. But you are using the "Connect to folder" function to view what is in that folder, and then using the "Remove matching books from device" feature to delete books from that folder you don't want.

When I do those steps, it does indeed only delete the book format and leave behind a folder containing the .opf file, and the cover.

So I guess the first question is whether this is a bug that Kovid wants to do something about - you could open a ticket and ask I guess. I would presume that you may want two things to happen: (1) when the book gets deleted its opf file (and cover?) get deleted too, and (2) it deletes the folder?

If Kovid doesn't want to change this behaviour, then it would be an easy enough addition to the Quality Check plugin for something like "Clean orphaned folders" which given a root directory looks for folders that only contain .opf/jpg files and deletes them.
kiwidude is offline   Reply With Quote
Old 04-02-2011, 10:13 AM   #29
theducks
Grand Sorcerer
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 14,831
Karma: 5654321
Join Date: Aug 2009
Location: (The original) Silicon Valley, USA
Device: Galaxy Tab 2, Astak Pocket Pro, K4NT
Quote:
Originally Posted by kiwidude View Post
@theducks - ok, I think I have replicated what you are doing. If I understand correctly you are using the "Save to disc" function to put your books in a folder, because you want the metadata opf file to be there. But you are using the "Connect to folder" function to view what is in that folder, and then using the "Remove matching books from device" feature to delete books from that folder you don't want.

When I do those steps, it does indeed only delete the book format and leave behind a folder containing the .opf file, and the cover.

So I guess the first question is whether this is a bug that Kovid wants to do something about - you could open a ticket and ask I guess. I would presume that you may want two things to happen: (1) when the book gets deleted its opf file (and cover?) get deleted too, and (2) it deletes the folder?

If Kovid doesn't want to change this behaviour, then it would be an easy enough addition to the Quality Check plugin for something like "Clean orphaned folders" which given a root directory looks for folders that only contain .opf/jpg files and deletes them.
Not quite the work flow I use.
I connect my device and use 'Save to Disk' (device SD card in my case) with a big-ish save template the Chaley helped with

If I notice the message in the On Device column, that there are 2 copies (the book ID# is the same, but a variation in the filename caused the 'dup'), I right click the title: delete selected from device.
I think this is a WAD , not a bug .

BTW this is not a orphaned folder on the device (but it could become one after a cleaning. so that would be another feature ), but a Orphan in a folder. (I went looking for a example and found your other case)

My normal, is the folder contains All books in the series (or Author for NoSeries) with their OPF (my device navigates by folders, and shows valid, viewable formats, so I eliminated a folder)
Attached Thumbnails
Click image for larger version

Name:	Orphan and folder.png
Views:	154
Size:	47.9 KB
ID:	69387  
theducks is offline   Reply With Quote
Old 04-02-2011, 10:47 AM   #30
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,228
Karma: 1334002
Join Date: Oct 2010
Location: London, UK
Device: Kindle Paperwhite 3G, iPad 3, iPad Air
As agreed with theducks I have moved the related posts above into this plugin thread from the Plugin Ideas one as I intend to support it in this plugin.

To directly respond to your latest post - indeed your workflow is very slightly different but I think effectively it is the same issue - Save to disk writes three files, remove from disk only removes one of them

I had implemented a function in Quality Check which just pruned the (effectively empty) folders. I will extend that to also remove any orphaned .opf files. It already handles that if you only had one book per folder, but of course as per your template you can have multiple books in a folder and will just want the .opf files removed.

I am curious though - you don't have a cover in there too. Is that because you have that particular save to disk option turned off?
kiwidude 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
[GUI Plugin] Open With kiwidude Plugins 232 10-09-2014 12:38 AM
[GUI Plugin] Clipboard Search kiwidude Plugins 9 08-12-2014 03:36 AM
[GUI Plugin] Search the Internet kiwidude Plugins 205 08-11-2014 02:22 PM
[GUI Plugin] Kindle Collections (old) meme Plugins 2070 08-11-2014 12:02 AM
[GUI Plugin] Book Sync **Deprecated** kiwidude Plugins 111 06-07-2011 07:47 PM


All times are GMT -4. The time now is 12:36 AM.


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