Loading ...
Sorry, an error occurred while loading the content.

Re: [Clip] HTML to wikiHow conversion clip

Expand Messages
  • flo.gehrke
    ... Hi Sheri, I would like to point out just some small details regarding the last 8 lines (I ve added some line numbers for description)... 1. :links 2.
    Message 1 of 8 , Dec 3, 2009
    • 0 Attachment
      --- In ntb-clips@yahoogroups.com, "Sheri" <silvermoonwoman@...> wrote:
      >
      > I gave it a quick stab, no guarantees. I'm sure documents will still need some cleanup after using it. There's at least one long line that will need to be joined after copying this clip from email or archives (the IMG line).
      >
      > Regards,
      > Sheri
      >
      > ^!Replace "(?is)<H\d>(.+?)</H\d>" >> "== $1 ==" RAWS
      > ^!Jump Doc_Start...

      Hi Sheri,

      I would like to point out just some small details regarding the last 8 lines (I've added some line numbers for description)...

      1. :links
      2. ^!Replace "(?is)<A HREF=\x22(.+?)\x22>(.*?)</A>" >> "[[$1|$2]]" RAWS
      3. :images
      4. ^!Replace "(?is)<IMG SRC=\x22.*?ALT=\x22(.+?)\x22>" >> "[[Image:$1|thumb|$2]]" RAWS
      5. ^!Replace "(?is)<p>\R?" >> "*" RAWS
      6. :tags
      7. ^!Replace "(?i)<[^>]+>" >> "" RAWS
      8. ;end of clip


      Line #2: I think, Phillip wants to see some more space in the replacement.

      Line #4: For me, it doesn't capture a second substring, so '$2' remains empty and is literally output with the replacement.

      Line #5: Produces some asterisks which I can't see in Phillip's result (omitted in my proposal).

      What would you think of replacing the last lines with...

      :links
      ^!Replace "(?is)<A HREF=\x22(.+?)\x22>(.*?)</A>" >> "[[$1\x20|\x20$2]]" RAWS
      :images
      ; Next line extended
      ^!Replace "(?isx) <IMG\x20SRC=\x22 ([^\x22]+) \x22.+ALT=\x22 (.+) \x22>" >> "[[Image:$1\x20|thumb|\x20$2]]" AWRS
      :tags
      ^!Replace "(<[^>]+>\R)+" >> "\r\n" AWRS
      ; Join the image-line
      ^!Find "^\[\[Image:\C+\]" WRS
      ^!Menu Modify/Lines/Join Lines
      ^!Jump 1
      ; end of clip


      Probably, some more improvements are needed. For example, joining more lines?

      Regards,
      Flo
    • Sheri
      ... LOL, No wonder Phillip says I gave him cause to stare at the documentation Sorry Phillip! ;) I saw that he d been waiting awhile for help, felt badly and
      Message 2 of 8 , Dec 3, 2009
      • 0 Attachment
        --- In ntb-clips@yahoogroups.com, "flo.gehrke" <flo.gehrke@...> wrote:
        >
        > I would like to point out just some small details regarding the
        > last 8 lines (I've added some line numbers for description)...
        >

        LOL, No wonder Phillip says I gave him cause to stare at the documentation Sorry Phillip! ;)

        I saw that he'd been waiting awhile for help, felt badly and did what I could on the fly. I don't have time, but I'm glad if you and rest of the group can help him further refine and improve it.

        Regards,
        Sheri
      • Mr. Phillip Sand Hansel II
        The first off the cuff effort was great and caused me to grow. It also caused me to upgrade to the latest Light version (I was proud that I had actually paid
        Message 3 of 8 , Dec 3, 2009
        • 0 Attachment
          The first "off the cuff" effort was great and caused me to grow. It also caused me to upgrade to the latest Light version (I was proud that I had actually paid for 4.5 several years back... pride is funny.)

          You've both been more than helpful, I feel that the response was very prompt. I've incorporated Flo's suggestions and they work great.

          Thank you (and the rest of the group) for being there, you've turned a repetitive editing process into a one-click-fix. I think I understand enough to extend what I've got to other cases, should they arise.

          Mr. Phillip Sand Hansel II


          ----- Original Message -----
          From: Sheri
          To: ntb-clips@yahoogroups.com
          Sent: Thursday, December 03, 2009 2:10 PM
          Subject: Re: [Clip] HTML to wikiHow conversion clip



          --- In ntb-clips@yahoogroups.com, "flo.gehrke" <flo.gehrke@...> wrote:
          >
          > I would like to point out just some small details regarding the
          > last 8 lines (I've added some line numbers for description)...
          >

          LOL, No wonder Phillip says I gave him cause to stare at the documentation Sorry Phillip! ;)

          I saw that he'd been waiting awhile for help, felt badly and did what I could on the fly. I don't have time, but I'm glad if you and rest of the group can help him further refine and improve it.

          Regards,
          Sheri





          [Non-text portions of this message have been removed]
        Your message has been successfully submitted and would be delivered to recipients shortly.