View Single Post
Old 08-22-2010, 01:52 PM   #2493
Starson17
Wizard
Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.
 
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
Quote:
Originally Posted by TonytheBookworm View Post
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
There was also a missing "s." "#comment_controls" makes more sense, but they used "#comments_controls." I"ve given up anything but copy/paste. FireBug makes it easy.


Quote:
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)
                    ]
the above is just pseudo code but I hope you understand my logic.
You're posting stuff that has class="calibreN" type labels. I suspect you know this, but those are created after the recipe has finished - so you really need to be looking at the web page html, not the final html or epub.

Also, your examples are missing the closing tag marker ">" after <p class="calibre9"

However, assuming that you're just using that as an example (I.e., you're as lazy as I am and didn't want to go back and open up the original site), the answer to your question is "yes - it's possible to insert or remove a line." and "yes, I understand your pseudo code."

Am I correct in thinking that your next question is "How?"

Spoiler:
Many ways. Let me send you here first, then get back to you.

Also remove_tags, preprocess_regexps, preprocess_html or postprocess_html. I've got to go - back later if you have Q's
Starson17 is offline