Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Library Management

Notices

Reply
 
Thread Tools Search this Thread
Old 11-05-2021, 10:12 PM   #1
Rellwood
Library Breeder (She/Her)
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: 1,168
Karma: 1900479
Join Date: Apr 2015
Location: Fullerton, California
Device: Kobo Aura HD (1) PW3 (4) PW3 2019 new edition (1)
Way to search replace for changed column names

When I try to do a search/replace for column names using Notepad++ on the metadata_pref_backup.json file and save it, none of the changes stay. When I go back and check the file the changes have reverted. I know I "edit with" and not just "open" the file and I know I save them.

Is there something I am missing?

Do I need to update a plugin or something?

Long story short, I have over the years changed the column names of some of my standard columns, and I am tired of my virtual libraries and searches and column sorting coming out wrong because the columns are no longer listed.

I have "#genres" to "#b_genres"
#dateadded #orig_date_added
#original_file_name to #original_bookfile_name
#amazon_dateadded to #amazon_purchase_date
#goodreads to #id_goodreads_1
#amazon to #id_amazon_1
#bookshelves to #da_bookshelves
#booksource to #primary_booksource

etc.

any suggestions on what I could/should do to fix it so that I can just do a search and replace for the old columns to the new columns and have it apply to all my library parts (understanding that I am just dealing with things in the main .json and not the plugin .jsons)
Rellwood is offline   Reply With Quote
Old 11-06-2021, 01:06 AM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,994
Karma: 22669822
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
that json file is a backup it is not used for anything so editing it is not going to achieve anything. The only in app way to do it is manually. Other options are to write a python script that uses the calibre database api to do it.
kovidgoyal is online now   Reply With Quote
Advert
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to search/replace tags from one column to another Rellwood Library Management 3 09-04-2021 08:04 PM
Regex in search problems (NOT Search&Replace; the search bar) lairdb Calibre 3 03-15-2017 07:10 PM
save multiple search/replace, or search/replace multiple ebooks user743 Editor 12 04-12-2014 02:38 AM
No search/replace on custom long text column? CWatkinsNash Library Management 2 06-20-2011 05:57 PM
Cleaning Title Names using Search and Replace JTAL604622 Calibre 2 05-24-2011 05:23 AM


All times are GMT -4. The time now is 05:20 AM.


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