Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 02-21-2020, 04:25 PM   #1
Rellwood
Library Breeder
Rellwood ought to be getting tired of karma fortunes by now.Rellwood ought to be getting tired of karma fortunes by now.Rellwood ought to be getting tired of karma fortunes by now.Rellwood ought to be getting tired of karma fortunes by now.Rellwood ought to be getting tired of karma fortunes by now.Rellwood ought to be getting tired of karma fortunes by now.Rellwood ought to be getting tired of karma fortunes by now.Rellwood ought to be getting tired of karma fortunes by now.Rellwood ought to be getting tired of karma fortunes by now.Rellwood ought to be getting tired of karma fortunes by now.Rellwood ought to be getting tired of karma fortunes by now.
 
Rellwood's Avatar
 
Posts: 627
Karma: 1900141
Join Date: Apr 2015
Location: Fullerton, California
Device: Kobo Aura HD (1) PW3 (4) PW3 2019 new edition (1)
Column Icon Rules

Can I go into the library .json file and do a search and replace for columns in the rules section?

I changed some columns that I have rules for and wanted to save the hassle of going into the rules in preferences and change them.

I have two new columns that are replacing three columns that have multiple rules for each. Would like to open the .json file in Notepad++ and do a search and replace for the old columns to the new columns.

I don't like how editing the columns in preferences blanks out all the info past the column when you change the column.

Would be nice if changing the column doesn't change the other info. It's easier to delete the info rather than retype it. Especially since the values aren't available in dropdown format. Columns that are text in the tag browser should be shown in the dropdown format instead of requiring manual inputting the value since it's easy to mistype what the value should be when I am not able to see the column as I set the preference.
Rellwood is offline   Reply With Quote
Old 02-21-2020, 05:00 PM   #2
BetterRed
null operator
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 15,806
Karma: 18782456
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by Rellwood View Post
Can I go into the library .json file and do a search and replace for columns in the rules section?

I changed some columns that I have rules for and wanted to save the hassle of going into the rules in preferences and change them.

I have two new columns that are replacing three columns that have multiple rules for each. Would like to open the .json file in Notepad++ and do a search and replace for the old columns to the new columns.

I don't like how editing the columns in preferences blanks out all the info past the column when you change the column.

Would be nice if changing the column doesn't change the other info. It's easier to delete the info rather than retype it. Especially since the values aren't available in dropdown format. Columns that are text in the tag browser should be shown in the dropdown format instead of requiring manual inputting the value since it's easy to mistype what the value should be when I am not able to see the column as I set the preference.
If you edit the metadata_db_prefs_backup file then you'll need to restore the database to make the changes available to the calibre code.

There's an option in JS to save custom column details in a CSV, maybe you could use that as a place from which to get prior values.

BR
BetterRed is offline   Reply With Quote
Old 02-21-2020, 05:23 PM   #3
Rellwood
Library Breeder
Rellwood ought to be getting tired of karma fortunes by now.Rellwood ought to be getting tired of karma fortunes by now.Rellwood ought to be getting tired of karma fortunes by now.Rellwood ought to be getting tired of karma fortunes by now.Rellwood ought to be getting tired of karma fortunes by now.Rellwood ought to be getting tired of karma fortunes by now.Rellwood ought to be getting tired of karma fortunes by now.Rellwood ought to be getting tired of karma fortunes by now.Rellwood ought to be getting tired of karma fortunes by now.Rellwood ought to be getting tired of karma fortunes by now.Rellwood ought to be getting tired of karma fortunes by now.
 
Rellwood's Avatar
 
Posts: 627
Karma: 1900141
Join Date: Apr 2015
Location: Fullerton, California
Device: Kobo Aura HD (1) PW3 (4) PW3 2019 new edition (1)
Quote:
Originally Posted by BetterRed View Post
If you edit the metadata_db_prefs_backup file then you'll need to restore the database to make the changes available to the calibre code.

There's an option in JS to save custom column details in a CSV, maybe you could use that as a place from which to get prior values.

BR
I know about the option in js. I use it all the time, but I was looking for a shorter cut. I have a ton of "goodreads read status" "read status" and "book source" and "book style" rules for information on my Goodreads and Calibre library and they are all single rules for single columns . I have my library set up with a "blank column" which is a text column that I bury away and use it to set up 3 other columns as composite to that one.

So I have three blank columns and they contain the icons. One is "GR Info" which shows the icons I have for my Goodreads read status (if it's read then I have a little calander icon, if it's to be read then I have a star icon, etc). I have read column which mirrors (hopefully) the GR Info column if it's in goodreads. Those icons are trigggered by the read status column which is in turned triggered by either manually when I update the book or by Goodreads Sync when I update a columm.

Pretty much all my Goodreads Sync, Library, and Icons are interconnected so I don't have to do the heavy lifting. When I review my library I just scroll down and see the icons in the columns and can tell a lot about that book without having to scroll over or open the details.

On top of that, if I go and change the rules manually, I have to resort them all back to the way they should be. Some rules need to be processed before others.

Knowing I can go into the .json file and do a simple search/replace (I changed the columns from text to comma separated) with only having to restore the library makes me happy.

TL/DR - I use a lot of icons in special columns triggered by other columns in various ways and would much rather do a search and replace in the .json than manually go in and change them. Hapy to know that I can do it! Thanks!
Rellwood is offline   Reply With Quote
Old 02-21-2020, 05:56 PM   #4
dunhill
Zealot
dunhill doesn't litterdunhill doesn't litter
 
dunhill's Avatar
 
Posts: 118
Karma: 128
Join Date: Sep 2017
Device: moon+ reader
Suppose you have two biliotacas. One with the rules and the other not. If I copy the book from the first to the second, it seems to me that the rules of the first would pass to the second.
dunhill is offline   Reply With Quote
Old 02-22-2020, 10:28 AM   #5
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: 1,648
Karma: 428278
Join Date: Aug 2013
Location: Texas
Device: 10" Win10 Tablet w/Calibre64, CalibreSpy & Freda+
Column Icons in Preferences > Look & Feel can be exported and then imported. You could export them, do a mass change, then import the changed file.

Be sure to keep an original copy of the export file, and a backup of metadata.db, before you do this...


DaltonST
DaltonST is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Rearrange Column Icon Rules - Request madeleinelevy Library Management 2 08-16-2019 12:38 AM
Icon Rules Tanjamuse Library Management 1 03-02-2015 07:17 AM
Column coloring rules BookJunkieLI Library Management 7 12-06-2014 05:18 PM
Custom Column Icon Help alanHd Library Management 2 02-04-2013 03:30 AM


All times are GMT -4. The time now is 04:41 PM.


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