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

Clip to HTML

Expand Messages
  • melchior prisi
    Hi All, Recently I wrote a clip that generates a HTML page showing a clip and linking to the same clip in plain text (for copying to clipbook). The clip -
    Message 1 of 8 , Jan 25, 2002
    • 0 Attachment
      Hi All,

      Recently I wrote a clip that generates a HTML page
      showing a clip and linking to the same clip in plain text
      (for copying to clipbook).

      The clip - converted by itself - is at
      http://www.alphazwirbel.net/orp/ntp/publishclip.htm



      Regards,

      Melchior




      --
      http://www.alphazwirbel.net/orp/orp.htm
    • Jody
      Hi melchior, Neat Clip html publisher. I suggest at least an option to not number the lines. I could get rid of them easy enough with RegExp, but who wants
      Message 2 of 8 , Jan 27, 2002
      • 0 Attachment
        Hi melchior,

        Neat Clip html publisher. I suggest at least an option to not
        number the lines. I could get rid of them easy enough with
        RegExp, but who wants to do that to install the Clip from a web
        page. Copy the Clip in full, go to Library, right click and
        choose Add from Clipboard. The numbering messes that up just a
        tad bit. :) Nice little online help with all the screen shots
        too. I get an error for line 48 (with headers showing) but did
        not look into it. ^!IfSame "^!" ....

        >Recently I wrote a clip that generates a HTML page
        >showing a clip and linking to the same clip in plain text
        >(for copying to clipbook).
        >
        >The clip - converted by itself - is at
        ><http://www.alphazwirbel.net/orp/ntp/publishclip.htm>http://www.alphazwirbel.net/orp/ntp/publishclip.htm
      • melchior prisi
        Hi Jody, Thanks for your comment. ... The generated web page is just for _reading_ a clip with syntax highlighted, similar to the clip editor. If you wish to
        Message 3 of 8 , Jan 27, 2002
        • 0 Attachment
          Hi Jody,

          Thanks for your comment.

          Jody wrote:
          > I suggest at least an option to not
          > number the lines. I could get rid of them easy enough with
          > RegExp, but who wants to do that to install the Clip from a web
          > page.

          The generated web page is just for _reading_
          a clip with syntax highlighted, similar to the clip editor.

          If you wish to copy the clip, there is a link to the same clip
          in plain text (bottom of page) which you can copy and
          add to your clipbook as expected.

          I should have pointed this out clearly...

          The link and the textfile are also generated by "publishclip".


          >I get an error for line 48 (with headers showing) but did
          > not look into it. ^!IfSame "^!" ....

          I will have a look at that this evening; the code in
          plain text should be o.k.; it published itself...


          Regards,

          Melchior

          --
          http://www.alphazwirbel.net/orp/ntp/publishclip.htm
          http://www.alphazwirbel.net/orp/orp.htm
        • Jody
          Hi melchior, ... Ah, I missed that. I remember seeing something about just for reading... Obviously I did not scroll far enough down. I have a Clip that
          Message 4 of 8 , Jan 28, 2002
          • 0 Attachment
            Hi melchior,

            >The generated web page is just for _reading_ a clip with syntax
            >highlighted, similar to the clip editor.
            >
            >If you wish to copy the clip, there is a link to the same clip in
            >plain text (bottom of page) which you can copy and add to your
            >clipbook as expected.

            Ah, I missed that. I remember seeing something about just for
            reading... Obviously I did not scroll far enough down.

            I have a Clip that highlights the code like Eric does as well
            that I use for my Snatch-A-Clip page. The code has to be
            different than yours because of the way I designed the web page.
            I'll send the code to you if you like, but I think you have good
            grasp on it anyway. http://www.notetab.net/html/snstchclp.htm

            Happy Clip'n!
            Jody

            http://www.notetab.net

            Subscribe, UnSubscribe, Options
            mailto:Ntb-Clips-Subscribe@yahoogroups.com
            mailto:Ntb-Clips-UnSubscribe@yahoogroups.com
            http://groups.yahoo.com/group/ntb-clips
          • melchior prisi
            Hi Jody, ... I see, I really should visit your site more frequently.. ... Of course I would like to see how you did it; especally because of the lightweighted
            Message 5 of 8 , Jan 28, 2002
            • 0 Attachment
              Hi Jody,

              Jody wrote:
              > I have a Clip that highlights the code like Eric does as well
              > that I use for my Snatch-A-Clip page.

              I see, I really should visit your site more frequently..

              > I'll send the code to you if you like

              Of course I would like to see how you did it;
              especally because of the lightweighted html-code
              your clips produces.


              >but I think you have good grasp on it anyway.

              well... :-)


              Regards,

              Melchior

              --
              http://www.alphazwirbel.net/orp/ntp/publishclip.htm
              http://www.alphazwirbel.net/orp/orp.htm
            • Jody
              Hi Melchior, ... It s been a few months since I added a Clip to Snatch... so it is about time to add another. I usually add at least one about every few
              Message 6 of 8 , Jan 28, 2002
              • 0 Attachment
                Hi Melchior,

                >> I have a Clip that highlights the code like Eric does as well
                >> that I use for my Snatch-A-Clip page.
                >
                >I see, I really should visit your site more frequently..

                It's been a few months since I added a Clip to Snatch... so it is
                about time to add another. I usually add at least one about
                every few months.

                >> I'll send the code to you if you like
                >
                >Of course I would like to see how you did it; especally because
                >of the lightweighted html-code your clips produces.

                Usual long line warning. ;) I have one more besides the two
                here, but is adds the information for the web page, the different
                "snatches," the pull down list etc. I run it directly after this
                one because I have the Clip name on the Clipboard which is used
                in it. I usually open the Clip in Edit mode, do a Copy All from
                my shortcut menu, and then a Paste New. I then add H= in front
                of the Clip(s) name(s). It is older code, but still works so I
                don't fix it. ;)

                <--- Copy below this line --->
                H=Syntax Highlight
                ; Last updated 01-28-2002, Sojourner@..., jody
                ; http://www.notetab.net

                ^!Continue Highlights Clip for Snatch-A-Clip. Put in new doc with H=. Body will be wrapped automatically.
                ^!Jump 1
                ^!InsertText ^p
                ^!Jump 1
                ^!Find "^pH=" S
                ^!IfError Oops
                ^!Jump 1
                ^!SetScreenUpdate Off
                ^!Replace "<" >> "<" WAS
                ^!Replace ">" >> ">" WAS
                :Loop0
                ^!Find "^pH=" S
                ^!IfError j1
                ^!Jump Select_End
                ^!Jump Line_Start
                ^!Select Eol
                ^!InsertText <EM>^$GetSelection$</EM>
                ^!Goto Loop0

                :j1
                ^!Jump 1

                :Loop1
                ^!Find "^p:" S
                ^!IfError j2
                ^!Jump Select_End
                ^!Jump Line_Start
                ^!Select Eol
                ^!InsertText <SPAN CLASS=red>^$GetSelection$</SPAN>
                ^!Goto Loop1

                :j2
                ^!Jump 1

                :Loop2
                ^!Find "^p;" S
                ^!IfError j3
                ^!Jump Select_End
                ^!Jump Line_Start
                ^!Select Eol
                ^!InsertText <SPAN CLASS=tangerine>^$GetSelection$</SPAN>
                ^!Goto Loop2

                :j3
                ^!Jump 1
                ^!Clip "Wrap Body-DoPage"
                ^!Goto End

                :Oops
                ^!Info You need to add "H=" to the ClipName.
                ^!Jump 1
                ^!DeleteLine

                H=_Wrap Body-DoPage
                ; Last updated 01-28-2002, Sojourner@..., jody
                ; http://www.notetab.net

                ; Called from "Syntax Highlight"

                ^!Replace "^p" >> "<BR>^p" WAS
                ^!Replace "<BR>^P<BR>^P" >> "<P>^p^p" WAS
                ^!Jump 1
                <!DOCTYPE HTML PUBLIC"-//W3C//DTD HTML 4.0 Transitional//EN">
                <HTML>
                <HEAD>
                <TITLE>
                H=^?{ClipName=^%ClipName%}
                ; Last updated 01-28-2002, Sojourner@..., jody
                ; http://www.notetab.net, http://www.notetab.net/order

                </TITLE>
                <STYLE TYPE="text/css">
                BODY
                {
                font-family : "Times New Roman";
                font-style : normal;
                font-size : 14pt;
                color: blue;
                }

                EM
                {
                font-family : "Times New Roman";
                font-style: normal;
                font-size: 16pt;
                color: black;
                font-weight: bold;
                }

                .tangerine
                {
                font-family : "Times New Roman";
                font-style : normal;
                font-size : 14pt;
                color: #FF9966;
                }

                .red
                {
                font-family : "Times New Roman";
                font-style : normal;
                font-size : 14pt;
                color: red;
                }
                </STYLE>
                </HEAD>
                ^!InsertText ^p^p<BODY BGCOLOR="#FFFFFF">^p
                ^!Jump Doc_End
                ^!InsertText ^p</BODY>^p</HTML>^p
                ^!Set %Title%=^$StrReplace("H=";"";"^%Title%";0;0)$
                ^!Set %Title%=^$StrReplace(""";"";"^%Title%";0;0)$
                ^!Jump 1
                ^!Replace "<BR>^P<EM>H=" >> "<EM>H=" S
                ^!Save:As ^?{Save as, .htm give, name only=G:\notetab\html\^%Title%}.htm

                <--- Copy above this line, right --->
                <--- click over a Library, and --->
                <--- choose "Add from Clipboard" --->

                Happy HTML'n!
                Jody

                http://www.notetab.net

                Subscribe, UnSubscribe, Options
                mailto:ntb-html-Subscribe@yahoogroups.com
                mailto:ntb-html-UnSubscribe@yahoogroups.com
                http://groups.yahoo.com/group/ntb-html
              • melchior prisi
                Hi Jody, Thanks for posting your clip. ... Very nice! I like the loops... Regards, Melchior -- http://www.alphazwirbel.net/orp/orp.htm
                Message 7 of 8 , Jan 29, 2002
                • 0 Attachment
                  Hi Jody,

                  Thanks for posting your clip.

                  Jody wrote:
                  >
                  > H=Syntax Highlight
                  >...

                  Very nice! I like the loops...

                  Regards,
                  Melchior


                  --
                  http://www.alphazwirbel.net/orp/orp.htm
                • Jody
                  Hi Melchior, ... Thanks. You or somebody asked how to make show up on the web page when viewing it. Note, regular tags are not seen including the
                  Message 8 of 8 , Jan 29, 2002
                  • 0 Attachment
                    Hi Melchior,

                    >> H=Syntax Highlight
                    >>...
                    >
                    >Very nice! I like the loops...

                    Thanks. You or somebody asked how to make < or > show up on the
                    web page when viewing it. Note, regular tags are not seen
                    including the < & >.

                    You can do it in a Clip with OPTIONS desired.

                    ^!Replace "<" >> "<" WASH
                    ^!Replace ">" >> ">" WASH

                    or

                    In a HTML document select the code that you want the < & > to be
                    seen in the browser page and not acted upon as tags. Do a Modify
                    | Document to HTML | With Paragraph Tags or No Paragraph tags.
                    The selected code will have the < and > converted to code and it
                    will also do other characters like &.

                    Happy HTML'n!
                    Jody

                    http://www.notetab.net

                    Subscribe, UnSubscribe, Options
                    mailto:ntb-html-Subscribe@yahoogroups.com
                    mailto:ntb-html-UnSubscribe@yahoogroups.com
                    http://groups.yahoo.com/group/ntb-html
                  Your message has been successfully submitted and would be delivered to recipients shortly.