Hi Jean-Charles
I came across TW5 while coding a personal document management for myself,
> and TW5 seem to be an excellent candidate. However I would like to expose a
> feature that may really be neat for managing all kind of informations, and
> that do not seem to exist from my (newbie) understanding :
>
I think you are essentially asking for ways to represent linked data within
TiddlyWiki.
>
> 1. Allow one *Property *to be multi-valued.
>
> TiddlyWiki fields are fundamentally strings - that's how they get
serialised to JSON and HTML. The core automatically parses certain fields
as arrays and dates, and exposes those parsed field values. You can see the
installed field parsers as the "parse" and "stringify" properties of the
objects in $tw.Tiddler.fieldModules in your browser JS console. The current
set are:
"created" and "modified": parsed as dates in YYYYMMDDHHMMSSmmmm format
"tags" and "list": parsed as arrays
You can choose to treat any field as an array by using the [list] filter.
For example, the filter "[list[HelloThere!!mylist]]" returns a list from
parsing the field "mylist" of the tiddler "HelloThere".
>
> 1. Allow a *Property *to target a *Tiddler*. This somehow is
> equivalent to a *Link*.
>
> To treat a field as a link you just use the link widget. For example, this
creates a link to the tiddler named in the field "myfield" of the current
tiddler:
<$link to={{!!myfield}}><$view field="myfield"/></$link>
>
> 1. Allow a *Property *to have a semantic meaning. For example, a *Tiddler
> *about the book "*C Programming Language*" could use *property *"*Has
> Author*" twice, targetting "*Ritchie*" and "*Kernighan*". Not that a
> *property
> *is directionnal, and that the reverse has a different meaning
> (something like "*Was written by*"). This may be familiar for users of
> the Semantic extension of Mediawiki.
>
> The usual way of doing that would be to create a field called "author"
that is a list of the titles of the tiddlers identifying the author.
Putting it all together, here's how you could create a new segment for the
view template that only shows the linked authors for the current tiddler.
1. Create a new tiddler called "$:/AuthorSegment"
2. Give it the tag "$:/tags/ViewTemplate"
3. Give it the content:
Authors:
<$list filter="[all[current]list[!!authors]]">
<$link><$view field="title"/></$link>
</$list>
>
> - *Links *already allow 1 and 2 and back-links exists. Currently *Links
> *do not convey any specific meaning. They just represent a generic
> "has something to do with" relationship.
>
> As discussed above, you can mint new link fields as much as you like; you
are responsible for rendering them as links.
>
> - *Fields *allow 3, without any "reverse meaning" because *Tiddlers *are
> currently not valid targets (2.). Maybe this fits the "Tiddler object
> format" deferred task of the roadmap.
>
> Similarly, tiddlers can be targets for a field.
> Internally, such *Properties *could even be used to implement *Fields*,
> *Links*, or *Tags*,, as the laters seem to be specific cases of a more
> generic one.
>
> Do some of you need such a feature ? Did someone manage to tweak TW5 do
> achieve this without changing it ?
>
I'll aim to add a "How to represent linked data" tiddler to tw5.com
I hope that helps, let me know if you have further questions
Best wishes
Jeremy
> --
> You received this message because you are subscribed to the Google Groups
> "TiddlyWiki" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/tiddlywiki.
> For more options, visit https://groups.google.com/d/optout.
>
--
Jeremy Ruston
mailto:[email protected]
--
You received this message because you are subscribed to the Google Groups
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/d/optout.