TiddlyWiki app idea

409 views
Skip to first unread message

PJO

unread,
Jan 14, 2017, 1:40:16 PM1/14/17
to TiddlyWiki
Something I've always wanted in a bookmarking app and which I've yet to see implemented is a way of tracking when I last visited a site:


where the date is updated whenever the URL is clicked on.

How easy would it be to this with TW5?

Tobias Beer

unread,
Jan 15, 2017, 3:43:37 AM1/15/17
to TiddlyWiki
Hi PJO,
 
Something I've always wanted in a bookmarking app and which I've yet to see implemented is a way of tracking when I last visited a site where the date is updated whenever the URL is clicked on.

How easy would it be to this with TW5?

At the moment, there is no action widget for opening an external url that we could use inside an appropriate button to which we could bind further actions.

In other words, we would need (to extend) some widget first, so that it caters for opening external references, e.g. ActionNavigateWidget or WidgetMessage: tm-navigate. So, we'd need a way to define out own click-actions for opening an external url.

Best wishes,

Tobias.

Tobias Beer

unread,
Jan 15, 2017, 5:42:20 AM1/15/17
to TiddlyWiki
Hi PJO,

Come to think of it, perhaps the parser for external links could be extended like so:

[ext actions=variableName[<title>|<url>]]

In other words, when clicked, the actions defined in variableName are performed.

I created an issue on Github for this:

#2711 invoke actions when clicking external link

Best wishes,

Tobias.

PMario

unread,
Jan 15, 2017, 9:04:22 AM1/15/17
to TiddlyWiki
On Saturday, January 14, 2017 at 7:40:16 PM UTC+1, PJO wrote:
Something I've always wanted in a bookmarking app and which I've yet to see implemented is a way of tracking when I last visited a site:

Hi,
Just use the browser history. eg: In Firefox you have several sorting options: eg: By Date and Website.
Which should pretty much do, what you want.

I'm sure it may be worth, to have a look at some specific browser plugins, that show more details.

have fun!
mario


PJO

unread,
Jan 16, 2017, 4:52:02 AM1/16/17
to TiddlyWiki
I'm aware of browser history, thanks.

What I was thinking of was an app that allowed me to tag a curated list of web sites to facilitate some kind of regular review (weekly, monthly and quarterly, say). No bookmarking tool I've ever seen does it. Currently one can add bookmarks to folders readily enough but the link doesn't get a last-visited date. My browser history tends to get large and then get wiped. I mainly use it after a browser crash to find things I hadn't finished reading or to find something that has come up in conversation and which I didn't think to bookmark earlier.


PMario

unread,
Jan 16, 2017, 6:10:28 AM1/16/17
to tiddl...@googlegroups.com
Hi PJO,

So if I understand it right, you want a list of links represented by "journal like link-buttons"
Whenever you click a link it adds a record to the journal.

My idea is, to use one data-tiddler per URL / journal. ... They are easy to create
Then use a "custom" list to create the "journal like link-buttons"
Those buttons may use action-setfield widget to populate the journal.
...

just a rough idea, no experiments made yet.

see: http://tiddlywiki.com/#ActionSetFieldWidget:DataTiddlers%20ActionWidgets%20ActionSetFieldWidget

have fun!
mario

Tobias Beer

unread,
Jan 16, 2017, 7:08:21 AM1/16/17
to tiddl...@googlegroups.com
Hi PMario,

I guess you have noticed by now that, no matter how you turn it,
there currently is no way to attach some custom button action to external links.
At least, that is what experimenting will make you aware of.
...unless perhaps you nest your link inside the button.

Best wishes,

Tobias.

Tobias Beer

unread,
Jan 16, 2017, 7:23:03 AM1/16/17
to TiddlyWiki
Hi PJO & PMario,
 
...unless perhaps you nest your link inside the button.

I extended the ticket...

#2711 invoke actions when clicking external link

...as follows:

Another possible solution could be to extend the core ButtonWidget to allow the click event to propagate down to any [ext[<url>]] it contains. Currently, this appears to be prevented. At least, trying the below on tb5 using the calc macro doesn't work:

\define link() [ext[$(url)$]]
\define logtid() $:/logs/$(url)$

<$vars url="http://google.com">
<$tiddler tiddler=<<logtid>>>

