Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Plugins

Notices

Reply
 
Thread Tools Search this Thread
Old 03-06-2019, 10:45 PM   #406
DaltonST
Deviser
DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.
 
DaltonST's Avatar
 
Posts: 2,265
Karma: 2090983
Join Date: Aug 2013
Location: Texas
Device: none
Quote:
Originally Posted by ilovejedd View Post
Yeah, I run them one by one at the moment. I was wondering what the order was for the optimal sequence.
This is the theoretical optimal sequence that implicitly assumes several conditions that may or may not be true for an individual user. That means that each user should test this predefined sequence, and if it can be improved, use their own empirically determined sequence.

Example: the predefined sequence may need to be executed several times in a row. Sort of like having to run a Windows registry cleaner multiple times to get everything due to predecessor-successor relationships.

Code:
        OPTIMAL_SEQUENCE = "All Tag Rules Tables in Optimal Sequence"

        if ruleset == OPTIMAL_SEQUENCE:
            self.ts_scrub_tag_metadata_using_ruleset(TAG_SPLITTING_RULES,scope='optimal')
            self.ts_scrub_tag_metadata_using_ruleset(TAG_CAPITALIZATION_RULES,scope='optimal')
            self.ts_scrub_tag_metadata_using_ruleset(TAG_STRING_REPLACEMENT_RULES,scope='optimal')
            self.ts_scrub_tag_metadata_using_ruleset(TAG_RULES,scope='optimal')
            self.ts_scrub_tag_metadata_using_ruleset(TAG_COMBINATION_RULES,scope='optimal')
            self.ts_scrub_tag_metadata_using_ruleset(TAG_PREFIX_SUFFIX_RULES,scope='optimal')
        else:
            self.ts_scrub_tag_metadata_using_ruleset(ruleset,scope='single')
DaltonST is offline   Reply With Quote
Old 03-07-2019, 04:03 AM   #407
Tanjamuse
Wizard
Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!
 
Posts: 1,327
Karma: 5306
Join Date: Jan 2014
Device: none
When I run the scrub-tools, could you add a feature that would show me which books has been affected with the marked option?
Tanjamuse is offline   Reply With Quote
Advert
Old 03-07-2019, 10:22 AM   #408
DaltonST
Deviser
DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.
 
DaltonST's Avatar
 
Posts: 2,265
Karma: 2090983
Join Date: Aug 2013
Location: Texas
Device: none
Quote:
Originally Posted by Tanjamuse View Post
When I run the scrub-tools, could you add a feature that would show me which books has been affected with the marked option?
The function works with the tag names directly using SQL, and does not know anything directly about book IDs impacted.

Assuming you are doing this in a WorkBench Library, you could install my Audit Log plug-in and activate it for only that Library and look at it after every run.

https://www.mobileread.com/forums/sh...85&postcount=1

You may be able to use its "undo" function too. The Original Post lists which standard columns can be undone. All custom columns may be undone. However, you should test AL on a copy of your WorkBench Library to ensure it will work for you.

Given the number of books in your FF library, I suggest that you "clear" the Audit Log frequently, then compress/defragment your metadata.db using Check Library.

If you decide that the AL plug-in isn't for you, be sure to uninstall its tables and triggers using its menu option for that purpose prior to actually uninstalling the plug-in itself. Otherwise, it will keep working silently in the background even if the plug-in were already uninstalled, making your metadata.db ever larger forever. The ToolTips in its menu explain this. Please remember this.



DaltonST
DaltonST is offline   Reply With Quote
Old 03-07-2019, 11:12 AM   #409
ilovejedd
hopeless n00b
ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.
 
ilovejedd's Avatar
 
Posts: 5,110
Karma: 19597086
Join Date: Jan 2009
Location: in the middle of nowhere
Device: PW4, PW3, Libra H2O, iPad 10.5, iPad 11, iPad 12.9
Quote:
Originally Posted by DaltonST View Post
The function works with the tag names directly using SQL, and does not know anything directly about book IDs impacted.
Curious though, doesn't Job Spy need to modify the books_[column]_link table as well? Is it not possible to use that to mark impacted books?
ilovejedd is offline   Reply With Quote
Old 03-07-2019, 11:56 AM   #410
Tanjamuse
Wizard
Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!
 
Posts: 1,327
Karma: 5306
Join Date: Jan 2014
Device: none
Quote:
Originally Posted by ilovejedd View Post
Curious though, doesn't Job Spy need to modify the books_[column]_link table as well? Is it not possible to use that to mark impacted books?
That's what I thought, which is why I asked if it was possible.
Tanjamuse is offline   Reply With Quote
Advert
Old 03-07-2019, 12:35 PM   #411
DaltonST
Deviser
DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.
 
DaltonST's Avatar
 
Posts: 2,265
Karma: 2090983
Join Date: Aug 2013
Location: Texas
Device: none
Version 1.0.144 New GUI Tool: Import CSV File to Update Metadata

Version 1.0.144 - 2019-03-07 New GUI Tool: Import CSV File to Update Metadata

See the attached overview image.

As always, new tools should be tested by you using your test Library before using them in your 'real' Library.

Added: as of Version 1.0.145, for tag-like CCs, the current tag metadata values used to match to the CSV match column values are in the format "red,green,blue,yellow" (not ever "red, green, blue, yellow" or
"red & green & blue & yellow"). So, regardless of how the tags are displayed in the Calibre GUI, and whether or not they are comma-separated tags or name-like tags using ampersands, they are compared as just described.


DaltonST
Attached Thumbnails
Click image for larger version

Name:	js_import_csv_file_to_update_metadata.jpg
Views:	186
Size:	391.4 KB
ID:	170076  

