01-27-2011, 09:30 PM | #1 |
Calibre Plugins Developer
Posts: 4,681
Karma: 2162246
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
|
[GUI Plugin] Quick Preferences
This plugin provides a way to quickly switch calibre settings without manually clicking through the various calibre Preferences dialogs. Specifically it caters for preferences related to adding books (but could be added to in future if needed)
Some example common use cases: - You are importing batches of books with differing filename conventions and want to quickly toggle between various regular expressions for each. - You want to quickly toggle which metadata source(s) you are downloading from. By default I have included two regex patterns - the default Calibre one, and a second for handling titles in "author [- optional series #] - title" format. Main Features:
Special Notes:
Paypal Donations: Last edited by kiwidude; 03-17-2024 at 12:46 AM. Reason: New version |
04-03-2011, 11:52 AM | #2 |
Calibre Plugins Developer
Posts: 4,681
Karma: 2162246
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
|
v1.2 Released
Changes in v1.2:
|
Advert | |
|
04-08-2011, 02:40 PM | #3 |
Connoisseur
Posts: 58
Karma: 10
Join Date: Mar 2011
Device: Kindle 3 3G
|
I just looked at it. Is there a possibility to push it up to, say, 10 menu entries like the first four?
|
04-08-2011, 02:48 PM | #4 |
Calibre Plugins Developer
Posts: 4,681
Karma: 2162246
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
|
Moderator Notice Moved Loeffel's post above from the Plugin Ideas thread @Loeffel - when I wrote this plugin I didn't know how to write a grid in Qt, hence why the limit of four items It has been on the list for a rewrite for a while but I figured I would wait until someone asked for more. It should really have a grid like the Search the Internet plugin allowing you to add, remove and reorder items. It isn't trivial but I will take a look into it now. |
04-08-2011, 03:16 PM | #5 |
Connoisseur
Posts: 58
Karma: 10
Join Date: Mar 2011
Device: Kindle 3 3G
|
For me personally it would be enough to edit an INI-file. You know as admin I am not one of those who say there must be a gui for such things. ;-)
All major server systems (linux, windows, os/2) must be maintained via command prompt so it doesn't matters. :-D But I know that such people are rare among the normal users as they don't know how to use such things properly and a gui is much easier to understand. |
Advert | |
|
04-08-2011, 03:29 PM | #6 |
Calibre Plugins Developer
Posts: 4,681
Karma: 2162246
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
|
In this case it is very much a hard-coded limit to the plugin with how the data is stored etc. It just let me get the plugin get developed very quickly without much effort. I'm making the changes now, it should be done in a few hours hopefully.
|
04-08-2011, 04:21 PM | #7 |
Connoisseur
Posts: 58
Karma: 10
Join Date: Mar 2011
Device: Kindle 3 3G
|
You really don't need to hurry. Nevertheless you're doing a great job.
I should come back to programming again haven't done it for a long time. Even so it makes fun. |
04-08-2011, 09:04 PM | #8 |
Calibre Plugins Developer
Posts: 4,681
Karma: 2162246
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
|
v1.3 Released
Changes in this release
The second feature above may take some explaining. The "Swap author names" checkbox is traditionally set completely independently of your regular expression for the filename matching. However now that there is no limit on the number of items, users might find it more convenient to actually change both their regex and this setting in one click. Say for instance I am importing batches of books which have variations in filenames like this: Code:
Title - FN LN Title - LN, FN FN LN - Title LN, FN - Title The default behaviour of the plugin is the same as it always was of treating the author first name and last name setting as independent of the file pattern. So your menu items will look like this: Code:
Title - Author Swap Names: Unspecified Author - Title Swap Names: Unspecified However you now have the option of specifying the swap author name setting for your menu items. So I could create four menu items that look something like this: Code:
Title - FN LN Swap Names: False Title - LN, FN Swap Names: True FN LN - Title Swap Names: False LN, FN - Title Swap Names: True |
04-09-2011, 04:39 AM | #9 |
Connoisseur
Posts: 58
Karma: 10
Join Date: Mar 2011
Device: Kindle 3 3G
|
Cool! Thanks, will give it a try this weekend.
|
04-09-2011, 01:25 PM | #10 |
Connoisseur
Posts: 58
Karma: 10
Join Date: Mar 2011
Device: Kindle 3 3G
|
Hmm, with my first try I entered all at once and got the following error message:
calibre, version 0.7.54 ERROR: Unhandled exception: <b>AttributeError</b>:'NoneType' object has no attribute 'text' Traceback (most recent call last): File "calibre_plugins.quick_preferences.action", line 146, in show_configuration File "site-packages\calibre\customize\__init__.py", line 171, in do_user_config File "calibre_plugins.quick_preferences.__init__", line 69, in save_settings File "calibre_plugins.quick_preferences.config", line 353, in save_settings File "calibre_plugins.quick_preferences.config", line 148, in get_data File "calibre_plugins.quick_preferences.config", line 165, in convert_row_to_data AttributeError: 'NoneType' object has no attribute 'text' I don't know what went wrong, when I entered everything again, one by one leaving the configuration, everything worked fine. |
04-09-2011, 01:32 PM | #11 |
Calibre Plugins Developer
Posts: 4,681
Karma: 2162246
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
|
@Loeffel - funnily enough I got that same error once too while I was developing it, then no matter what I did I couldn't replicate it. I will have to take another look to see if I can figure out how to replicate it. It sounds like other than that you are now up and running ok, correct?
EDIT: I figured out the problem, new version up shortly. You have to add a new row, move it and not assign a shortcut to it to get the error. Easily fixed. Before I post the fix, are you happy with everything else? Last edited by kiwidude; 04-09-2011 at 01:35 PM. |
04-09-2011, 02:15 PM | #12 |
Connoisseur
Posts: 58
Karma: 10
Join Date: Mar 2011
Device: Kindle 3 3G
|
Ahhh, I couldn't replicate the error too. ;-)
Yes it is fine, it runs smooth as I can say by now, but just didn't finished testing by now. |
04-09-2011, 02:26 PM | #13 |
Calibre Plugins Developer
Posts: 4,681
Karma: 2162246
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
|
v1.3.1 Released
Changes in this release:
|
07-29-2011, 01:01 PM | #14 |
W2E & ePub freak
Posts: 38
Karma: 10
Join Date: May 2009
Device: cybook gen3 + boox60
|
|
07-29-2011, 04:20 PM | #15 |
Calibre Plugins Developer
Posts: 4,681
Karma: 2162246
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
|
Hi Luca,
When you add books to Calibre, then depending on your settings and the circumstance there are times when the filename of the book file being added is used to determine information like the title and author for your Calibre book record. IIRC Calibre comes with a default setting which expects books in a "title - author" format (i.e. anything after a spaced hyphen is considered as the author). This is specified as a regular expression pattern that you can see on the Preferences->Adding Books screen. That particular pattern is "fine" for simple cases if your books are named in that way, but if the filenames include series information for instance then you will want to use a different pattern. One example of an additional pattern is included as the second plugin pre-bundled option mentioned above. This particular pattern will detect either "author - title" or "author - series - title" books. Those two happen to be the two I use the most to use as a starting point. So this plugin lets a user quickly switch between their different patterns before adding a bunch of books. That saves on the manual "fiddling" that you often have to do where you get the title/author the wrong way around etc. I hope that helps explain it. For more info see the help manual or ask in the Library Management forum. |
Tags |
error, nameerror, quick preferences |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[GUI Plugin] Search the Internet | kiwidude | Plugins | 434 | 09-30-2024 04:04 AM |
[GUI Plugin] Clipboard Search | kiwidude | Plugins | 29 | 04-02-2024 11:05 PM |
[GUI Plugin] Open With | kiwidude | Plugins | 403 | 04-01-2024 09:39 AM |
[GUI Plugin] Walk Search History | kiwidude | Plugins | 38 | 03-17-2024 01:47 AM |