[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

ruwiki question

Its Me

2/12/2005 2:51:00 AM

I am considering extending ruwiki (if needed) to add some metadata to links
in ruwiki. e.g.
topic1
(specialize) --> topic2
(specialize) --> topic3
(related) --> topic4

Any suggestions where I should begin?

Thanks.


4 Answers

Austin Ziegler

2/12/2005 5:34:00 AM

0

On Sat, 12 Feb 2005 11:55:01 +0900, itsme213 <itsme213@hotmail.com> wrote:
> I am considering extending ruwiki (if needed) to add some metadata to links
> in ruwiki. e.g.
> topic1
> (specialize) --> topic2
> (specialize) --> topic3
> (related) --> topic4

I'm not quite sure what you're after here. Can you expand on this?

-austin
--
Austin Ziegler * halostatue@gmail.com
* Alternate: austin@halostatue.ca


Its Me

2/12/2005 3:53:00 PM

0

"Austin Ziegler" <halostatue@gmail.com> wrote
> On Sat, 12 Feb 2005 11:55:01 +0900, itsme213 <itsme213@hotmail.com> wrote:
> > I am considering extending ruwiki (if needed) to add some metadata to
links
> > in ruwiki. e.g.
> > topic1
> > (specialize) --> topic2
> > (specialize) --> topic3
> > (related) --> topic4
>
> I'm not quite sure what you're after here. Can you expand on this?

Currently a WikiWord indicates a link to a wiki page. In my case, one page
might have two different categories of links to other pages. The categories
have different meaning in my problem (will be treated differently by
scripts, may be presented differently, etc.). I thought I would
differentiate them by adding some optional link metadata to each link.

e.g. if I have pages for people:
Joe_Smith
Bob_Brown
Mary_Spence
Sue_Singer

If I want to distinguish "friend" from "acquaintance" links. Suppose I use
"{...}" for this metadata. I might add to page Mary:
...Bob_Brown{friend}
...Sue_Singer{acquaintance}

I would like want to distinguish these links in scripts, and the
corresponding html might have:
...<a class="rwtk_NamedLinks friend" href="...>Bob_Brown</a>..<a
class="rwtk_NamedLinks acquaintance" href="...>Sue_Singer</a>
1. Would this be feasible? Where would I start looking? Suggestions for
syntax?

2. Related question: Where would I look to try to add such metadata to the
pages themselves? e.g. distinguish People pages from Company pages?
Suggestions for syntax?

4. Somewhat related question: Can pages be renamed in Ruwiki?

Thanks a bunch.


Austin Ziegler

2/12/2005 9:08:00 PM

0

On Sun, 13 Feb 2005 00:55:03 +0900, itsme213 <itsme213@hotmail.com> wrote:
> "Austin Ziegler" <halostatue@gmail.com > wrote
>> On Sat, 12 Feb 2005 11:55:01 +0900, itsme213 <itsme213@hotmail.com > wrote:
>>> I am considering extending ruwiki (if needed) to add some
>>> metadata to links in ruwiki. e.g. topic1 (specialize) --> topic2
>>> (specialize) --> topic3 (related) --> topic4
>> I'm not quite sure what you're after here. Can you expand on
>> this?
> Currently a WikiWord indicates a link to a wiki page. In my case,
> one page might have two different categories of links to other
> pages. The categories have different meaning in my problem (will
> be treated differently by scripts, may be presented differently,
> etc.). I thought I would differentiate them by adding some
> optional link metadata to each link.
>
> e.g. if I have pages for people:
> Joe_Smith
> Bob_Brown
> Mary_Spence
> Sue_Singer
>
> If I want to distinguish "friend" from "acquaintance" links.
> Suppose I use "{...}" for this metadata. I might add to page Mary:
> ...Bob_Brown{friend} ...Sue_Singer{acquaintance}
>
> I would like want to distinguish these links in scripts, and the
> corresponding html might have:
> ...<a class="rwtk_NamedLinks friend" href="...> Bob_Brown</a> ..<a
> class="rwtk_NamedLinks acquaintance" href="...> Sue_Singer</a>
>
> 1. Would this be feasible? Where would I start looking?
> Suggestions for syntax?

This is certainly feasible, and I think that your proposed
implementation is okay; you'd modify the implementation of the
WikiWord stuff. The bad news is that in the next revision I'm
planning on pulling the WikiWord implementation out of the
tokenization code and into the core of the Wiki. When I do so,
however, I'll look at generalising this sort of thing to all tokens,
not just WikiWords. There is another thought on this, below:

I'm deep in the middle of a massive update to PDF::Writer that I
should have done months ago, and I think that people are going to be
floored with just what this library can do, so it'll be a bit of
time before I get back to Ruwiki.

> 2. Related question: Where would I look to try to add such
> metadata to the pages themselves? e.g. distinguish People pages
> from Company pages? Suggestions for syntax?

Well, the *easiest* way to do this is to use the project-nature of
Ruwiki itself. That is, instead of doing Bob_Brown{friend} you'd do
Friends::Bob_Brown. This, in turn, would also be a relatively minor
change to how Ruwiki renders everything -- and this I can see
implementing very quickly and easily. You'll change *all* of the
tokens to specify the current Project as a CSS class. That is,

<a class="rwtk_NamedLinks rwprj_Friends" href="...">...</a>

I'd like to generalise this, but I have to think about this a
little.

If you don't do this, then you'll need to add something to the Page
definition, which isn't well documented yet. I can work with you
directly if you would like.

> 4. Somewhat related question: Can pages be renamed in Ruwiki?

Not from within the Wiki itself, and it's a little tricky to do it
from outside of Ruwiki at the moment. This is on the feature list to
add.

-austin
--
Austin Ziegler * halostatue@gmail.com
* Alternate: austin@halostatue.ca


Its Me

2/14/2005 6:53:00 AM

0

"Austin Ziegler" <halostatue@gmail.com> wrote

> ...[much useful info]...
>
> > 4. Somewhat related question: Can pages be renamed in Ruwiki?
>
> Not from within the Wiki itself, and it's a little tricky to do it
> from outside of Ruwiki at the moment. This is on the feature list to
> add.

I may have to wait for this. Where should I look if I want to have a go at
it myself?

Thanks again.