<$button class="tc-btn-invisible">
<<link>>
<$list filter="[<logtid>has[text]]">
<$action-setfield $text=<<calc !!text +1>>/>
</$list>
<$list filter="[<logtid>!has[text]]">
<$action-setfield $text="1"/>
</$list>
</$button>

<$link><$view field="title"/></$link>
</$tiddler>
</$vars>
Best wishes,

Tobias.

PMario

unread,
Jan 16, 2017, 8:23:30 AM1/16/17
to TiddlyWiki
On Monday, January 16, 2017 at 1:08:21 PM UTC+1, Tobias Beer wrote:
I guess you have noticed by now that, no matter how you turn it,
there currently is no way to attach some custom button action to external links.

I know. But it turns out, that's not really necessary (at least for me :), since imo a journal mechanism always wants some comments. So the idea that I prefer, uses a 2 click mechanism and has much more flexibility.
Examples will follow.
 
At least, that is what experimenting will make you aware of.
...unless perhaps you nest your link inside the button.

That doesn't work well.

-m

Jeremy Ruston

unread,
Jan 16, 2017, 10:06:45 AM1/16/17
to tiddl...@googlegroups.com
Tracking external links can be a tricky business. For example, there's no JavaScript event issued if a user right clicks on a link and selects to open it in a new tab/window. I'd be more inclined to focus the other way around: constructing an action widget for opening a link in a new tab, and then using that within a button.

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 tiddlywiki+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
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/5f705cca-dad2-46bb-9500-d700d53d97b2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

PJO

unread,
Jan 16, 2017, 10:21:41 AM1/16/17
to TiddlyWiki
I'd be happy enough to trade off right-clicking. To amplify a little further, probably unnecessarily, I'd be happy to have tiddlers with the following

1. URL date
2. URL date
3. URL date

where the date was updated whenever the corresponding URL was clicked.

PMario

unread,
Jan 16, 2017, 10:29:20 AM1/16/17
to TiddlyWiki
On Monday, January 16, 2017 at 4:21:41 PM UTC+1, PJO wrote:
I'd be happy enough to trade off right-clicking. To amplify a little further, probably unnecessarily, I'd be happy to have tiddlers with the following
where the date was updated whenever the corresponding URL was clicked.

I'll post a proof of concept soon. Not 100% exact like the OP, but should be useful.
At the moment I'm playing around with different list views. ... most promising for me is a table-like view.

-m

PMario

unread,
Jan 16, 2017, 10:59:21 AM1/16/17
to TiddlyWiki
Hi PJO,

Important: Use a backup of your TW, to play with this concept.

I did create a proof of concept, to play around with the input possibilities and a decent display structure, that I think could be useful.

The attachment contains a file, that you can download and drag and drop import into your TW.
It contains several files.


test-filter ... main tiddler to play with. It conains 5 different "views", where the last one looks promising for me.

google-link    ... test journal 1
tiddlywiki-link  ... test journal 2  .... To create a URL, that should be tracked, just create a tiddler named eg:  xxxxx-link, tag it: track   and add a field named: url: https:/example.com   Tiddlers tagged: track will contain the journal.

index-text-template ... template to display timestamp as plain text
table-template ... table row template, kind of useful

link-journal-styles ... simple style sheet.

li-template  ... list template, very rough, just for experimenting.
li-template-1 ... list template, very rough, just for experimenting.

The easiest way to get going is to delete stuff, that you don't like. Just keep what you want :)

Feedback is very welcome! .. So I can iterate and try to create a simple plugin. Templates, Styles and so on will be system tiddlers. A the moment everything is visible, to make debugging easy.

have fun!
mario
link-journal-test.json

PMario

unread,
Jan 16, 2017, 11:02:16 AM1/16/17
to TiddlyWiki
uups, forgot to talke about the workflow :)

For me it is important to have a possibility to add a comment to every journal entry.

1 add comment
2 click add journal entry
3 open link.

or  just 3 open link, if you don't want to add a journal.
or just use 1 and 2 without 3 ... and so on

have fun!
mario

PMario

unread,
Jan 16, 2017, 11:07:48 AM1/16/17
to TiddlyWiki
At the moment the "record-comment" macro allows to creates a log-entry every minute. This is accomplished with the <<now>> macro.
The macro can be found in the test-filter  tiddler.

\define record-comment()
<$action-setfield $tiddler=<<currentTiddler>> $index=<<now "YYYY-0MM-0DD, 0hh:0mm">> $value={{!!comment}}/>
<$action-setfield $tiddler=<<currentTiddler>> $field=comment $value="--"/>
\end


