❓ How to synchronize/update a tiddler with the same tiddler in another TiddlyWiki? ✅ How to make a macro that updates a field in a table if another field (same row) in the table get clicked? ✅ How to check the browser?

87 views
Skip to first unread message

Cd.K

unread,
Oct 7, 2019, 4:08:45 PM10/7/19
to tiddl...@googlegroups.com
I would like to use TiddlyWiki as a control center: 

07-10-_2019_21-41-09.png



When clicking the login link in the second row of the table, the date in the column next to it should be updated.

I can format the link as a button with the link as the label and I can create a formatted date with a macro call.

But how can I address the date in the next column of the table in the same row from the login button?


Can I determine in the button in which browser the tiddler is displayed?

The last line is about "TOR" to indicate that the link should only be clicked in a Tor browser.
If the link is not clicked in a Tor browser, a message should be displayed instead of opening the link.

For the Tor Browser, there is another TiddlyWiki, which also contains this tiddler. But I want to edit/update the content only in one place.
Can the Tor Browser tiddler be changed automatically with changes in the control center TiddlyWiki?

Regards
Cd.K

@TiddlyTweeter

unread,
Oct 8, 2019, 6:27:37 AM10/8/19
to TiddlyWiki
Ciao Cd.K

Interesting questions from you! Maybe you should break this down into two different questions? One for date update issue. One for the browser awareness issue.

Here are some amateur thoughts re the browser part ...

Cd.K wrote:
I would like to use TiddlyWiki as a control center

1 - Regarding that, and particularly how to precisely control different browser launches, I'd maybe take a look at "Bob" (in two versions) by Jed Carty. 
Its a node implementation of TW that has probably the best support for automation & control of wiki we have in TW. 

It, very usefully, supports simple "scripts" that can launch specific shell commands DIRECTLY from the OS without need to define new protoccols & wotnot. 


2 - On startup TW creates informational tiddlers on state of browser etc. Can be found under  "$:/info/..." Could be used as variables in tests?

Best wishes
TT

Cd.K

unread,
Oct 8, 2019, 12:38:58 PM10/8/19
to TiddlyWiki
 Hi @TiddlyTweeter,

@TiddlyTweeter wrote:
 
"Bob" ... supports simple "scripts" that can launch specific shell commands DIRECTLY from the OS without need to define new protoccols & wotnot.

I built something like this myself with the help of Timimi: github ibnishak/Timimi: Webextension to save Tiddlywiki
It's very fast because it's programmed in GO LANG.

 
2 - On startup TW creates informational tiddlers on state of browser etc. Can be found under  "$:/info/..." Could be used as variables in tests?
 
 
After what I found in "$:/info/...", I have to write a JavaScript macro for it. But it's an easy one.
This clarifies the browser awareness issue.


Thanks
Cd.K



@TiddlyTweeter

unread,
Oct 8, 2019, 12:44:19 PM10/8/19
to TiddlyWiki
Ciao Cd.K

I forgot to mention that there is also a "Browser Sniffer" plugin -- you can fetch it directly from plugins under "Get More Plugins" 

TT

Mark S.

unread,
Oct 8, 2019, 1:14:06 PM10/8/19
to TiddlyWiki
We know nothing about your data structure, so it is hard to answer.

But I would assume that you have, perhaps, a tiddler for each provider/user. Like Cd...@mail1.com. You could use that tiddler to store the
related cells in a row. Then make a macro that creates the button for you based on the login.

So, for instance, you might invoke as <<mylog Cd...@mail1.com>> and it would create the button. When you click on the button, it would put the current
timestamp into a field like lastvisit. Then in table you might use {{Cd...@mail1.com!!lastvisit}} for the last visit field.

Good luck!

Cd.K

unread,
Oct 8, 2019, 1:32:14 PM10/8/19
to TiddlyWiki
Thanks, Mark S.
   
Okay, got it. I'll set up your suggested data structure.
At the moment I have only formatted links to the login dialogs of the respective e-mail provider:
    

 
[[Cd.K@mail1.com|https://mail.tutanota.com/mail/LqSHKvF-1s-1]]


This means TW WikiText does not know a table object. This is only a matter of formatting.

Regards
Cd.K


On Tuesday, October 8, 2019 at 7:14:06 PM UTC+2, Mark S. wrote:
We know nothing about your data structure, so it is hard to answer.

But I would assume that you have, perhaps, a tiddler for each provider/user. Like C...@mail1.com. You could use that tiddler to store the
related cells in a row. Then make a macro that creates the button for you based on the login.

So, for instance, you might invoke as <<mylog C...@mail1.com>> and it would create the button. When you click on the button, it would put the current
timestamp into a field like lastvisit. Then in table you might use {{C...@mail1.com!!lastvisit}} for the last visit field.
Message has been deleted

TonyM

unread,
Oct 8, 2019, 7:32:57 PM10/8/19
to TiddlyWiki
A Quick and more direct answer.

Rather than use links, use buttons. Buttons can be made to look like links. The button can then provide additional actions such as setting a field name to "now".

Always write buttons to operate on the current tiddler, so as you list the tiddlers you can transclude the button and it operates on the listed items tiddler.

Regards
Tony
Reply all
Reply to author
Forward
0 new messages