07-07-2024, 10:32 AM | #1 |
Age improves with wine.
Posts: 571
Karma: 95229
Join Date: Nov 2014
Device: Kindle Oasis, Kobo Libra II
|
Testing metadata plugboard function
I'm trying to test a metadata plugboard function for formatting author names using author_sort, but I can't see any way of testing it in the metadata plugboard dialog, and the Template Tester plugin only seems to let me process the book title.
There must be a way to do this, so I'm obviously being dim. In the meantime, the only way I can test it is to plug in my device, upload a book, unplug, check the author name, rinse and repeat, which is incredibly slow and tedious. |
07-07-2024, 01:27 PM | #2 |
Well trained by Cats
Posts: 30,452
Karma: 58055868
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
First of all, just to be clear. (apologies if you are trying to accomplish something else)
The metadata plugboard is NOT for manipulating filenames or paths sent to the device. For that, each device (while connected) has a 'Configure' option on the Icon. That is where the FILE (path) template is adjusted BTW My K4 saved settings in the config folder had this line (I peaked under the skirts) Code:
# use author sort # Use author sort instead of author use_author_sort = False Also remember that once a device has connected, that used a snapshot of the Preferences:Plugins entry at that time. Further configurations must be done with the device connected (so you can use the Icons 'Configure') You also list you have a Kobo and a Kindle. Those will need individual attention in both places . (There is no OSFA in device settings ) They all do things differently. OTOH The plugboard is for trickery when the device uses internal metadata for management. Since My K4 has no Series support, I trick the Title to prefix it with {series-index} -{title} |
Advert | |
|
07-07-2024, 01:36 PM | #3 |
Grand Sorcerer
Posts: 12,043
Karma: 7257323
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
By Template tester plugin do you mean the builtin template tester?
I'm not sure what you mean by "only seems to let me process the book title." Are you referring to the template tester available from the Metadata plugboard page? If so then you see "fake" information instead of actual book metadata because the current context isn't the book list. I suggest you test the templates in the main library using the template tester. Select the books of interest, open the tester (I defined the shortcut Ctrl+Alt+T to do that), write/run your template, then check the output. Depending on the complexity of what you are doing you might want to set breakpoints to help test/debug the template. When happy, either
|
07-07-2024, 02:14 PM | #4 |
Grand Sorcerer
Posts: 12,043
Karma: 7257323
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
For future reference: I found a way to make the template tester available from template text boxes use metadata from selected books on the library view. The changes have been submitted to Kovid.
Once this change is released you will be able to see real metadata in the template tester available on the Plugboards preferences screen. |
07-12-2024, 03:45 AM | #5 |
Age improves with wine.
Posts: 571
Karma: 95229
Join Date: Nov 2014
Device: Kindle Oasis, Kobo Libra II
|
No, I'm trying to fix the authors as displayed by the device. For example, I want to drop the "Jr." from Lloyd Biggle Jr. so he doesn't get sorted under J-for-Jr. I have set author_sort to "Biggle Jr., Lloyd" which the Kindle is happy with, but the Kobo knows better
Last edited by Phssthpok; 07-12-2024 at 03:51 AM. |
Advert | |
|
07-12-2024, 03:49 AM | #6 |
Age improves with wine.
Posts: 571
Karma: 95229
Join Date: Nov 2014
Device: Kindle Oasis, Kobo Libra II
|
Exactly what I was trying to do. But under the Template window there is a "Template value" panel with two columns: "Book title" and "Template value", and there seems to be no way to change "Book title" to some other column.
|
07-12-2024, 08:02 AM | #7 | |
Grand Sorcerer
Posts: 12,043
Karma: 7257323
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
It is possible to see the values of the fields and variables while the template is being processed. This requires using a GPM template (program: ). There are two ways:
FWIW: the fix mentioned in post #4 is in today's calibre release. |
|
07-22-2024, 08:07 AM | #8 | |
Age improves with wine.
Posts: 571
Karma: 95229
Join Date: Nov 2014
Device: Kindle Oasis, Kobo Libra II
|
Quote:
It would be nicer if the "Book details" heading were a dropdown where I could select the column I'm trying to mutate and see the original value and the mutated value side by side. Hooray! |
|
07-22-2024, 09:46 AM | #9 | |
Grand Sorcerer
Posts: 12,043
Karma: 7257323
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
That said, I will look at adding 2 columns to the template output table to permit displaying of columns in the book. |
|
07-22-2024, 09:55 AM | #10 |
Age improves with wine.
Posts: 571
Karma: 95229
Join Date: Nov 2014
Device: Kindle Oasis, Kobo Libra II
|
You miss my point. I want to test the thing I want to test ("here is some input, show me the corresponding output"), not a modified version of it. Otherwise when I modify it back again, I have to test it again, but I can't test it except by doing what I was doing before -- loading a book onto my device and checking that the result is correct -- because the available tools do not allow me to test it as-is, without modification.
|
07-22-2024, 10:12 AM | #11 | |
Grand Sorcerer
Posts: 12,043
Karma: 7257323
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
If what you want to do is modify book metadata (template input) even temporarily inside the tester then that won't happen. |
|
Tags |
metadata plugboard, testing |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
HELP Metadata plugboard not working | valdis_vesik | Library Management | 1 | 12-13-2019 10:01 PM |
Metadata plugboard problem | Phssthpok | Library Management | 9 | 07-19-2018 05:08 AM |
Metadata Plugboard - I don't get it... | _daclaus | Library Management | 3 | 08-25-2013 01:13 PM |
Metadata Plugboard | IxiaAurea | Calibre | 1 | 11-05-2011 02:13 PM |
metadata plugboard functions? | mfaine | Calibre | 2 | 01-09-2011 06:37 AM |