![]() |
#1 |
Library Breeder (She/Her)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,257
Karma: 1937891
Join Date: Apr 2015
Location: Fullerton, California
Device: Paperwhite 2015 (2), PW 2024 (12 GEN), PW 2023 (11 GEN), Scribe (1st)
|
Adding HTML back to comments
I made a bad move and normalized all my comments. Now there are markdown characters everywhere and I lost all formatting (yes, what did I expect?). I want to go back, but I can't for the life of me figure out how I can, short of individually going in and resetting the metadata.
I tried importing a catalog.csv from a library with good comments, but the import just shows the same markings. I can't seem to import anything and have the markdown commets "**" and "#" characters show up as what they would be. Nothing changes. So, how can I possibly fix this? Is there some way that I can just have the comments column reset to "recognize" the markings? Is there a custom column I can make that I can copy the current comments to, that would transform them to what they should be and they copy them back? I really, REALLY, don't want to have to go in and manually download new metadata for 6000 books. I don't really want to restart with an older library (It has been a couple of months), and I don't want to start from scratch. Any possible suggestions? |
![]() |
![]() |
![]() |
#2 |
Custom User Title
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 10,932
Karma: 74999999
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
|
You could try search & replace. Not sure of the regexes to convert markdown back to HTML though.
|
![]() |
![]() |
Advert | |
|
![]() |
#3 | |
Library Breeder (She/Her)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,257
Karma: 1937891
Join Date: Apr 2015
Location: Fullerton, California
Device: Paperwhite 2015 (2), PW 2024 (12 GEN), PW 2023 (11 GEN), Scribe (1st)
|
Quote:
**= Bold <b> Bold at the beginning </b> bold at the end. So, I am kind of stuck. |
|
![]() |
![]() |
![]() |
#4 |
Running with scissors
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,586
Karma: 14328510
Join Date: Nov 2019
Device: none
|
I don't see that as a problem for using regular expressions. You just need to analyze the way things are laid out with markdown, i.e., figure out the patterns, and then construct the appropriate regular expressions.
|
![]() |
![]() |
![]() |
#5 |
Custom User Title
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 10,932
Karma: 74999999
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
|
No, it's possible. I just dont know how to do it in Python.
|
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 31,023
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Markdown starts and ends with the same mark, correct?
Your regex need to be NOT greedy \*\*(.+?)\*\* |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Search comments' HTML? | Geremia | Library Management | 5 | 04-29-2020 05:45 PM |
Posible but at html comments | Terisa de morgan | Library Management | 8 | 07-05-2016 07:22 AM |
Adding comments to embed metadata | MichelleB | Conversion | 7 | 07-18-2014 11:13 AM |
Add comments when adding new books | Ripplinger | Library Management | 6 | 07-28-2011 01:29 AM |
adding books cover comments | icwright | Calibre | 5 | 12-22-2009 06:48 PM |