Register Guidelines E-Books Today's Posts Search

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

Notices

Reply
 
Thread Tools Search this Thread
Old 03-24-2012, 07:40 PM   #271
kiwidude
Calibre Plugins 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,732
Karma: 2197770
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
Preferences -> Toolbars, there are different toolbars for when a device is and is not connected, you have to add the plugins to both. Grumble, mumble, hate that "feature"...
kiwidude is offline   Reply With Quote
Old 03-24-2012, 08:00 PM   #272
theducks
Well trained by Cats
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: 31,123
Karma: 60406498
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by kiwidude View Post
Preferences -> Toolbars, there are different toolbars for when a device is and is not connected, you have to add the plugins to both. Grumble, mumble, hate that "feature"...
That feature is good in that there are 'context sensitive' items
The alternative is for the Item itself to recognise the 'Connected' status and grey itself out if no connected device (My favourite way)
theducks is offline   Reply With Quote
Advert
Old 03-24-2012, 08:22 PM   #273
kiwidude
Calibre Plugins 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,732
Karma: 2197770
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
Sorry theducks but there is nothing "good" about that feature in my opinion. It is completely and totally unprecedented in any application I have ever used - applications do not remove their main toolbar when "context changes" in such a minor way like this. Add a new toolbar by all means, but not swapping out the main one.

Besides which, it should not be a "context switch". Just because I have a device plugged in does not change context. In all probability it could well be plugged in just to charge. That changes nothing about how I want to be using calibre, but this nonsense about adding icons to multiple toolbars *forces* the user into either working differently, unplugging their device, getting confused, or faffing around with the clumsy process of putting icons on multiple toolbars, and trying to keep them all in sync or else icons get moved around just because their device is plugged in.

It is a silly idea that I hate with a passion. But as I have said before, my views on this are based around using and supporting a lot of plugins - and GUI plugins didn't exist when this implementation was created in calibre.

Last edited by kiwidude; 03-24-2012 at 08:26 PM.
kiwidude is offline   Reply With Quote
Old 03-25-2012, 08:14 AM   #274
Dopedangel
Wizard
Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.
 
Dopedangel's Avatar
 
Posts: 1,795
Karma: 30548723
Join Date: Dec 2006
Location: Singapore
Device: Boyue
Quote:
Originally Posted by kiwidude View Post
Sorry theducks but there is nothing "good" about that feature in my opinion. It is completely and totally unprecedented in any application I have ever used - applications do not remove their main toolbar when "context changes" in such a minor way like this. Add a new toolbar by all means, but not swapping out the main one.

Besides which, it should not be a "context switch". Just because I have a device plugged in does not change context. In all probability it could well be plugged in just to charge. That changes nothing about how I want to be using calibre, but this nonsense about adding icons to multiple toolbars *forces* the user into either working differently, unplugging their device, getting confused, or faffing around with the clumsy process of putting icons on multiple toolbars, and trying to keep them all in sync or else icons get moved around just because their device is plugged in.

It is a silly idea that I hate with a passion. But as I have said before, my views on this are based around using and supporting a lot of plugins - and GUI plugins didn't exist when this implementation was created in calibre.
I agree with you completely that's why I use the 2nd toolbar for all my plugins etc and the main toolbar I just keep the basic buttons.
Dopedangel is offline   Reply With Quote
Old 03-25-2012, 08:52 AM   #275
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: 45,435
Karma: 27757438
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
@kiwidude: Specially for you: http://bazaar.launchpad.net/~kovid/c...revision/11768
kovidgoyal is offline   Reply With Quote
Advert
Old 04-06-2012, 08:01 PM   #276
Culex
Member
Culex began at the beginning.
 
Posts: 13
Karma: 10
Join Date: Feb 2012
Device: Kindle Touch
Count ePub/Mobi Statistics
-------------------------------
Logfile for book ID 411 (The Rolling Stones - lit)
FAILED TO COUNT PAGES
FAILED TO COUNT WORDS
411
InputFormatPlugin: LIT Input running
on C:\Users\Culex\AppData\Local\Temp\calibre_0.8.46_t mp_t5h0w6\cfvcox_count_pages\411.lit
Parsing all content...
Forcing HEINLEIN, Robert A - The Rolling Stones.htm into XHTML namespace
Estimated accurate page count
Lines: 8059 Divs: 4 Paras: 2699
Accurate count: 259 Fast count: 221
Page count: 259
Word count: 65625
Traceback (most recent call last):
File "calibre_plugins.count_pages.jobs", line 128, in do_statistics_for_book
WindowsError: [Error 32] The process cannot access the file because it is being used by another process: u'C:\\Users\\Culex\\AppData\\Local\\Temp\\calibre_ 0.8.46_tmp_t5h0w6\\cfvcox_count_pages\\411.lit'

