Hello,
i use a static generator for my blog and after i use tidy to clean the html code. But Tidy make some things wrong so i try to fix it with sed. I found a way to delete empty lines and delete div tags. But i not find a way to break a line after title and insert whitespace.
Code:
Delete Lines:
sed -i '/^$/d' index.html
Code:
Delete div tags:
sed -i 's|<[/]\?div[^>]*>||g' index.html
Code:
This i not understand, before:
<title>Silvio Siefke | Blog</title><!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js" type="text/javascript"></script>
<![endif]-->
<link href="/static/css/style.css" rel="stylesheet" type="text/css">
After i wish:
<title>Silvio Siefke | Blog</title>
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js" type="text/javascript"></script>
<![endif]-->
<link href="/static/css/style.css" rel="stylesheet" type="text/css">
Can me someone help? Can i combined all steps? So that first delete empty lines, delete div, delete id="ext" and id="vid" and this what i write before?
Hope understand because my english not very good.
Thank you for help & Nice Day
Silvio