Inputting Current Date as Hard Link Through Buttons

65 views
Skip to first unread message

Kovacs

unread,
Apr 22, 2020, 11:36:41 PM4/22/20
to TiddlyWiki
So I have a couple buttons I borrowed from some other wikis for creating new tiddlers with specific tags and starting text. What I’m hoping to be able to do is send the current date as a hard link with the starting body text in order for the tiddler to be referenced in that days journal tiddler with TiddlyBlink.

I really only know enough to break things, but if anyone has tips or can point me in the right direction I’d appreciate it.

For the first button, ideally after “Started: “ I’d be able to pass the current date as [[DD MMM YYYY]] or [[22 April 2020]]. I’ve tried using the <<now>> macro but can’t seem to get it to work through this button and the spaces in my date format throw it off elsewhere. I tried using Fields as well, but they create soft links so they don’t show up under the Reference section with TiddlyBlink.

[Books Button](https://wiki.tiv.today/#Books)

<$button tooltip="Add a book">Add a book
<$action-createtiddler
$basetitle='New Book'
text='by

Started:

Finished:

---

!! Quotes'
tags='Books'
$savetitle='$:/.user/CreateBook!!newBook'
/>

For the second button, I copied the New Journal button to create two tiddlers (second one below) and was able to get the date through to the body text (<<journalTexx>>), but can’t figure out how to have brackets come through with it to create a hard link automatically.

[Start the Day](https://wiki.tiv.today/#Table%20of%20Contents)

<$vars journalTitleTemplate=%24%3A/config/NewTDL/Title journalTags=%24%3A/config/NewTDL/Tags%21%21tags journalText=%24%3A/config/NewTDL/Text>
<$wikify name="journalTexx" text="""<$macrocall $name="now" format=<<journalText>>/>""">
<$wikify name="journalTitle" text="""<$macrocall $name="now" format=<<journalTitleTemplate>>/>""">
<$reveal type="nomatch" state=<<journalTitle>> text="">
<$action-sendmessage $message="tm-new-tiddler" title=<<journalTitle>> tags=<<journalTags>> text=%7B%20%5B%3CjournalTitle%3Eget%5B%5D%5D%20}/>
</$reveal>
<$reveal type="match" state=<<journalTitle>> text="">
<$action-sendmessage $message="tm-new-tiddler" title=<<journalTitle>> tags=<<journalTags>> text=<<journalTexx>>/>
</$reveal>
</$wikify>
</$wikify>
</$vars>

Lastly, I don’t expect an easy answer for this one, but I wanted to see if anyone was aware of a plug-in that would allow for a calendar date picker to insert a hard linked date like the above, either through a button in the text editor (like the Stamp) or in some magical way through buttons similar to the above. I’m trying to figure out the easiest way to insert future dates in the body of my task tiddlers [here](https://wiki.tiv.today/#Tasks).

Thanks again for any help.

TonyM

unread,
Apr 23, 2020, 12:43:13 AM4/23/20
to TiddlyWiki
Kovacs,

You say;
So I have a couple buttons I borrowed from some other wikis for creating new tiddlers with specific tags and starting text. What I’m hoping to be able to do is send the current date as a hard link with the starting body text in order for the tiddler to be referenced in that days journal tiddler with TiddlyBlink.

This confuses me using hard links as a term and more, and having to decode your work already. I would find it much easier if you tried to explain what you want to do without including partial solutions that may very well be wrong. I suspect there is already a way to do what you are asking but its really not clear.

Some notes that may help

  • The new Journal button creates a tiddler according to the format set i$:/config/NewJournal/Title
  • Creating it a gain on the same day will open the same tiddler if that does not have the time in the format
  • You can set Text for new journal tiddlers and Tags for new journal tiddlers
  • Personally I have a Modified new Journal button that also adds the journal-date field using a Tiddlywiki timestamp format.
  • This it is easy to list and link to a tiddler by date rather than stuff around with interrogating the user friendly Journal tiddler title.
  • Every tiddle can be linked to using its title [[title with spaces]] and you can also get a permalink for each tiddler if you need to post it somewhere else.
  • One any journal tiddler you can use the new here button to create another tiddler tagged with the current journal tiddler to group other tiddlers around a specific date. use the below list to list these "today" related tiddlers in your journal tiddler
  • See http://bjtools.tiddlyspot.com/#ExtendableCalendar as one example of solutions for calendars already.

<$list filter="[tag<currentTiddler>]">

</$list>

This can be placed on every tiddler tagged Journal using a tiddler tagged $:/tags/ViewTemplate like this

<$list filter="[all[current]tag[Journal]]" variable=nul>
   <$list filter="[tag
<currentTiddler>]">

   </$list>
</$list>
Note should work but untested.
Variable=nul stops the list changing CurrentTiddler.

Look for the pickaday plugin to insert future dates at least into a field, which may be better than in the text, you can then display the value like this <$view field=journal-date format=date template="YYYY-0MM-0DD"/> or relative date. Again better in the view template.

By the way there are a number of todo list solutions already out there.

Sure we can make a pikaday Editor Toolbar button if we want, but there are other perhaps better ways to deal with this.

Regards
Tony

Kovacs

unread,
Apr 23, 2020, 10:23:54 AM4/23/20
to tiddl...@googlegroups.com
Hi Tony,

Thanks for taking the time to go through that. I was using the term hard link based on this: https://tiddlywiki.com/static/Hard%2520and%2520Soft%2520Links.html

Sorry if that caused any confusion.

My end goal is a simple button I can include at the top of a single tiddler that creates a new tiddler with a specific tag and prefilled with text and the current date as a link in the body, so the new, empty tiddler would look like:

Title: New Tiddler
Tags: Books
Text: ‘by

Started: [[23 April 2020]]‘

I have the button set up and working, but just can’t figure out how to have the current date come through as a link.

Also, the reason I want the date in the text rather than a field is to have it work better with the reference feature in TiddlyBlink.

Hopefully that makes more sense. On the task management side a lot of what I’ve been able to find is just too much for what I need. The basic task management features in TW5 meet my needs, I was just curious if there was an easy way to select a future date. For the time being I’d rather type it than overcomplicate the system for what my needs currently are.

Thanks again.
Reply all
Reply to author
Forward
0 new messages