View Single Post
Old 08-22-2010, 01:30 PM   #2492
TonytheBookworm
Addict
TonytheBookworm is on a distinguished road
 
TonytheBookworm's Avatar
 
Posts: 264
Karma: 62
Join Date: May 2010
Device: kindle 2, kindle 3, Kindle fire
Quote:
Originally Posted by Starson17 View Post
Based on your quoted html from above, have you tried the correct href? IOW, have you tried this:
Code:
remove_tags = [dict(name='a', attrs={'href':'#comments_controls'})]
(it's always the little things that trip you up!)
Yeah it is always the little things. what happen is the thing was underlined in the source on firefox and at first glance it looked like it was a space but I should have thought and did after you showed me. hrefs don't have spaced haha Anyway live and learn thanks again. I hope someone actually enjoys reading that blog. Oh while i'm at it is there a way in calibre using a regexpression to insert or remove a line?
For example:
Code:
 <p class="calibre9" This is the line I wish to keep </p>
 <p class="calibre9" This is the line I wish to delete </p>
 <p class="calibre9" Some more stuff </p>
I want to do something like
[code ]
var string = "This is the line I wish to delete"
remove_tag [
where contains(string)

or
var string = "This is the line I wish to delete"
var replacestring = "Calibre Rocks"
replace_tag [
replace_where(string,replacestring)
]

[/code]

the above is just pseudo code but I hope you understand my logic.
TonytheBookworm is offline