Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 09-29-2017, 04:06 AM   #1
roger64
Wizard
roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.
 
Posts: 2,166
Karma: 2204557
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
batch modify a CSS property?

Hi

Is it possible to modify the value of one CSS property in a batch of EPUBs?

Say, I wish to write: vertical-align: text-top instead of vertical-align: top?
roger64 is offline   Reply With Quote
Advert
Old 09-29-2017, 09:04 AM   #2
KevinH
Wizard
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 2,594
Karma: 772404
Join Date: Nov 2009
Device: many
Yes using a stream editor such as "sed" and scripts to unzip, find css files, pass them to sed, to fix the files, and then rezip and continue on to the next.
KevinH is online now   Reply With Quote
Old 09-29-2017, 09:20 AM   #3
elibrarian
Imperfect Perfectionist
elibrarian can program the VCR without an owner's manual.elibrarian can program the VCR without an owner's manual.elibrarian can program the VCR without an owner's manual.elibrarian can program the VCR without an owner's manual.elibrarian can program the VCR without an owner's manual.elibrarian can program the VCR without an owner's manual.elibrarian can program the VCR without an owner's manual.elibrarian can program the VCR without an owner's manual.elibrarian can program the VCR without an owner's manual.elibrarian can program the VCR without an owner's manual.elibrarian can program the VCR without an owner's manual.
 
elibrarian's Avatar
 
Posts: 143
Karma: 165048
Join Date: Dec 2011
Location: Ølstykke, Denmark
Device: Sony PRS-T1, iPad
PowerGREP could do it (it can search and replace inside zip-files, and thats how it sees epubs).

It has a relatively steep price and an equally steep learning curve, but if it's a one-off there's a trial version, which should be enough.

Regards,

Kim
elibrarian is offline   Reply With Quote
Old 09-29-2017, 11:42 AM   #4
roger64
Wizard
roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.
 
Posts: 2,166
Karma: 2204557
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
Thanks for your replies.
roger64 is offline   Reply With Quote
Old 09-29-2017, 06:12 PM   #5
roger64
Wizard
roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.
 
Posts: 2,166
Karma: 2204557
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
Hi

This is a first working result made by a friend of mine which could be improved. Up to now, it processes only EPUB where the CSS file is in : OPS/style.css. It has to be adapted on this regard.

Spoiler:

Code:
#!/bin/bash
for fichier in *.epub
do
    unzip $fichier OPS/style.css
    if [ -d ./OPS ]; then
        cd OPS
        find . -type f -iname "style.css" -exec sed -i -e "s/vertical-align:top/vertical-align:text-top/g" {} \;
        cd ..
        zip -r $fichier ./OPS
        rm -rf ./OPS
    fi
done
roger64 is offline   Reply With Quote
Advert
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
iPad ePub, CSS : Bug with 'position:relative' property ? Ereskelios Apple Devices 3 09-29-2014 08:53 AM
CSS Font-Weight Property Values??? soloist66 Conversion 8 06-16-2013 10:08 PM
Incorrect line-height property in calibre CSS ? Bertrand Calibre 2 06-24-2011 05:15 PM
Wrong property in the css file Bertrand Writer2ePub 1 12-21-2010 06:05 AM
Word Documents - batch convert title property from file name tomliversidge Workshop 4 11-07-2008 12:20 PM


All times are GMT -4. The time now is 01:47 PM.


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