if you want to have 1 second granularity just change the second line to

\define record-comment()
<$action-setfield $tiddler=<<currentTiddler>> $index=<<now "YYYY-0MM-0DD, 0hh:0mm:0ss">> $value={{!!comment}}/>
<$action-setfield $tiddler=<<currentTiddler>> $field=comment $value="--"/>
\end



If you want to keep the comment just delete the 3rd line. like so:

\define record-comment()
<$action-setfield $tiddler=<<currentTiddler>> $index=<<now "YYYY-0MM-0DD, 0hh:0mm">> $value={{!!comment}}/>
\end


have fun!
mario

PMario

unread,
Jan 16, 2017, 11:11:05 AM1/16/17
to TiddlyWiki
On Monday, January 16, 2017 at 4:06:45 PM UTC+1, Jeremy Ruston wrote:
Tracking external links can be a tricky business. For example, there's no JavaScript event issued if a user right clicks on a link and selects to open it in a new tab/window. I'd be more inclined to focus the other way around: constructing an action widget for opening a link in a new tab, and then using that within a button.

Yea,
IMO that would be a good solution. is tm-open-window http://tiddlywiki.com/#WidgetMessage%3A%20tm-open-window  able to do this?

-m

BJ

unread,
Jan 16, 2017, 11:48:44 AM1/16/17
to TiddlyWiki
I have a plugin that allow links to be clicked:

http://bjtools.tiddlyspot.com/#ClickAction

you could use it like this: (you can open a new tiddler at http://bjtools.tiddlyspot.com/ and paste the code below to try it)

\define datedlink(x)
<$button setTo="v" set="$x$"><$text text={{$x$!!title}}/></$button><$view field="modified" format="date" template={{$:/language/Tiddler/DateFormat}}/>

<a href="""$x$"""><$click state="$x$" text="v"/> </a>
\end

<<datedlink "http://tiddlywiki.com">>


all the best BJ


On Saturday, January 14, 2017 at 7:40:16 PM UTC+1, PJO wrote:

Tobias Beer

unread,
Jan 16, 2017, 11:53:59 AM1/16/17
to TiddlyWiki
Hi @Jeremy,

 
Tracking external links can be a tricky business. For example, there's no JavaScript event issued if a user right clicks on a link and selects to open it in a new tab/window. I'd be more inclined to focus the other way around: constructing an action widget for opening a link in a new tab, and then using that within a button.

Did you consider enhancing the ext parser as suggested here?
#2711 invoke actions when clicking external link
Best wishes,

Tobias.

BJ

unread,
Jan 16, 2017, 11:59:19 AM1/16/17
to TiddlyWiki
I have noticed that the displayed modified date is not changing, this is because the view widget does not update when the data changes, if you look at the tiddler itself in the story you can see its modification date changing....

BJ

unread,
Jan 16, 2017, 12:13:05 PM1/16/17
to TiddlyWiki
correction the macro should be

\define datedlink(x)
<$button setTo="v" set="$x$"><$text text={{$x$!!title}}/></$button><$view tiddler="$x$" field="modified" format="date" template={{$:/language/Tiddler/DateFormat}}/>


<a href="""$x$"""><$click state="$x$" text="v"/> </a>
\end

<<datedlink "http://tiddlywiki.com">>

Jeremy Ruston

unread,
Jan 16, 2017, 12:58:43 PM1/16/17
to tiddl...@googlegroups.com
Hi Tobias

Did you consider enhancing the ext parser as suggested here?
#2711 invoke actions when clicking external link

I've replied briefly on GitHub.

Best wishes

Jeremy


Best wishes,

Tobias.

--
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+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.

PJO

unread,
Jan 16, 2017, 2:04:45 PM1/16/17
to TiddlyWiki
All,

I'm bowled over at the responses here. What a community!

Thanks!

PJO

unread,
Jan 16, 2017, 2:36:43 PM1/16/17
to TiddlyWiki
Small, addendum, having looked at the github discussion: I don't need to count visits or keep a history (I'd archive the browser history if I did). I just want to know when I last visited a web page.

I keep some of my bookmarks in TiddlyWiki and that works pretty well apart from not tracking which sites I visited when -- so I've never scaled this up as much as I'd like. 

Why am I doing this? I am trying to bring a little additional order to some of my reading. It's a January experiment, that's all. I often find that I haven't checked in with some sites for too long (and I do not want to consume RSS or anything in the meantime).*

