01-25-2015, 02:49 PM | #1 |
Connoisseur
Posts: 70
Karma: 10
Join Date: Feb 2014
Device: iPhone; Fire HD
|
Bulk Edit - Justify Metadata Comments
Hello! I'm searching for a way to justify the comments of all books in one go. I'd like to do this and preserve the text of the comments (my book summaries). This setting doesn't seem to be saved in the metadata. I know that a mass justification is possible ("set the comments for all selected books"), but this changes all the comments to be the same as well. That isn't what I'm trying to do.
I'm switching to a new computer and I am a little particular about organization/aesthetics of my beautiful and custom library, so if it's possible, I'd love to be able to do this. Thanks in advance! |
01-25-2015, 02:58 PM | #2 |
Ex-Helpdesk Junkie
Posts: 19,421
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
Use the Bulk Edit Metadata mode, S&R tab.
Add a style element to the topmost div. |
Advert | |
|
01-25-2015, 03:51 PM | #3 |
Connoisseur
Posts: 70
Karma: 10
Join Date: Feb 2014
Device: iPhone; Fire HD
|
Thanks! That worked pretty well.
I set my search to <div> and my replace to <div style="text-align: justify;">. It worked for most of them and for the ones it didn't affect, it was because their comments weren't headed with <div> but just <p>. I appreciate your assistance! EDIT - Fiddling again, and, oh yeah, I suppose it's probably a better bet (tidier, comprehensive, and following html rules?) to leave the <div> alone and instead create <p style="text-align: justify;">? Last edited by lazorbeam; 01-25-2015 at 03:55 PM. Reason: brain turned on |
01-25-2015, 04:45 PM | #4 |
Ex-Helpdesk Junkie
Posts: 19,421
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
I think calibre automatically adds an outer div if there isn't already one, any time you edit and save a comment. Which is why I suggested it.
Naturally, that CSS is capable of targeting any element. And that would be an effective sledgehammer approach. But I was hoping it wouldn't be necessary to clog up the code with repetitive CSS. |
01-25-2015, 05:16 PM | #5 |
Connoisseur
Posts: 70
Karma: 10
Join Date: Feb 2014
Device: iPhone; Fire HD
|
It certainly did work for the section I was working in (books that I downloaded metadata for). For whatever reason though, I did find that quite a lot of my comments DON'T begin or contain any <div>. Some start with just <p> and some with <p class="description"> and probably other varieties as well.
That's interesting what you say about <div> being applied when comments are saved. It does seem to be applied if you type plain text in - it auto codes it. Is it possible that this auto-coding only occurs upon the first save? Because I've definitely gone in, edited something, and re-saved metadata for all these other books and they still begin without the <div>. I think these are comments that I copy pasted in. I always hit "Remove formatting" but looking in the HTML view you can tell some goofiness is left behind. Anyway, long bit of info, but it's interesting. It'd be cool if more were following the same pattern but I suppose I'll figure it out. |
Advert | |
|
01-25-2015, 05:21 PM | #6 |
Ex-Helpdesk Junkie
Posts: 19,421
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
I don't really mess around with comments much, I know what most of them are about.
|
01-25-2015, 05:24 PM | #7 |
Connoisseur
Posts: 70
Karma: 10
Join Date: Feb 2014
Device: iPhone; Fire HD
|
Ha. Right on. Thanks for your help! I never would have messed with s/r.
|
01-25-2015, 05:35 PM | #8 |
Ex-Helpdesk Junkie
Posts: 19,421
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
Happy to help.
Lots of interesting things hiding in the corners, well worth taking a good look. Granted, I have a lot more patience for spelunking through the UI... |
01-25-2015, 05:48 PM | #9 |
Grand Sorcerer
Posts: 6,366
Karma: 12117217
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
|
lazorbeam, I use something similar. The div tag appears only if there's more than a paragraph (or so I've guessed). The format cleaning leaves some traces behind, mainly font spans. If you edit the html view, and the tags are not properly matched, the editor closes them.
I modify the paragraph style, not div style, and I've got different regex for comments with a paragraph or more than one (I use different paragraph formats). In the end, it's a hit and miss process. |
Tags |
book details, calibre, comments, justify, metadata |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Metadata Edit: Bulk vs Individual | RichieTheK | Calibre | 1 | 06-19-2013 11:07 PM |
Is it possible to edit metadata in bulk for columns with long text, like comments? | GustavoB | Library Management | 3 | 04-14-2013 09:39 PM |
Bulk Edit of comments using regex | PeterT | Library Management | 2 | 07-25-2012 08:10 AM |
Bulk Edit Comments column | Jade Aislin | Library Management | 0 | 10-27-2011 03:18 AM |
Tips on Bulk Edit Metadata | deschiff | Calibre | 5 | 10-15-2010 10:54 AM |