Hey Jed, I've got a working version of things now.  It comes with a 
"Refresh Titles" button that uses internalFetch to grab the data from all 
the wikis and stores it in $:/state/Bob/{{wiki 
name}}/[$:/SiteTitle,$:/SiteSubtitle].  Then, I've reworked the Wiki 
Listing view to show the SiteTitle and SiteSubtitle in the Wiki Listing.  
IF the state tiddlers are not available, it falls back to the Wiki Name, as 
before.  

\define addPrefix() [addprefix[$:/state/Bob/$(WikiName)$/]]
\define getTitle() $:/state/Bob/$(WikiName)$/$:/SiteTitle
\define getSubtitle() $:/state/Bob/$(WikiName)$/$:/SiteSubtitle

Available Wikis: <$button>
  Refresh Titles
  <$list filter="[[$:/WikiSettings/split/wikis]indexes[]]" 
variable="WikiName">
     <$action-websocketmessage
       $type='internalFetch'
       fromWiki=<<WikiName>>
       filter='[title[$:/SiteTitle]]'
       transformFilter=<<addPrefix>>
       resolution='force'
     />
     <$action-websocketmessage
       $type='internalFetch'
       fromWiki=<<WikiName>>
       filter='[title[$:/SiteSubtitle]]'
       transformFilter=<<addPrefix>>
       resolution='force'
     />
   </$list>
</$button>


<$list filter="[[$:/WikiSettings/split/wikis]indexes[]]" 
variable="WikiName">
<li>
<a href=<<WikiName>> target='_blank'>
<$transclude tiddler=<<getTitle>> ><$text text=<<WikiName>> 
/></$transclude></a> <$transclude tiddler=<<getSubtitle>> />
</li>
</$list>




On Monday, October 15, 2018 at 11:28:35 AM UTC-4, Jed Carty wrote:
>
> Short answer, internalFetch is made for exactly this sort of thing, there 
> is nothing that would prevent what you want but there are some relatively 
> minor concerns.
>
> More detail:
>
> The internalFetch websocket message is made to fetch tiddlers from other 
> wikis served by Bob. 
> https://github.com/OokTech/TW5-Bob/blob/master/Documentation/WebSocketMessages/WebSocketMessage-internalFetch.tid
>
> I haven't come up with a better method of getting information from one 
> wiki to another yet, so I would go with that.
>
> The only potential worry is that fetching from a wiki loads the tidders 
> for that wiki on the back-end, so if you have a lot of them it may take a 
> few seconds for them to load and for the tiddlers to be fetched. So 
> whatever the solution is it shouldn't run often.
>
> I am not sure what the best way to ensure that this information is shared 
> between all the wikis is. I think that adding it to the wiki settings would 
> work but that would either mean there was a duplicate list or I have to 
> redesign how the paths to the wikis are listed. Another concern with that 
> is I am working on some more privacy features so that you only see the 
> wikis you have access too instead of seeing all the wikis regardless of if 
> you can access them or not, which would make running this once at the start 
> and sharing that with each wiki more complex.
>

-- 
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 https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/919ccf88-d9ea-4de0-ac1c-31d0ae377532%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to