chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] user list on wiki


From: Alejandro Forero Cuervo
Subject: Re: [Chicken-users] user list on wiki
Date: Fri, 6 Jul 2007 08:58:39 +0000
User-agent: Mutt/1.5.13 (2006-08-11)

> >1) Some people get links with space-separated names, e.g.
> >
> >http://chicken.wiki.br/mario%20domenech%20goulart
> >
> >while some get links with dash-separated names:
> >
> >http://chicken.wiki.br/dan-muresan
> 
> I've also been meaning to inquire regarding wiki page naming
> conventions. The currently-prevalent space-separated page names seem
> very cumbersome and a tad ugly as they will inevitably show up in the
> URL-encoded form (%20) in the browser.
> 
> If a dash indeed works equally well as a separator, I'd rather convert
> any pages of mine over to that format. But does svnwiki know to e.g.
> link [[Jim Hacker]] to a page named "jim-hacker" in the absence of a
> page "jim hacker", or would one need to use [[jim-hacker|Jim Hacker]]
> to get the desired effect? (This is probably a case of RTFM... :-P)

Ok, let me explain what's going in.

Originally, Svnwiki would always use spaces.  As Arto points out, this
is ugly because of the “%20” sequences showing up everywhere.  So at
some point I started modifying Svnwiki so it will use the
dash/lowercase form as the canonical form for all links.

The logic for this is coded in the “parse-link” and “parse-link-file”
functions in the stream-wiki egg.  Basically, when a link is found,
Svnwiki will try the following:

* If a file with the exact name exists (case sensitive), use that.

* If a file with the exact name in lowercase exists, use that.

* Otherwise, remove all characters from the path other than slashes,
  spaces, dashes and alphanumerics; turn spaces into dashes; lowercase
  everything; and use that.  The function for this is “name-to-base”.

That is why, if file “Jim Hacker” exists (probably because it was
created before Svnwiki got smarter about replacing spaces with dashes
and whatnot), [[Jim Hacker]] will be linked to that.  However, if the
file does not exist, it will be linked to “jim-hacker”, so that's the
file that will be created when our dear Jimbo follows the link the
first time.

For files already existing with spaces and uppercase characters, I
would recommend moving them to the “canonical” location (ie. replace
spaces with dashes, lowercase everything and remove non-alphanums) and
creating a link pointing from the old location to the new to make sure
the old URLs still work:

    svn mv Jim\ Hacker jim-hacker
    ln -s jim-hacker Jim\ Hacker
    svn add Jim\ Hacker

(There is some information about this aliases/redirects in

    http://wiki.freaks-unidos.net/svnwiki/aliases .)

> Alejandro, thanks again for developing svnwiki – it's a great
> system and I'm presently trying to get us to deploy it at work, too
> (replacing Trac's wiki which we currently use), as svnwiki would
> immediately solve the problem of allowing offline editing, and with
> one's choice of favorite text editor to boot.

Thanks, Arto!

I'm very happy to hear it has worked well for you.  I am aware that
getting it installed is quite a hassle right now so if I can help you
with that process, feel free to let me know and I'll be glad to assist
you.  You can catch me on Jabber.

Hmm, I'm going to start a page on positive things people say about
Svnwiki and I'll probably let you be the first I list there. ;-)

Alejo.
http://azul.freaks-unidos.net/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]