Maybe down the road it would be interesting to combine this (plugin for pulling pinboard bookmarks into tiddlers), a Tiddlywiki hosted on node.js, and perhaps a browser plugin for updating the Tiddlywiki (that is, the date of any site bookmarked if visited without clicking on it in the wiki). But for now I'll settle for manual curation and a date that updates when an adjacent link is clicked! :-)


*This is something I've wanted to do anyway for a long time but, FWIW, I did recently have the experience of finding that I didn't discover known bugs in a security system which I might have discovered ahead of what turned out to be a false alarm event, and not a burglarly, if I had realised how long it was since I lasted visited a particular site.

PMario

unread,
Jan 17, 2017, 3:40:39 AM1/17/17
to TiddlyWiki
Hi,

Did you try my attachment from the other post?

-m

PJO

unread,
Jan 17, 2017, 7:35:03 AM1/17/17
to TiddlyWiki
No, I don't want a journal equivalent in TiddlyWiki of the browser history. Let me walk you through it by describing doing manually what I'd like to automate. Let's say it's Monday, and the 1st day of the month and I wish to do some weekly and monthly visits to some web sites. 

First I go to the Weekly Tiddler, and I find for the sake of illustration, a few URLs, each with a date after it:

ULR1 date
ULR1 date
etc.

I click on each URL and then go back and edit the date manually. Then repeat for the Monthly tiddler. I don't actually do this but if Tiddlywiki could set the date automatically I would organize my bookmarks using TiddlyWiki.

PJO

unread,
Jan 17, 2017, 7:45:48 AM1/17/17
to TiddlyWiki
Maybe I've misunderstood... are you suggesting this: changing each link to a button that includes the date it was last clicked? That would work, sure! I haven't had time to futz with this. Will try later today.

PMario

unread,
Jan 17, 2017, 8:13:13 AM1/17/17
to TiddlyWiki
On Tuesday, January 17, 2017 at 1:35:03 PM UTC+1, PJO wrote:
No, I don't want a journal equivalent in TiddlyWiki of the browser history.

What makes you think, that's the case, if you didn't test it?
 
Let me walk you through it by describing doing manually what I'd like to automate. Let's say it's Monday, and the 1st day of the month and I wish to do some weekly and monthly visits to some web sites. 

That's perfectly fine. In TW tagging is a very powerful feature. Every tiddler can have several tags. eg: if you tag a tiddler: default and add the following filter to the ControlPanel: Info: Basic: Default tiddlers  setting: [tag[default]]  it will open those tiddlers every time you open your TW.

So you can tag a "Dashboard" tiddler, that lists your tasks, and lets you easily jump to other dashboards.

Those dashboards can display any filtered list, that uses the link-journal.
 
First I go to the Weekly Tiddler, and I find for the sake of illustration, a few URLs, each with a date after it:

ULR1 date
ULR1 date
etc.

I click on each URL and then go back and edit the date manually.

As you may have found out in the conversation here and on github, it's not possible at the moment to automatically trigger tw-action events if you click an external link. The core doesn't provide that function (yet). ... That's why I did create my proof of concept in the way I did, to work around the existing limitations, and offer something, that should work, as close as possible to your OP. Additionally,
 
Then repeat for the Monthly tiddler. I don't actually do this but if Tiddlywiki could set the date automatically I would organize my bookmarks using TiddlyWiki.

That's the way I did it as close as possible. You just have to use your imagination, to get the stuff going. ... and off course you should at least test, what someone else prepared "just for you" in his free time.

As I wrote:

Feedback is very welcome! .. So I can iterate and try to create a simple plugin.

Let me rephrase this: "No feedback" -> No changes!  ... It's as simple as that.

have fun!
mario






PJO

unread,
Jan 17, 2017, 7:38:10 PM1/17/17
to TiddlyWiki
Apologies, I completely missed your post with the downloadable attachment and was responding to a different post. I've now tried it out. First, let me say thanks

I was initially slightly baffled. Instead of 

URL date

You've made

tiddlername comment journalbutton url

and took me a few moments to figure this out (I didn't even immediately recognise the add journal entry button, sorry) and also I had to see how to add a field (I have not yet done anything like this with TW5; this isn't a complaint, just to be clear about how idiotproof instructions need to be!).

