I am trying to convert epub -> mobi and the result is bad. I have to manually edit the html files and convert these tags:
<p id="d17437503631">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" height="100%" version="1.1" viewBox="0 0 516 338" width="100%">
<rect fill="#000007" height="338" width="516" x="0" y="0"/>
<image height="338" transform="translate(0 0)" width="516" xlink:href="images/9781569755730-text_0033_005.jpg"/>
</svg>
</p>
to:
<div class="center"><img src="images/9781569755730-text_0033_005.jpg" width="516" height="338" /></div>
there are hundreds of them.
As you can see I take from the <svg> tag the values of:
xlink:href="images/9781569755730-text_0033_005.jpg"
and the value of:
viewBox="0 0 516 338"
from which I take the 3rd and 4th values and use them to construct the <img> tag.
I know that this is difficult, but is there by chance a script which can interpret text and do this for me automatically?
Thanks
<p id="d17437503631">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" height="100%" version="1.1" viewBox="0 0 516 338" width="100%">
<rect fill="#000007" height="338" width="516" x="0" y="0"/>
<image height="338" transform="translate(0 0)" width="516" xlink:href="images/9781569755730-text_0033_005.jpg"/>
</svg>
</p>
to:
<div class="center"><img src="images/9781569755730-text_0033_005.jpg" width="516" height="338" /></div>
there are hundreds of them.
As you can see I take from the <svg> tag the values of:
xlink:href="images/9781569755730-text_0033_005.jpg"
and the value of:
viewBox="0 0 516 338"
from which I take the 3rd and 4th values and use them to construct the <img> tag.
I know that this is difficult, but is there by chance a script which can interpret text and do this for me automatically?
Thanks