I get this error whenever I do a word count on any LIT or LRF book. AZW, EPUB, CBR, MOBI, PDF, ZIP all work without error.

Has anyone else had any trouble with LIT or LRF files? It used to work in the previous version of count pages. If there is both a MOBI and LIT version, Count Pages defaults to LIT.

Last edited by Culex; 04-06-2012 at 08:13 PM.
Culex is offline   Reply With Quote
Old 04-06-2012, 08:09 PM   #277
theducks
Well trained by Cats
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: 31,123
Karma: 60406498
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by Culex View Post
Count ePub/Mobi Statistics
-------------------------------
Logfile for book ID 411 (The Rolling Stones - lit)
FAILED TO COUNT PAGES
FAILED TO COUNT WORDS
411
InputFormatPlugin: LIT Input running
on C:\Users\Culex\AppData\Local\Temp\calibre_0.8.46_t mp_t5h0w6\cfvcox_count_pages\411.lit
Parsing all content...
Forcing HEINLEIN, Robert A - The Rolling Stones.htm into XHTML namespace
Estimated accurate page count
Lines: 8059 Divs: 4 Paras: 2699
Accurate count: 259 Fast count: 221
Page count: 259
Word count: 65625
Traceback (most recent call last):
File "calibre_plugins.count_pages.jobs", line 128, in do_statistics_for_book
WindowsError: [Error 32] The process cannot access the file because it is being used by another process: u'C:\\Users\\Culex\\AppData\\Local\\Temp\\calibre_ 0.8.46_tmp_t5h0w6\\cfvcox_count_pages\\411.lit'

I get this error whenever I do a word count on any LIT book. MOBI works without error? Has anyone else had any trouble with LIT files? It used to work in the previous version of count pages. If there is both a MOBI and LIT version, Count Pages defaults to LIT.
Count pages should not even try LIT files. EPUB and Mobi are the listed formats. You set the priority of which gets done (it is NOT both)
theducks is offline   Reply With Quote
Old 04-06-2012, 08:24 PM   #278
Culex
Member
Culex began at the beginning.
 
Posts: 13
Karma: 10
Join Date: Feb 2012
Device: Kindle Touch
On a different note, when comparing the length of 2 books which is more accurate? Page Count or Word Count? I have 1 book that is 304 pages and 115k words, and a 589 page book with 95k words. Which is the longer read?
Culex is offline   Reply With Quote
Old 04-06-2012, 08:32 PM   #279
kiwidude
Calibre Plugins 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,732
Karma: 2197770
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
@Culex - re your error - change your "Preferred Input Format Order" in Preferences -> Behaviour so that MOBI is higher than LIT.

Re "accuracy" - word count will always be more accurate. But bear in mind that if your books are from different sources, even word count will differ if for instance there are contents pages, previews of the next book, author information, copyright etc etc.
kiwidude is offline   Reply With Quote
Old 04-06-2012, 08:42 PM   #280
Culex
Member
Culex began at the beginning.
 
Posts: 13
Karma: 10
Join Date: Feb 2012
Device: Kindle Touch
Quote:
Originally Posted by kiwidude View Post
@Culex - re your error - change your "Preferred Input Format Order" in Preferences -> Behaviour so that MOBI is higher than LIT.

Re "accuracy" - word count will always be more accurate. But bear in mind that if your books are from different sources, even word count will differ if for instance there are contents pages, previews of the next book, author information, copyright etc etc.
Thanks for the quick reply. In Preferences, it's EPUB -> MOBI -> LIT already.
Culex is offline   Reply With Quote
Old 04-06-2012, 09:06 PM   #281
kiwidude
Calibre Plugins 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,732
Karma: 2197770
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
Hmmm... interesting. I just tried that same scenario and like you got the same error. It should be looking at the MOBI, not the LIT file based on those preferences but clearly something isn't working as it should.

