![]() |
#1 |
Enthusiast
![]() Posts: 30
Karma: 10
Join Date: Jun 2020
Device: Kobo Aura HD
|
program move from "publisher" to a new column with conditions
Hi,
There no second series column possibility, so before I know the existing of "custum column" I used "publisher" to store my reference "SN <number>" but only in some specifics books But now, I want to create a new custum column (SN) and use this number only if the format "SN [0-9][0-9][0-9][0-9]" exist in my publisher's column (and also remove/replace this name in publisher) Do you think it's possible? (with search&replace ?) A program like that create a new column SN for each ebook in my library do If regex publisher tag is like SN [0-9][0-9][0-9][0-9] then copy the number in the SN column replace publisher column with "Gallimard" else donothing fi done Example SN 0345 (string in publisher column) ==> 345 (number in SN column ) THanks for your suggestions (and sorry for my English) PS : my first idea was to create a SQL scripts directly on the sqllite (metadata) but it's very risky. I prefere using internal command if it(s possible Last edited by Doum; 02-03-2023 at 06:07 AM. |
![]() |
![]() |
![]() |
#2 |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,440
Karma: 48895676
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2, K4NT(Fixed: New Bat.), Galaxy Tab A
|
No program needed.
Bulk mode of Metadata edit: Search and replace) I would do this on pre-filtered (search results) selections 2 passes on the selected records Search: SN (\d{4}) Pass 1 copies the captured number int the destination Dest: \1 Pass 2 changes the {Publisher} to the new value dest: Gallimard |
![]() |
![]() |
![]() |
#3 |
Enthusiast
![]() Posts: 30
Karma: 10
Join Date: Jun 2020
Device: Kobo Aura HD
|
Thanks the ducks , i will do that
|
![]() |
![]() |
![]() |
#4 |
Enthusiast
![]() Posts: 30
Karma: 10
Join Date: Jun 2020
Device: Kobo Aura HD
|
Just one more question .
As you can see on the image file , the filter is correctly applicated but it takes also others formats in the destination ? How to applied ONLY SN (\d{4}) search&replace take action on rows where the filter it's not applicated ... strange . the "do_nothing" in my if/then/else doesn't work Thanks for your help Exemple : if publisher is "Flammarion" you will have in Series2 Flammarion!!! It should be empty Last edited by Doum; 02-05-2023 at 04:36 AM. Reason: message says it |
![]() |
![]() |
![]() |
#5 |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,440
Karma: 48895676
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2, K4NT(Fixed: New Bat.), Galaxy Tab A
|
That image site is NASTY and is trying to trick users into installing FAKE updates. I am removing the link.
MR allows attachments. Switch to advanced and use the paperclip icon |
![]() |
![]() |
![]() |
#6 |
Enthusiast
![]() Posts: 30
Karma: 10
Join Date: Jun 2020
Device: Kobo Aura HD
|
Hi,
do you confirm its's not possible in search&replace to not take action on lines outside filter ? In the documenttaion https://manual.calibre-ebook.com/function_mode.html it's possible to used function mode in search&replace ??? Last edited by Doum; 02-06-2023 at 04:44 AM. |
![]() |
![]() |
![]() |
#7 |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,440
Karma: 48895676
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2, K4NT(Fixed: New Bat.), Galaxy Tab A
|
I confirm nothing that I do not control.
S&R works on what is selected. Get that right, then the S&R screen should show samples of what it will do on the right. Be sure to scroll. OH Anytime you do a bulk S&R you should FIRST do a FULL BACKUP (you should do backups regularly in case you have other problems and keep one off site, where a similar disaster will not get it.) |
![]() |
![]() |
![]() |
#8 |
Enthusiast
![]() Posts: 30
Karma: 10
Join Date: Jun 2020
Device: Kobo Aura HD
|
what kind of error ?
Thanks for your answer
Yes it does the job on all selected rows but it's also copy all not selected rows in my columns #series2 form publishers as you can see on the image SN3.png The filter it's not exclusive And after i aplied, the result it's on SN4.png with wrongs results So if it's should works as you said, i made a mistake . Perhaps on the result field, a special syntaxe ?!? Last edited by Doum; 02-06-2023 at 01:38 PM. |
![]() |
![]() |
![]() |
#9 |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,440
Karma: 48895676
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2, K4NT(Fixed: New Bat.), Galaxy Tab A
|
You did not First use The Library Search to only select books that start with:
publisher:~SN (\d{4}) Then use Bulk mode to do the move |
![]() |
![]() |
![]() |
Thread Tools | Search this Thread |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Reading time by creating a column with "word count"/"your wpm" | Anyssia | Calibre | 2 | 01-04-2019 01:02 PM |
Custom column for "Volume" and "Version" (Revision) | BaronKrause | Library Management | 10 | 11-02-2017 09:20 PM |
Apple Mac now have a file extension ".iba" for the program "iBooks Author." | brucehobson | Calibre | 3 | 09-15-2014 07:46 PM |
Custom column: "Updated date", when adding new "versions" of the same file? | enriquep | Library Management | 16 | 11-03-2011 10:46 AM |
Commercial program says it can "make your own pdf e-books" - Anyone know about " | Fugubot | 3 | 04-29-2009 06:39 PM |