[tw5] Re: How to model relationships between tiddlers

2020-02-12 Thread Michael McDermott
I've been tinkering with this approach and it fills the need pretty well. I 
hadn't really thought of using title lists in fields before, so using that 
+ the list macro + transclusion has helped a great deal. 

The only thing that has felt a little awkward has been having to create 
strings of tiddlers connected by fields to model some of the more 
sophisticated relationships.

Thanks for the pointers!

On Monday, February 3, 2020 at 7:20:31 PM UTC-6, Eric Shulman wrote:
>
> On Monday, February 3, 2020 at 4:03:51 PM UTC-8, Michael McDermott wrote:
>>
>> Is there a way to semantically model some relationship between two 
>> tiddlers?
>> For example, in a graph database, you might create a relationship like 
>> this:
>> [Leonardo da Vinci]   Painted--->[The Mona Lisa]
>> Is there a good option in TiddlyWiki I've missed?
>>
>
> You can create any "custom" fields you like on a tiddler.
>
> To represent a one-to-one relationship between painting and painter, you 
> could define
> a "paintedby" field for a painting, the value of which would be the title 
> of a "painter" tiddler.
>
> e.g., [[The Mona Lisa]] tiddler would have a "paintedby" field containing: 
> "Leonardo Da Vinci".
>
> Conversely, to represent one-to-many relationships, you could define a 
> "painted" tiddler for
> an artist, the value of which would be a space-separated list of titles of 
> paintings.
>
> e.g., [[Leonardo Da Vinci]] tiddler would have a "painted" field 
> containing: [[The Mona Lisa]] [[The Last Supper]] [[Salvator Mundi]]
>
> Then, to display a list of all his works, you can write in the [[Leonardo 
> Da Vinci]] tiddler:
> <$list filter="[list[!!painted]]"><$link />
>
> Alternatively, if not all paintings by Da Vinci are entered into the 
> "painted' field, you can still list all his paintings using a filter that 
> looks for his name in the "paintedby" field of other tiddlers, like this:
> <$list filter="[all[tiddlers]paintedby]">...
>
> For a more complex example, let's suppose that each artist tiddler is 
> tagged with "artist".  Then, you could create a list of all paintings in 
> the document, grouped by artists, using something like:
> <$list filter="[tag[artist]]">
><$link />
>
>   <$list filter="[all[tiddlers]paintedby]"><$link />
> 
>
> 
> The outer $list finds all artist tiddlers and displays their titles, while 
> the inner $list shows all the tiddlers for the current artist (inside a 
> blockquote for nicer formatting
>
> enjoy,
> -e
>
>
>
>
>
>

-- 
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 tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/57e2a0a7-8af7-4995-9a74-20a833f8b526%40googlegroups.com.


[tw5] Re: How to model relationships between tiddlers

2020-02-10 Thread bimlas
Michael McDermott,

I make fairly heavy use of tags in TiddlyWiki and that works very well for 
> broad categories. Is there a way to semantically model some relationship 
> between two tiddlers?
>

You may be interested in 
this: https://groups.google.com/forum/#!topic/tiddlywiki/Y6tbO_vnKmw 

-- 
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 tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/a778df62-cf38-401a-8b3e-a227be6a4960%40googlegroups.com.


[tw5] Re: How to model relationships between tiddlers

2020-02-03 Thread CJ Veniot
I'm a pretty big fan of Tidgraph.  Give it a peek and see what you think:  
http://ihm4u.github.io/tw5plugs/

Cheers !

On Monday, February 3, 2020 at 8:03:51 PM UTC-4, Michael McDermott wrote:
>
> I make fairly heavy use of tags in TiddlyWiki and that works very well for 
> broad categories. Is there a way to semantically model some relationship 
> between two tiddlers?
>
> For example, in a graph database, you might create a relationship like 
> this:
>
> [Leonardo da Vinci]   Painted--->[The Mona Lisa]
>
> It's pretty easy to see creating tiddlers for The Mona Lisa and Leonardo 
> da Vinci, but the only real way to link them is either tags or hyperlinks, 
> but I don't see a good way to model that relationship. The closest I've 
> seen is the TiddlyMap plugin, but that stores all of the relationships as 
> JSON content, which can only really be manipulated through the map plugin 
> itself.
>
> Is there a good option in TiddlyWiki I've missed?
>

-- 
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 tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/89fe9d55-cd62-46c3-aeee-23b875453f3c%40googlegroups.com.


[tw5] Re: How to model relationships between tiddlers

2020-02-03 Thread Eric Shulman
On Monday, February 3, 2020 at 4:03:51 PM UTC-8, Michael McDermott wrote:
>
> Is there a way to semantically model some relationship between two 
> tiddlers?
> For example, in a graph database, you might create a relationship like 
> this:
> [Leonardo da Vinci]   Painted--->[The Mona Lisa]
> Is there a good option in TiddlyWiki I've missed?
>

You can create any "custom" fields you like on a tiddler.

To represent a one-to-one relationship between painting and painter, you 
could define
a "paintedby" field for a painting, the value of which would be the title 
of a "painter" tiddler.

e.g., [[The Mona Lisa]] tiddler would have a "paintedby" field containing: 
"Leonardo Da Vinci".

Conversely, to represent one-to-many relationships, you could define a 
"painted" tiddler for
an artist, the value of which would be a space-separated list of titles of 
paintings.

e.g., [[Leonardo Da Vinci]] tiddler would have a "painted" field 
containing: [[The Mona Lisa]] [[The Last Supper]] [[Salvator Mundi]]

Then, to display a list of all his works, you can write in the [[Leonardo 
Da Vinci]] tiddler:
<$list filter="[list[!!painted]]"><$link />

Alternatively, if not all paintings by Da Vinci are entered into the 
"painted' field, you can still list all his paintings using a filter that 
looks for his name in the "paintedby" field of other tiddlers, like this:
<$list filter="[all[tiddlers]paintedby]">...

For a more complex example, let's suppose that each artist tiddler is 
tagged with "artist".  Then, you could create a list of all paintings in 
the document, grouped by artists, using something like:
<$list filter="[tag[artist]]">
   <$link />
   
  <$list filter="[all[tiddlers]paintedby]"><$link />

   

The outer $list finds all artist tiddlers and displays their titles, while 
the inner $list shows all the tiddlers for the current artist (inside a 
blockquote for nicer formatting

enjoy,
-e





-- 
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 tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/5f0c2fd3-3819-42bd-bb85-36dd69be7693%40googlegroups.com.