For example, edit the url field of all selected items and replace
http://www.amazon.com
with
https://www.amazon.com
Preferably, with optional regex support for more sophisticated substitutions.
Mass text substitution on fields
Re: Mass text substitution on fields
Thanks for the feedback. As you probably know you can use the backend SQL for now, but pointing it out for others finding this thread.
Re: Mass text substitution on fields
Thanks. I tried that and it worked, but PocketPedia won't sync the records whose fields were altered.Conor wrote:Thanks for the feedback. As you probably know you can use the backend SQL for now, but pointing it out for others finding this thread.
Re: Mass text substitution on fields
You are ahead of me.
Pocketpedia relies on the "date edited" to keep the sync fast.
You can swipe left and delete the collection from Pocketpedia (if you sync more than one Pedia) or delete Pocketpedia and reinstall to have the database sent brand new to Pocketpedia. Otherwise here is the SQL command to update date edited to today.
Pocketpedia relies on the "date edited" to keep the sync fast.
You can swipe left and delete the collection from Pocketpedia (if you sync more than one Pedia) or delete Pocketpedia and reinstall to have the database sent brand new to Pocketpedia. Otherwise here is the SQL command to update date edited to today.
Code: Select all
update zentry set zdateedited = 563107125.271653 where zurl like "%amazon.com%";
Re: Mass text substitution on fields
I did "ZDATEEDITED = datetime('now')". Oddly, syncing PocketPedia a second time repeated itself rather than deciding there was nothing to do. Are you storing timestamps as local time rather than UTC? Or is there something wonky with PocketPedia?
Re: Mass text substitution on fields
The function "datetime" does not work, as SQL date is based of January 1st 1970, and the Mac date is based from January 1st 2001. So your 30 years behind, you could add 30 years worth of seconds (978328800).
Re: Mass text substitution on fields
That doesn't give you the number range you're showing (563...). It's not clear how that number was generated.Conor wrote:The function "datetime" does not work, as SQL date is based of January 1st 1970, and the Mac date is based from January 1st 2001. So your 30 years behind, you could add 30 years worth of seconds (978328800).
Re: Mass text substitution on fields
Sorry, it would be subtract instead of add to the internal SQL date function.
I copied pasted from a forum post 563107125.271653 = 17.8560098 years. Starting from 2001, would put that at around October 2018.
I copied pasted from a forum post 563107125.271653 = 17.8560098 years. Starting from 2001, would put that at around October 2018.