![]() |
#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. |
![]() |
![]() |
![]() |
#2 |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 30,247
Karma: 57979022
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 ![]() 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} |
![]() |
![]() |
![]() |
#3 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,901
Karma: 7076137
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
|
![]() |
![]() |
![]() |
#4 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,901
Karma: 7076137
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. |
![]() |
![]() |
![]() |
#5 | |
Age improves with wine.
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 571
Karma: 95229
Join Date: Nov 2014
Device: Kindle Oasis, Kobo Libra II
|
Quote:
![]() Last edited by Phssthpok; 07-12-2024 at 02:51 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.
|
![]() |
![]() |
![]() |
#7 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,901
Karma: 7076137
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. |
|
![]() |
![]() |
![]() |
#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! |
|
![]() |
![]() |
![]() |
#9 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,901
Karma: 7076137
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. |
|
![]() |
![]() |
![]() |
#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.
|
![]() |
![]() |
![]() |
#11 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,901
Karma: 7076137
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 |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
HELP Metadata plugboard not working | valdis_vesik | Library Management | 1 | 12-13-2019 09:01 PM |
Metadata plugboard problem | Phssthpok | Library Management | 9 | 07-19-2018 04:08 AM |
Metadata Plugboard - I don't get it... | _daclaus | Library Management | 3 | 08-25-2013 12:13 PM |
Metadata Plugboard | IxiaAurea | Calibre | 1 | 11-05-2011 01:13 PM |
metadata plugboard functions? | mfaine | Calibre | 2 | 01-09-2011 05:37 AM |