A design Concept and Free Button read-date stamp

129 views
Skip to first unread message

TW Tones

unread,
Jun 23, 2020, 12:38:44 AM6/23/20
to tiddl...@googlegroups.com
Folks,

[Edit] Attachment updated, no longer has error in it

Introducing the Autonomous field

I love tiddlywiki and discovered another really nice code pattern and thought I would share, 
This is  something I plan to use in a blog I am building

This is what I call an Autonomous field, there is a single tiddler in the attached file read-date.json
  • Autonomous means works on its own. 
  • This tiddler is a button, a field definition, a view template and configurable tiddler all in one.
  • This particular example places a button on all tiddlers that match its internal display-filter
  • If the field does not exist on any tiddler on which it is displayed a click will add the field with a time stamp of now
  • This shows how you can timestamp a date on a field to indicate you have read it
  • You could make the button disappear, but I leave it there so you can stamp it "read" again.
  • Using fields can keep you tags free for ad-hoc relationships.
For those interested here is the code


title: read-date
display
-filter: [all[current]!is[system]]
display
-tags: $:/tags/ViewToolbar
field
-format: [UTC]YYYY0MM0DD0hh0mm0ss0XXX
icon
: $:/core/images/timestamp-on
tags
: $:/tags/ViewToolbar
tooltip
: Re-Stamp a read now (read-date)
tooltip
-off: Stamp a read now (read-date)


<$list filter={{read-date!!display-filter}} variable=nul>
<$wikify name=read-date text="""<$macrocall $name=now format={{read-date!!field-format}}/>""">
<$list filter="[all[current]!has[read-date]]" variable=nul>
   
<$button class="tc-btn-invisible" tooltip={{read-date!!tooltip-off}} >
         
{{$:/core/images/timestamp-off}}
         
<$action-setfield $field=read-date $value=<<read-date>> />
     </
$button>
</$list>
<$list filter="[all[current]has[read-date]]" variable=nul>
    <$button class="tc-btn-invisible" tooltip={{read-date!!tooltip}} >
         {{$:/
core/images/timestamp-on}}
         
<$action-setfield $field=read-date $value=<<read-date>> $timestamp=no />
     
</$button>
</
$list>
<!-- Using read-date
tag
with a tag named in {{read-date!!display-tags}}
set a display filter for when to show this autonomous field
Set the field format to use, in this case a data field.
Change the ions used for the button states above
Set the tool tip for on and Off buttons
-->
</$wikify>
</
$list>

All I need to do;
  • is fix its text when behind the more button.

I would love to hear what you think, and how we could take this further.

  • This method could include macros
  • If we could identify we are looking at the tiddler itself and not in the toolbar, we could list tiddlers with this field and in date order etc...
    • I have just not researched this yet.
Questions!
  • What other fields can you imagine world work here?
  • What macro would you like?

Regards
TW Tones
read-date.json

TW Tones

unread,
Jun 23, 2020, 1:32:35 AM6/23/20
to tiddl...@googlegroups.com
Folks,

I Have just extended this concept to the Autonomous tag

This is what I call an Autonomous tag, there is a single tiddler in the attached file select-tag.json

Autonomous means works on its own. 
This tiddler is a button, tag-toggle a field definition, a view template and configurable tiddler all in one.
    • This particular example places a button on all tiddlers that match its internal display-filter
    • If the tag does not exist on any tiddler on which it is displayed a click will add the tag
    • This shows how you can toggle a tag on a tiddler to select it (along with Others)
    • You could make the button disappear, after tagging, but I leave it there so you can remove it.
    • Remember Using fields can keep you tags free for ad-hoc relationships. this provides a quick ad hoc way to select a set of tiddlers
     Regards
    Tony
    select-tag.json

    TiddlyTweeter

    unread,
    Jun 23, 2020, 1:22:34 PM6/23/20
    to TiddlyWiki
    I import & see this problem ...

    Annotation 2020-06-23 192041.jpg

    Best wishes
    TT

    T


    On Tuesday, 23 June 2020 06:38:44 UTC+2, TW Tones wrote:
    Folks,

    TiddlyTweeter

    unread,
    Jun 23, 2020, 1:42:21 PM6/23/20
    to TiddlyWiki
    Regardless of whether my problem is my download issue ...

    IMO this needs to be DEMO WIKI with docs, not a download.

    Its hard to understand the aim otherwise.

    My 2 cents
    TT


    On Tuesday, 23 June 2020 06:38:44 UTC+2, TW Tones wrote:
    Folks,

    Diego Mesa

    unread,
    Jun 23, 2020, 1:50:14 PM6/23/20
    to TiddlyWiki
    Tony,

    As I read a lot of academic papers that have tiddlers, I have implemented a "touched" button on my tiddlers tagged with "paper". When I click that button, it does as you describe - update the touched field. Then, I frequently sort by "touched", as a way for me to see when papers keep bubbling up on my list!

    On Monday, June 22, 2020 at 11:38:44 PM UTC-5, TW Tones wrote:
    Folks,

    TW Tones

    unread,
    Jun 23, 2020, 7:28:42 PM6/23/20
    to TiddlyWiki
    Diego,

    Yes, I have a touch-date as well. I have already built one with this method, in this case and like the read date, it does not update the modified (and of course created) timestamp. this means the modified date remains meaning as it should, the last time it was modified. 

    This is one reason I would like to see free access to custom buttons that do a time stamp because if not available people start using created and modified for other purposes, when being able to maintain valid created and modified is important.

    Also as I stated previously one of the easiest ways to deal with periodic tiddlers such as say weekly, is each time you action it stamp the weekly-date with now, and have you list use the weekly date to see items older than 7 days. 

    Thanks for sharing your uses.

    TW Tones

    TW Tones

    unread,
    Jun 23, 2020, 7:35:00 PM6/23/20
    to TiddlyWiki
    Attachment updated, no longer has error in it

    Attached here and in the lead post.

    Not sure how an old copy crept in, I will watch out for that in future.

    Regards
    TW Tones
    read-date.json

    TW Tones

    unread,
    Jun 23, 2020, 7:49:37 PM6/23/20
    to TiddlyWiki
    TT,

    Thanks for reporting the bug, I have fixed it and riposted, as I expect you can see.

    IMO this needs to be DEMO WIKI with docs, not a download.

    Its hard to understand the aim otherwise.


    This suggests to me the idea is a viable method. Because you are asking it to be hosted and demoed online. It was a simple and recent discovery I wanted to share and discuss.

    I attached the examples to help in the discussion. There is no site to demo, only some examples of a method here.
    In future I hope to use the new share tiddlers plugin and open it in a version of my playground wiki.
    Until I get a time efficient method for demos I find it a chore that I cant afford to use time for.
    I am working on Automation to build demo/distribution wikis, however to do this well I need an idea of what is standard and acceptable practice.
    I was criticised (constructively) in the past, when I included some differences from empty.html in a demo wiki.

    Any published solution/demo/repository should in my view include a repository of autonomous fields to drag and drop to a wiki, Eventually taking the most popular and placing them in a library. I really want people to be able to make use of fields a lot more, especially new users.

    As Diego pointed out there are a number of well known needs such as touch date. If we can provide a number of autonomous fields it will encourage a defacto field naming standard as well.

    What do you think?

    Regards
    Tony

    Reply all
    Reply to author
    Forward
    0 new messages