|  09-29-2017, 03:06 AM | #1 | 
| Wizard            Posts: 2,625 Karma: 3120635 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? | 
|   |   | 
|  09-29-2017, 08:04 AM | #2 | 
| Sigil Developer            Posts: 9,070 Karma: 6361556 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.
		 | 
|   |   | 
|  09-29-2017, 08:20 AM | #3 | 
| Imperfect Perfectionist            Posts: 715 Karma: 863576 Join Date: Dec 2011 Location: Ølstykke, Denmark Device: none | 
			
			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 | 
|   |   | 
|  09-29-2017, 10:42 AM | #4 | 
| Wizard            Posts: 2,625 Karma: 3120635 Join Date: Jan 2009 Device: Kindle PW3 (wifi) | 
			
			Thanks for your replies.
		 | 
|   |   | 
|  09-29-2017, 05:12 PM | #5 | 
| Wizard            Posts: 2,625 Karma: 3120635 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: 
 | 
|   |   | 
|  | 
| Thread Tools | Search this Thread | 
| 
 | 
|  Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post | 
| iPad ePub, CSS : Bug with 'position:relative' property ? | Ereskelios | Apple Devices | 3 | 09-29-2014 07:53 AM | 
| CSS Font-Weight Property Values??? | soloist66 | Conversion | 8 | 06-16-2013 09:08 PM | 
| Incorrect line-height property in calibre CSS ? | Bertrand | Calibre | 2 | 06-24-2011 04:15 PM | 
| Wrong property in the css file | Bertrand | Writer2ePub | 1 | 12-21-2010 05:05 AM | 
| Word Documents - batch convert title property from file name | tomliversidge | Workshop | 4 | 11-07-2008 11:20 AM |