Ok, so I created tiddlers and added fields with urls and then clicked on the links for the urls. The web page opened, the journal was updated, but no timestamp was recorded. Then I tried adding a comment and the timestamp was recorded ok. Am I right in thinking that a one step action isn't possible? Because, well, I don't need to record comments every time I visit a web site! Apart from that it seems very workable and it certainly does what I need. Yes, the last table looks great.

Now that I can see it working it crosses my mind that it might be nice to have a "days since" column as well as or instead of the date, but I could live without it. This would be handy for things one looks at without any schedule -- just using intuition -- where the actual date doesn't matter that much.

Bravo and thanks again! I'll be happy to try any further iteration. This is something I have wanted FOREVER so I'm really very pleased.

PMario

unread,
Jan 18, 2017, 5:05:23 AM1/18/17
to TiddlyWiki
On Wednesday, January 18, 2017 at 1:38:10 AM UTC+1, PJO wrote:
Apologies, I completely missed your post with the downloadable attachment and was responding to a different post. I've now tried it out. First, let me say thanks

ah, ok. You are welcome.
 
I was initially slightly baffled. Instead of 

URL date

You've made

tiddlername comment journalbutton url

right.
 
Ok, so I created tiddlers and added fields with urls and then clicked on the links for the urls. The web page opened, the journal was updated, but no timestamp was recorded. Then I tried adding a comment and the timestamp was recorded ok. Am I right in thinking that a one step action isn't possible?

At the moment 2 clicks are needed. Tobias opened a github issue, which is discussed currently. Basically there are 2 possibilities. ...

a) We can intercept the "external link" click, which needs new core functionality
b) We can add a new "button message", which also needs new core functionality.

So the 1-click action is discussed, but not available yet. I personally prefer b). I think it would be easier to implement. I'll have a closer look. Tobias seems to prefer a). So we'll see :)
 
Because, well, I don't need to record comments every time I visit a web site! Apart from that it seems very workable and it certainly does what I need. Yes, the last table looks great.

Yea. That's why it defaults to "--". It would be possible to customize the default text with a feld eg: default-comment. ... But at the moment "--" is hard-coded.
 
Now that I can see it working it crosses my mind that it might be nice to have a "days since" column as well as or instead of the date, but I could live without it.

That should be possible, since the core already has that functionality. So we just need to experiment a bit.
 
This would be handy for things one looks at without any schedule -- just using intuition -- where the actual date doesn't matter that much.

That's right. .... Scheduled lists can be created using different tags. eg: checkMonday, checkTuesday, .... and create different lists / tables. ...
 
Bravo and thanks again! I'll be happy to try any further iteration. This is something I have wanted FOREVER so I'm really very pleased.

Good! As you can see, you raised a problem, that is interesting and seems to be useful for the core. There is no immediate solution, but there may be one :)

have fun!
mario

Tobias Beer

unread,
Jan 18, 2017, 6:52:28 AM1/18/17
to TiddlyWiki
Hi Mario,

So the 1-click action is discussed, but not available yet. I personally prefer b).
I think it would be easier to implement. I'll have a closer look. 
Tobias seems to prefer a). So we'll see :)

I have no preference at all.
If a message is the best way to do it,
i.e. "tm-open-external-link" or some such,
then we should do that.

Is that what you have in mind?

Best wishes,

Tobias. 

PMario

unread,
Jan 18, 2017, 2:16:36 PM1/18/17
to TiddlyWiki
On Wednesday, January 18, 2017 at 12:52:28 PM UTC+1, Tobias Beer wrote:
So the 1-click action is discussed, but not available yet. I personally prefer b).
I think it would be easier to implement. I'll have a closer look. 
Tobias seems to prefer a). So we'll see :)

I have no preference at all.

:)
 
If a message is the best way to do it,

I don't know. I thought it would be generic and wouldn't cause any compatibility issues.
 
i.e. "tm-open-external-link" or some such,
then we should do that.

Is that what you have in mind?

yea. based on: http://tiddlywiki.com/#WidgetMessage%3A%20tm-open-window  but I didn't have a closer look at the source yet.

-mario

PMario

unread,
Jan 21, 2017, 1:33:22 PM1/21/17
to TiddlyWiki

Tobias Beer

unread,
Jan 21, 2017, 2:26:57 PM1/21/17
to TiddlyWiki
Hi Marion,
Neat stuff using that paramObject.

Best wishes,

Tobias. 
Reply all
Reply to author
Forward
0 new messages