Fun with InfoMechanism

96 views
Skip to first unread message

Michael Wiktowy

unread,
Jun 4, 2021, 12:41:51 PM6/4/21
to TiddlyWiki
Hi,

I've been looking into the InfoMechanism part of TiddlyWiki as a means of reading variables passed in via URL (for autofilling fields, presetting filters/reports, mode-setting etc.)

e.g.
https://tiddlywiki.com/?variable=something&another_variable="something else"#InfoMechanism:$:/info/url/search
 will render as:

Is a legit URL that shows (via $:/info/url/search) what can be passed in. 

I think that you can tag a tiddler with $:/tags/StartupAction so that it triggers on TiddlyWiki startup to be able to take other actions based using the passed variables ... With a little filter-parsing (TBD), this could be rendered as a index tiddler or poked into variables/fields/tags.

Question(s): 
Neither $:/info/url/full nor $:/info/url/search show the Permaview/Permalink. Is this intentional? Other than reading the list field in the $:/StoryList (which will change as you open things up and I am not yet sure if it is available before the StartupActions), is there somewhere where the initial Permaview/link information is accessible?

Thanks,
/Mike

TW Tones

unread,
Jun 4, 2021, 6:55:36 PM6/4/21
to TiddlyWiki
Mike,

I thought I had seen the full user and permalink entries before but cant now. However by definition the permalink dose open the named tiddlers, so when using a permalink to access a wiki the $:/StoryList list field contains the opened tiddlers. That is perhaps you can retrieve them from there?

Tones

Michael Wiktowy

unread,
Jun 4, 2021, 8:37:41 PM6/4/21
to tiddl...@googlegroups.com
Yes. That's what I had mentioned as a potential solution at the bottom but I wonder if $/:Storylist will always be available before the StartupAction triggers.

Also, Storylist is not static so you would have to have your action take a snapshot into another tiddler if you wanted to preserve that data. I was just wondering why it was stripped from the info.

/Mike

--
You received this message because you are subscribed to a topic in the Google Groups "TiddlyWiki" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/tiddlywiki/4iygktccCFU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to tiddlywiki+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/22bfa624-a60a-4847-b27d-9d6a1286c547n%40googlegroups.com.

TW Tones

unread,
Jun 4, 2021, 11:08:54 PM6/4/21
to TiddlyWiki
Mike,

It all depends on what you want to do. All the permaview is the generation of a link to open with the current tiddlers in the story view. There are other ways to achieve the same thing.

I agree the url should be available somewhere, but I don't think you necessarily need it to do what you are thinking.

For example a filter can be passed in the url and that folder could access another tiddlers "list" field or text contents with a list of tiddlers. Then add to that startup actions and you can do almost anything. Perhaps return to the specific thing or a list of things you want to occur and we can consider the various ways to do it.

Remember by definition a URL with parameters/permaview is in a sense a fixed bookmark to open the wiki in a particular state.

Regards
Tones

PMario

unread,
Jun 6, 2021, 7:06:25 AM6/6/21
to TiddlyWiki
On Friday, June 4, 2021 at 6:41:51 PM UTC+2 mwik...@gmail.com wrote:

Question(s): 
Neither $:/info/url/full nor $:/info/url/search show the Permaview/Permalink. Is this intentional? Other than reading the list field in the $:/StoryList (which will change as you open things up and I am not yet sure if it is available before the StartupActions), is there somewhere where the initial Permaview/link information is accessible?

See this pending PR: "add location.hash to browser system info tiddlers" ... Which would give you a "strartup snapshot" of the URL hash.


You may support the PR at github and also comment there.

-mario
Reply all
Reply to author
Forward
0 new messages