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 06-21-2014, 03:33 PM   #1
DaltonST
Member
DaltonST began at the beginning.
 
DaltonST's Avatar
 
Posts: 21
Karma: 10
Join Date: Aug 2013
Device: Nexus 7 Tablet Android 4.4.2
[GUI Plugin] Author Book Count

This plugin updates a new custom column for the total number of books written by each author. This is done for every book in your library.


Main Features of version 0.1.0:

This initial release updates a new custom column for the total number of books for an author for each book of each author in your library. It always updates all books in the open library. The results are displayed in the left browser pane under "ABC"


Installation Notes:
  1. Calibre > Preferences > Custom Columns > Add a new custom column called "author_book_count" with a title of "ABC" and with the default "text, with column shown in the tag browser". Uncheck the new column to hide it. Save your work and restart Calibre. Refer to the attached configuration image file.
  2. Calibre > Preferences > Plugins > Load Plugin from File and load the attached zip file. Save your work and restart Calibre.
  3. Calibre > Preferences > Toolbar > Main Menu Toolbar and then add the icon for Author Book Count. Save your work. Close the window.
  4. If you don't want to see the count in the Book Details view, go to Calibre > Preferences > Look and Feel > Book Details and customize the view to your taste.
  5. The Calibre tag-browser defaults to sorting by Text instead of by Numbers within Text. To change this: Calibre > Preferences > Tweaks > Recognize Numbers Within Text When Sorting > and set numeric_collation = True. See the attached image file for reference.


Execution Notes:
  1. Click the icon for Author Book Count. Agree to a restart after it finishes, and it will execute. It has been optimized for speed, so it is very fast. Allow it to Restart Calibre when it asks.
  2. This plugin requires you to agree to allow it to restart upon job completion. If you accidentally click the icon, it will give you the option of aborting the execution and doing nothing, or continuing.
  3. As this runs as a job in the background, you must not execute other tasks either in the foreground or background while it is running. That means that you should not be running any other jobs when you run ABC. You must restart Calibre when it finishes. Since it is very fast (averaging in testing ~1 second per ~1,000 ebooks), you likely will not have any time to get any other tasks properly begun before it finishes anyway.


Special Notes:
  1. Requires Calibre version 1.38.0 or later.
  2. Bear in mind that a single book has a single author book count, so anthologies with a dozen authors will show the count for the author that has the lowest Calibre author id, which is to say the author that was first added to Calibre. If you see a discrepancy between the tag browser for ABC and the books shown in the window, simply right click one of their books and then > Similar Books > Books by Same Author. You should then see the books for which that author was one of multiple authors, and was not the first author listed in the list of authors. This behavior is not a bug, but rather the nature of having only a single value for a single custom column for a single book in Calibre. The count is correct, but the browser pane info on the left of the main gui has to be interpreted properly for books with multiple authors.
  3. Remember to back up your metadata.db file(s) not infrequently, and especially before starting Installation Step 1, above.
  4. This plugin does not update any ebooks or "real" metadata other than the linked new custom column that you defined in Installation Step 1, above.
  5. This plugin can be safely and simply uninstalled and the custom column and associated custom column data deleted via Preferences > Plugins > Remove and also Preferences > Custom Columns > Delete if you so desire.


Version History:
Spoiler:
Version 0.1.0 - 21 June 2014
Initial release of the Author Book Count plugin. The actual plugin name is: author_book_count
Attached Thumbnails
Click image for larger version

Name:	abc_configuration.png
Views:	155
Size:	261.1 KB
ID:	124456   Click image for larger version

Name:	recognizenumbersinsidetextwhensorting.png
Views:	137
Size:	64.6 KB
ID:	124462  
Attached Files
File Type: zip author_book_count_plugin.zip (45.9 KB, 779 views)

Last edited by DaltonST; 07-09-2014 at 11:08 PM.
DaltonST is offline   Reply With Quote
Old 07-22-2014, 11:16 AM   #2
asllearner
Member
asllearner began at the beginning.
 
