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

Vim Wiki - Tip id and URL

Expand Messages
  • John Beckett
    It is important for us to have an easy way to refer to tips, and the URL of each tip should be simple (and not wrap in an email). Below is some detail for a
    Message 1 of 5 , May 17, 2007
    View Source
    • 0 Attachment
      It is important for us to have an easy way to refer to tips,
      and the URL of each tip should be simple (and not wrap in an
      email).

      Below is some detail for a proposal to achieve this.
      What does everyone think?

      Have a script scrape tip titles from the current Vim Tips.
      Create a plain text file with fields (say tab-separated):
      <tip_nr><tip_id><tip_name>

      <tip_id> would initially be empty.

      Example:
      Tip #1504: External commands on Windows
      http://www.vim.org/tips/tip.php?tip_id=1504

      would give line (':' represents '\t'):
      1504::External commands on Windows

      I would edit this file (or maybe split it over three
      volunteers). We would manually insert a short tip_id by
      abbreviating tip_name. For example:
      1504:win_external_cmd:External commands on Windows

      We would manually confirm (with a script) that the 1500
      tip_id fields are unique.

      The script to import each tip would read the above file:
      - Use tip_nr to read the current tip.
      - Use tip_id to make the URL of the new tip.
      - Ignore tip_name.

      The example URL might be:
      http://vim.wikia.com/wiki/tips/win_external_cmd

      Perhaps a contents page could list all tips:
      win_external_cmd External commands on Windows

      Where we might once have said "see tip 1504", we would instead
      say "see tip win_external_cmd".

      John
    • A.J.Mechelynck
      ... Wouldn t it be enough to set up the main tip page with a tip _name_ (which would be the current title of the tip, or a disambiguation page if there are
      Message 2 of 5 , May 17, 2007
      View Source
      • 0 Attachment
        John Beckett wrote:
        > It is important for us to have an easy way to refer to tips,
        > and the URL of each tip should be simple (and not wrap in an
        > email).
        >
        > Below is some detail for a proposal to achieve this.
        > What does everyone think?
        >
        > Have a script scrape tip titles from the current Vim Tips.
        > Create a plain text file with fields (say tab-separated):
        > <tip_nr><tip_id><tip_name>
        >
        > <tip_id> would initially be empty.
        >
        > Example:
        > Tip #1504: External commands on Windows
        > http://www.vim.org/tips/tip.php?tip_id=1504
        >
        > would give line (':' represents '\t'):
        > 1504::External commands on Windows
        >
        > I would edit this file (or maybe split it over three
        > volunteers). We would manually insert a short tip_id by
        > abbreviating tip_name. For example:
        > 1504:win_external_cmd:External commands on Windows
        >
        > We would manually confirm (with a script) that the 1500
        > tip_id fields are unique.
        >
        > The script to import each tip would read the above file:
        > - Use tip_nr to read the current tip.
        > - Use tip_id to make the URL of the new tip.
        > - Ignore tip_name.
        >
        > The example URL might be:
        > http://vim.wikia.com/wiki/tips/win_external_cmd
        >
        > Perhaps a contents page could list all tips:
        > win_external_cmd External commands on Windows
        >
        > Where we might once have said "see tip 1504", we would instead
        > say "see tip win_external_cmd".
        >
        > John
        >

        Wouldn't it be enough to set up the main tip page with a tip _name_ (which
        would be the current "title" of the tip, or a disambiguation page if there are
        more than one tip with the same title), and have the tip _number_ (only for
        tips imported from Vim-online) refer to a redirect page, let's say "Vim tip 1"
        => "The super star"? So the conversion script could convert "vimtip#1" to
        "[[Vim tip 1]]", which could be done mechanically, and the redirect would
        automagically resend anyone clicking that link to the actual page. I suppose
        that links pointing to the redirect pages could be readjusted later, in no
        hurry, either by hand or by a "wiki robot", and in either case with the help
        of the "What points here" page for the redirect.


        Best regards,
        Tony.
        --
        YOU TOO CAN MAKE BIG MONEY IN THE EXCITING FIELD OF
        PAPER SHUFFLING!

        Mr. TAA of Muddle, Mass. says: "Before I took this course I used to be
        a lowly bit twiddler. Now with what I learned at MIT Tech I feel
        really important and can obfuscate and confuse with the best."

        Mr. MARC had this to say: "Ten short days ago all I could look forward
        to was a dead-end job as a engineer. Now I have a promising future and
        make really big Zorkmids."

        MIT Tech can't promise these fantastic results to everyone, but when
        you earn your MDL degree from MIT Tech your future will be brighter.

        SEND FOR OUR FREE BROCHURE TODAY!
      • John Beckett
        ... Would someone who understands wiki procedures please describe how the URL for a tip would be generated. What is actually achievable? Can a URL be changed
        Message 3 of 5 , May 18, 2007
        View Source
        • 0 Attachment
          A.J.Mechelynck wrote:
          > Wouldn't it be enough to set up the main tip page with a
          > tip _name_ (which would be the current "title" of the tip, or
          > a disambiguation page if there are more than one tip with the
          > same title), and have the tip _number_ (only for tips imported
          > from Vim-online) refer to a redirect page, let's say "Vim tip
          > 1" => "The super star"? So the conversion script could convert
          > "vimtip#1" to "[[Vim tip 1]]", which could be done
          > mechanically, and the redirect would automagically resend
          > anyone clicking that link to the actual page. I suppose that
          > links pointing to the redirect pages could be readjusted
          > later, in no hurry, either by hand or by a "wiki robot", and
          > in either case with the help of the "What points here" page
          > for the redirect.

          Would someone who understands wiki procedures please describe
          how the URL for a tip would be generated. What is actually
          achievable? Can a URL be changed later without much effort?

          Can we have a redirect as Tony outlines above?

          I proposed devising a short id for each tip (like "super_star"
          for tip 1), then using that tip_id in the URL.

          That would avoid ugly URLs which would wrap in an email, or
          which would contain stuff like %20, making the URL hard to read.

          Is my concern (that we should avoid long ugly URLs) misguided?

          John
        • fREW
          ... %20 s won t show up in a wiki. If you make super_star the id, then super star will also get to the same place. That s what makes a good wiki so nice.
          Message 4 of 5 , May 18, 2007
          View Source
          • 0 Attachment
            On 5/18/07, John Beckett <winterwaffle@...> wrote:
            > A.J.Mechelynck wrote:
            > > Wouldn't it be enough to set up the main tip page with a
            > > tip _name_ (which would be the current "title" of the tip, or
            > > a disambiguation page if there are more than one tip with the
            > > same title), and have the tip _number_ (only for tips imported
            > > from Vim-online) refer to a redirect page, let's say "Vim tip
            > > 1" => "The super star"? So the conversion script could convert
            > > "vimtip#1" to "[[Vim tip 1]]", which could be done
            > > mechanically, and the redirect would automagically resend
            > > anyone clicking that link to the actual page. I suppose that
            > > links pointing to the redirect pages could be readjusted
            > > later, in no hurry, either by hand or by a "wiki robot", and
            > > in either case with the help of the "What points here" page
            > > for the redirect.
            >
            > Would someone who understands wiki procedures please describe
            > how the URL for a tip would be generated. What is actually
            > achievable? Can a URL be changed later without much effort?
            >
            > Can we have a redirect as Tony outlines above?
            >
            > I proposed devising a short id for each tip (like "super_star"
            > for tip 1), then using that tip_id in the URL.
            >
            > That would avoid ugly URLs which would wrap in an email, or
            > which would contain stuff like %20, making the URL hard to read.
            >
            > Is my concern (that we should avoid long ugly URLs) misguided?
            >
            > John
            >
            >

            %20's won't show up in a wiki. If you make super_star the id, then
            "super star" will also get to the same place. That's what makes a
            good wiki so nice. Redirects do seem to be easy to do. If we have a
            page and move it to somewhere else, the old URL automatically
            redirects to the new one. If I understand what Tony is saying, it
            would be pretty easy.

            -fREW
          • A.J.Mechelynck
            ... I propose using just the title as it already exists in the tip, e.g. The super star (see below about spaces). In addition, a page titled Vim tip 1
            Message 5 of 5 , May 18, 2007
            View Source
            • 0 Attachment
              John Beckett wrote:
              > A.J.Mechelynck wrote:
              >> Wouldn't it be enough to set up the main tip page with a
              >> tip _name_ (which would be the current "title" of the tip, or
              >> a disambiguation page if there are more than one tip with the
              >> same title), and have the tip _number_ (only for tips imported
              >> from Vim-online) refer to a redirect page, let's say "Vim tip
              >> 1" => "The super star"? So the conversion script could convert
              >> "vimtip#1" to "[[Vim tip 1]]", which could be done
              >> mechanically, and the redirect would automagically resend
              >> anyone clicking that link to the actual page. I suppose that
              >> links pointing to the redirect pages could be readjusted
              >> later, in no hurry, either by hand or by a "wiki robot", and
              >> in either case with the help of the "What points here" page
              >> for the redirect.
              >
              > Would someone who understands wiki procedures please describe
              > how the URL for a tip would be generated. What is actually
              > achievable? Can a URL be changed later without much effort?

              I propose using just the title as it already exists in the tip, e.g. "The
              super star" (see below about spaces). In addition, a page titled "Vim tip 1"
              would also be created, with only the line

              #REDIRECT [[The super star]]

              so that trying to get that page would normally automatically go to the other
              one. The conversion script, when finding the text "vimtip#1" (used by the
              vim-online tips to generate links to each other) would translate it to "[[Vim
              tip 1]]" (without the quotes) which is an internal link in wikicode. Later,
              someone (or maybe some wiki robot) could check the "What points here" page for
              the redirection page, and change everywhere [[Vim tip 1]] to [[The super star]].

              See http://en.wikipedia.org/wiki/Wikipedia:Cheatsheet (and, possibly, what it
              links to) for Wikipedia editing help.

              >
              > Can we have a redirect as Tony outlines above?
              >
              > I proposed devising a short id for each tip (like "super_star"
              > for tip 1), then using that tip_id in the URL.
              >
              > That would avoid ugly URLs which would wrap in an email, or
              > which would contain stuff like %20, making the URL hard to read.

              %20 are never necessary because spaces are replaced by underscores in the URL:
              when the title of a wiki page is "The super star" the URL is
              (something)/The_super_star where (something)/ depends on the wiki, e.g.,
              http://en.wikipedia.org/wiki/ for the English wikipedia or
              http://kb.mozillazine.org/ for the Mozillazine knowledge base. %28 or %29
              might appear if there are parentheses in the title, but only when referring to
              a wiki page from outside the wiki: e.g. the "Vim (text editor)" page of the
              English wikipedia is http://en.wikipedia.org/wiki/Vim_%28text_editor%29 from
              outside the wiki, but it is referred to as [[Vim (text editor)]] within the
              wiki, and (when equipped with the Wikipedia (en) search plugin) typing "Vim
              (text editor)" (without the quotes) in the Firefox 2 search bar finds it (I
              just tried it). Some Fx2 search plugins can also be used with Fx1.5, others
              can also be used with IE7, I'm not sure to which category this one belongs.

              >
              > Is my concern (that we should avoid long ugly URLs) misguided?
              >
              > John
              >

              Best regards,
              Tony.
              --
              The idea is to die young as late as possible.
              -- Ashley Montague
            Your message has been successfully submitted and would be delivered to recipients shortly.