-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathf-n-r.sh
16 lines (15 loc) · 1.11 KB
/
f-n-r.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
## Cambiar/ingresar al directorio de EPUB
cd /path/to/epub-file-direcory/EPUB
## Copiar y pegar
for xhtmlfile in $(find ./ -type f -name "*.xhtml")
do
sed -i -E 's/<section class="chapter parent" id="colophon" title=.+">/<section class="chapter parent" id="colophon" title="">/g' $xhtmlfile
sed -i -E 's/<section class="chapter parent" id="conventions" title=.+">/<section class="chapter parent" id="conventions" title="">/g' $xhtmlfile
sed -i -E 's/<section class="chapter parent" id=".+" title=.+ class="title-val.+>/<section class="chapter parent">/g' $xhtmlfile
sed -i -E 's/<section class="sect1.*" title=.+>/<section class="sect1" title="">/g' $xhtmlfile
sed -i -E 's/<section class="sect2.*" title=.+>/<section class="sect2" title="">/g' $xhtmlfile
sed -i -E 's/<section class="sect3.*" title=.+>/<section class="sect3" title="">/g' $xhtmlfile
sed -i -E 's/<section class="sect4.*" title=.+>/<section class="sect4" title="">/g' $xhtmlfile
sed -i -E 's/<section class="sect5.*" title=.+>/<section class="sect5" title="">/g' $xhtmlfile
sed -i 's/BASE64_ORIGINAL/BASE64_NUEVA/g' $xhtmlfile
done