@Kovid - my code is calling:
Code:
from calibre.gui2.convert.single import get_input_format_for_book
...
input_format, input_formats = get_input_format_for_book(self.db, book_id, None)
My preferred input order is set to: EPUB, ZIP, MOBI, PRC, LIT

However the result I get back from the function above seems to be an *alphabetical* sort, not a preference sort. As it will give me [ 'epub','lit','mobi','zip'] or ['lit','mobi','zip'] for a book with those formats respectively.

Clearly not what I wanted. Is the function in calibre not working right, am I using it wrong, or is it actually right but just not doing what I want? It has code in it saying "sort_formats_by_preference" which led me to believe it was the right thing but clearly not...
kiwidude is offline   Reply With Quote
Old 04-06-2012, 09:57 PM   #282
Culex
Member
Culex began at the beginning.
 
Posts: 13
Karma: 10
Join Date: Feb 2012
Device: Kindle Touch
I have also noticed that Word Count on PDF's is totally inaccurate. I have a EPUB that gives me 434 pages w/ 119k words, and the PDF gives me 539 pages with 8.9k words. I've noticed as a trend it seems to be close with the page counts but word counts are exceptionally less w/ PDF. I don't really consider it to be a big deal as I hate PDF anyway. Just FYI.

Oh, you can't disable the LIT plugin either as a temporary workaround.
Culex is offline   Reply With Quote
Old 04-07-2012, 12:13 AM   #283
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: 45,435
Karma: 27757438
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
What that function returns depend on whether you have converted the book in the past. If you have then it returns the format you used as the input.

You want to be looking at the first return value which is the preferred input format, not the second which is just a list of formats available for the book.

For example:

Code:
calibre-debug -c "from calibre.library import db; db = db(); from calibre.gui2.convert.single import get_input_format_for_book as g; print g(db, 1053, 'asdff')"
gives
(u'mobi', [u'lit', u'mobi'])
Where I passed in 'asdff' as pref to ensure that a previous conversion was not used.
kovidgoyal is offline   Reply With Quote
Old 04-07-2012, 09:05 AM   #284
kiwidude
Calibre Plugins 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,732
Karma: 2197770
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
Thxs for the reply Kovid. Hmmm, guess that function isn't doing what I want then. All I wanted was an ordered intersection of the users preferred input formats, and the formats available for a book which I had thought (clearly wrongly) that function gave me.

I'll figure another way, thanks.
kiwidude is offline   Reply With Quote
Old 04-07-2012, 12:02 PM   #285
kiwidude
Calibre Plugins 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,732
Karma: 2197770
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
Quote:
Originally Posted by Culex View Post
I have also noticed that Word Count on PDF's is totally inaccurate. I have a EPUB that gives me 434 pages w/ 119k words, and the PDF gives me 539 pages with 8.9k words. I've noticed as a trend it seems to be close with the page counts but word counts are exceptionally less w/ PDF. I don't really consider it to be a big deal as I hate PDF anyway. Just FYI.
That isn't overly unexpected (I assume you meant 119k vs 89k words rather than 8.9k). Remember that it has to convert the pdf to epub to count words/pages. And as has been said a thousand times on these forums pdf conversions to anything as a general rule will suck. Plus you have to make sure the books were identical to have any basis for comparison anyway. Header/footers, page numbers, broken words etc are all going to distort the page/word count for a pdf conversion.
Quote:
Oh, you can't disable the LIT plugin either as a temporary workaround.
Patience... I'm going to push a new version shortly.

Last edited by kiwidude; 04-07-2012 at 12:07 PM.
kiwidude is offline   Reply With Quote
Reply

Tags
count, count pages, page count, pages, plugin


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[GUI Plugin] Quality Check kiwidude Plugins 1252 08-02-2025 09:53 AM
[GUI Plugin] Open With kiwidude Plugins 404 02-21-2025 05:42 AM
[GUI Plugin] Quick Preferences kiwidude Plugins 62 03-16-2024 11:47 PM
[GUI Plugin] Kindle Collections (old) meme Plugins 2070 08-11-2014 12:02 AM
[GUI Plugin] Plugin Updater **Deprecated** kiwidude Plugins 159 06-19-2011 12:27 PM


All times are GMT -4. The time now is 12:46 PM.


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