Last edited by DaltonST; 03-08-2019 at 01:08 PM. Reason: new info for Version 1.0.145
DaltonST is offline   Reply With Quote
Old 03-07-2019, 12:45 PM   #412
DaltonST
Deviser
DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.
 
DaltonST's Avatar
 
Posts: 2,265
Karma: 2090983
Join Date: Aug 2013
Location: Texas
Device: none
It is all done in SQL dynamically, like I said. SQL knows it, but Python does not. Python needs to know it to mark it. Hence, Python cannot mark it.
DaltonST is offline   Reply With Quote
Old 03-07-2019, 02:29 PM   #413
ilovejedd
hopeless n00b
ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.
 
ilovejedd's Avatar
 
Posts: 5,110
Karma: 19597086
Join Date: Jan 2009
Location: in the middle of nowhere
Device: PW4, PW3, Libra H2O, iPad 10.5, iPad 11, iPad 12.9
Quote:
Originally Posted by DaltonST View Post
It is all done in SQL dynamically, like I said. SQL knows it, but Python does not. Python needs to know it to mark it. Hence, Python cannot mark it.
Gotcha. Thanks for the clarification.
ilovejedd is offline   Reply With Quote
Old 03-08-2019, 01:50 AM   #414
Tanjamuse
Wizard
Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!
 
Posts: 1,327
Karma: 5306
Join Date: Jan 2014
Device: none
Quote:
Originally Posted by DaltonST View Post
Version 1.0.144 - 2019-03-07 New GUI Tool: Import CSV File to Update Metadata
Thanks for the new tool. Could you make an option where the column isn't updated if one tag doesn't match what's in the csv file, even if some of the other tags for the same book doesn't?

There is often crossovers in the fanfiction.

Example:

original column: Lord of The Rings Tolkien & The Hobbit (Movie)

it only matches with The Hobbit (Movie) in the update metadata.

Then it would do nothing because not all of the tags for the same book is matched?

I hope this made sense.
Tanjamuse is offline   Reply With Quote
Old 03-08-2019, 12:26 PM   #415
DaltonST
Deviser
DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.
 
DaltonST's Avatar
 
Posts: 2,265
Karma: 2090983
Join Date: Aug 2013
Location: Texas
Device: none
Version 1.0.145 "Import CSV File to Update Metadata"

Version 1.0.145 - 2019-03-08 "Import CSV File to Update Metadata" match logic changes for tag-like Custom Columns.


Added: for tag-like CCs, the current tag metadata values used to match to the CSV match column values are in the format "red,green,blue,yellow" (not ever "red, green, blue, yellow" or
"red & green & blue & yellow"). So, regardless of how the tags are displayed in the Calibre GUI, and whether or not they are comma-separated tags or name-like tags using ampersands, they are compared as just described.


As always, test a new tool in a test Library before actually updating any "real" metadata.



DaltonST

Last edited by DaltonST; 03-08-2019 at 01:21 PM. Reason: added info
DaltonST is offline   Reply With Quote
Old 03-08-2019, 01:42 PM   #416
Tanjamuse
Wizard
Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!
 
Posts: 1,327
Karma: 5306
Join Date: Jan 2014
Device: none
That means if I want an exact match it would have to match all the information in the specific column and not just one?

Could it be changed so that it checks the 2 or more tags independently? and then only update column if all is matched?
Tanjamuse is offline   Reply With Quote
Old 03-08-2019, 01:50 PM   #417
DaltonST
Deviser
DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.
 
DaltonST's Avatar
 
Posts: 2,265
Karma: 2090983
Join Date: Aug 2013
Location: Texas
Device: none
Try 'is contained in' but the sort of the tags in the csv cell is important.
DaltonST is offline   Reply With Quote
Old 03-08-2019, 01:55 PM   #418
Tanjamuse
Wizard
Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!
 
Posts: 1,327
Karma: 5306
Join Date: Jan 2014
Device: none
If I select the "is contained in" it still edits those where not all tags is matched.

I had hoped for a solution where it would check the tags individually, then if all the tags is matched with the csv mark it as updated, but if there is a book where only some of the tags is matched don't update it.
Tanjamuse is offline   Reply With Quote
Old 03-08-2019, 02:13 PM   #419
DaltonST
Deviser
DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.DaltonST ought to be getting tired of karma fortunes by now.
 
DaltonST's Avatar
 
Posts: 2,265
Karma: 2090983
Join Date: Aug 2013
Location: Texas
Device: none
The csv is matched to the CC, not the other way around.

You need to post an example csv row and what the corresponding book's CC looks like, and explain how the csv cell should be matched to the book's CC value.

Last edited by DaltonST; 03-08-2019 at 02:39 PM.
DaltonST is offline   Reply With Quote
Old 03-08-2019, 02:23 PM   #420
Tanjamuse
Wizard
Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!
 
Posts: 1,327
Karma: 5306
Join Date: Jan 2014
Device: none
Thanks.
Tanjamuse is offline   Reply With Quote
Reply

Tags
author aka, author pen name, colors, toolbag, toolbox, tools


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[GUI Plugin] KindleUnpack - The Plugin DiapDealer Plugins 523 07-15-2025 06:45 PM
[GUI Plugin] Ex Libris AlPe Plugins 87 10-10-2020 03:10 PM
[GUI Plugin] Marvin XD Philantrop Plugins 126 01-29-2017 12:48 PM
Ubuntu/Linux : Command to schedule a job with Calibre.( No GUI ) DurgaPrasad Calibre 0 10-16-2013 06:50 AM
[GUI Plugin] Plugin Updater **Deprecated** kiwidude Plugins 159 06-19-2011 12:27 PM


All times are GMT -4. The time now is 11:14 AM.


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