![]() |
#1 |
Calibre Plugins Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,665
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-16-2024 at 11:46 PM. Reason: New version |
![]() |
![]() |
![]() |
#2 |
Calibre Plugins Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,665
Karma: 2162246
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
|
v1.2 Released
Changes in v1.2:
|
![]() |
![]() |
Advert | |
|
![]() |
#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?
|
![]() |
![]() |
![]() |
#4 |
Calibre Plugins Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,665
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. |
![]() |
![]() |
![]() |
#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 | |
|
![]() |
#6 |
Calibre Plugins Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,665
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.
|
![]() |
![]() |
![]() |
#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. |
![]() |
![]() |
![]() |
#8 |
Calibre Plugins Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,665
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 ![]() |
![]() |
![]() |
![]() |
#9 |
Connoisseur
![]() Posts: 58
Karma: 10
Join Date: Mar 2011
Device: Kindle 3 3G
|
Cool! Thanks, will give it a try this weekend.
|
![]() |
![]() |
![]() |
#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. |
![]() |
![]() |
![]() |
#11 |
Calibre Plugins Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,665
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 12:35 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. |
![]() |
![]() |
![]() |
#13 |
Calibre Plugins Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,665
Karma: 2162246
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
|
v1.3.1 Released
Changes in this release:
|
![]() |
![]() |
![]() |
#14 |
W2E & ePub freak
![]() Posts: 38
Karma: 10
Join Date: May 2009
Device: cybook gen3 + boox60
|
|
![]() |
![]() |
![]() |
#15 |
Calibre Plugins Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,665
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 |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
[GUI Plugin] Clipboard Search | kiwidude | Plugins | 29 | 04-02-2024 10:05 PM |
[GUI Plugin] Search the Internet | kiwidude | Plugins | 433 | 04-01-2024 05:48 PM |
[GUI Plugin] Open With | kiwidude | Plugins | 403 | 04-01-2024 08:39 AM |
[GUI Plugin] Walk Search History | kiwidude | Plugins | 38 | 03-17-2024 12:47 AM |