GIT repositories kyykka_saannot / master post_process_html.sh
master

Tree @master (Download .tar.gz)

post_process_html.sh @masterraw · history · blame

#!/bin/bash

# Remove chapter numbers from table of contents
sed -i 's/<span class="chapterToc" >./<span class="chapterToc" >/' saantokirja.html

# Remove chapter numbers from chapter titles
sed -i 's/Luku&#x00A0;.//' saantokirja.html

# Remove newlines, Wordpress will add some extra html-code in place of newlines
sed -i ':a;N;$!ba;s/\n/ /g' saantokirja.html

# Replace image urls
sed -i 's/src="figures\//src="http:\/\/www.kyykkaliitto.fi\/wp-content\/uploads\/2018\/01\//g' saantokirja.html