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 01-25-2015, 02:49 PM   #1
lazorbeam
Connoisseur
lazorbeam began at the beginning.
 
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!
lazorbeam is offline   Reply With Quote
Old 01-25-2015, 02:58 PM   #2
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,422
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.
eschwartz is offline   Reply With Quote
Old 01-25-2015, 03:51 PM   #3
lazorbeam
Connoisseur
lazorbeam began at the beginning.
 
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
lazorbeam is offline   Reply With Quote
Old 01-25-2015, 04:45 PM   #4
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,422
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.
eschwartz is offline   Reply With Quote
Old 01-25-2015, 05:16 PM   #5
lazorbeam
Connoisseur
lazorbeam began at the beginning.
 
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.
lazorbeam is offline   Reply With Quote
Old 01-25-2015, 05:21 PM   #6
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,422
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.
eschwartz is offline   Reply With Quote
Old 01-25-2015, 05:24 PM   #7
lazorbeam
Connoisseur
lazorbeam began at the beginning.
 
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.
lazorbeam is offline   Reply With Quote
Old 01-25-2015, 05:35 PM   #8
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,422
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...
eschwartz is offline   Reply With Quote
Old 01-25-2015, 05:48 PM   #9
Terisa de morgan
Grand Sorcerer
Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.
 
Terisa de morgan's Avatar
 
Posts: 6,233
Karma: 11768331
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.
Terisa de morgan is offline   Reply With Quote
Reply

Tags
book details, calibre, comments, justify, metadata


Forum Jump

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


All times are GMT -4. The time now is 03:53 AM.


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