Posts: 10
Karma: 10
Join Date: Aug 2011
Device: none
multiple authors

I like the plugin.

Of course, it would be nice if you could account for multiple authors.
Aren't you essentially collecting this information anyway? Since ABC is a single text field, can't you just list counts for authors in order of id, separated by commas, e. g. Mikado, Rogers & Hammerstein, ABC= "7, 9" => "Rogers, Hammerstein"?

Of course, I ask out of ignorance, as I am not a programmer, and haven't the slightest idea how you are doing the counting, and perhaps it would necessitate a few additional passes, thereby taking a bit longer, but it seems to be fast enough anyway.

Steps:
list individual authors
assign a count to each, including wherever they appear
for each book, assemble ABC value by stringing together values for each authors in order.

Is that much different than what you do now?

Any, nice plugin. It has come in quite handy. If the ABC were clickable in the book details, that would be a plus, of course...
asllearner is offline   Reply With Quote
Old 07-22-2014, 11:39 AM   #3
DaltonST
Member
DaltonST began at the beginning.
 
DaltonST's Avatar
 
Posts: 21
Karma: 10
Join Date: Aug 2013
Device: Nexus 7 Tablet Android 4.4.2
Calibre > Preferences > Look and Feel > Book Details

Glad you like it.

The instructions tell you how to customize Calibre for Book Details: "If you don't want to see the count in the Book Details view, go to Calibre > Preferences > Look and Feel > Book Details and customize the view to your taste." You must have turned it off, because the default is "on".

This plugin handles only the first author for the single custom column, which is ""text, with column shown in the tag browser". Adding multiple author counts in the existing column would be confusing to the user, to say the least. After I finish building another new plugin, I will think about adding an optional second new custom_column to deal with multiple authors in such a way that it will be intuitive to use.
DaltonST is offline   Reply With Quote
Old 07-22-2014, 12:18 PM   #4
asllearner
Member
asllearner began at the beginning.
 
Posts: 10
Karma: 10
Join Date: Aug 2011
Device: none
confusing?

Wow that was a quick reply!

Quote:
You must have turned it off, because the default is "on".
No, it seems to be working. It is "on". I probably wasn't being clear...unless, did something say make you think it's not working as it should?

Quote:
Adding multiple author counts in the existing column would be confusing to the user, to say the least.
It would be clearer for users like myself, cause we would see the parity between authors and the values and understood it right away. Now is what's confusing for us; I got all mixed up enough to suggest changing it.

I'll point out that not all users will have come to the forum and read your instructions first, clear as they are. Many of us install from within Calibre, and don't see the special directions til after we install it. I installed the plugin, it didn't work, naturally, and left it at that for a long time til on a whim I tried again when I had a little time to spare. Others might not have.


Quote:
I will think about adding an optional second new custom_column to deal with multiple authors in such a way that it will be intuitive to use.
Whatever you do, it's a nice plugin, so thanks. If you do go ahead, I'll get my two cents in now while the getting is good :

comma separated hyperlinked values, with tooltips indicating which author, and clickable individually for each author. Simple and intuitive. You very likely have better ideas, but I'd settle for that. On the other hand, this may be impossible under whatever limitations calibre's API has, so I'll just share my dream and let it all go....

Last edited by asllearner; 07-22-2014 at 12:23 PM.
asllearner is offline   Reply With Quote
Reply

Tags
plugins

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[GUI Plugin] Copy book covers as Standby images (Sony/PocketBook/Kindle/Nook) jackie_w Plugins 113 07-18-2014 06:42 PM
[GUI Plugin] Count Pages kiwidude Plugins 640 07-14-2014 04:06 AM
[GUI Plugin] Manage Sony x50 Reader Book List kpw Plugins 159 01-07-2012 02:44 PM
[GUI Plugin] Plugin Updater **Deprecated** kiwidude Plugins 159 06-19-2011 12:27 PM
[GUI Plugin] Book Sync **Deprecated** kiwidude Plugins 111 06-07-2011 07:47 PM


All times are GMT -4. The time now is 10:40 AM.


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