Anki like SRS in tiddlywiki

249 views
Skip to first unread message

Ondrej Stanek

unread,
Apr 27, 2018, 1:33:36 PM4/27/18
to tiddly...@googlegroups.com
First of all, I discovered TW today and it is a great piece of software. I really appreciate its design but...

For me note taking is not just about capturing the stuff but also about retrieving it when needed (at school during tests or at work).
So that is why I wanted to create Anki like srs for my tiddlyWiki.

To make it work you just have to create SRS tiddler and insert the code below and tag your notes with srs tag and optionally add question field.

!! Don't know
---
<$list filter="[!has[draft.of]tag[srs]!bucket[1]!bucket[2]!bucket[3]!bucket[4]sort[modified]limit[10]]">

<$button style="color: green">
<$action-setfield $tiddler= {{!!title}} bucket="1"/>
^ Know
</$button>
<$button set="TiddlerA!!caption" setTo={{caus}} style="color: red">
<$action-setfield $tiddler= {{!!title}} bucket="0"/>
v Don't know
</$button>
 <$link to={{!!title}}><$view field="question"/> (<$view field="title"/>)</$link> 
- <$view field="modified" format="date" template="DD.MM.YY hh:mm:ss"/>

</$list>

!! Saw once
---
<$list filter="[!has[draft.of]tag[srs]bucket[1]sort[modified]limit[10]]">

<$button style="color: green">
<$action-setfield $tiddler= {{!!title}} bucket="2"/>
^ Know
</$button>
<$button set="TiddlerA!!caption" setTo={{caus}} style="color: red">
<$action-setfield $tiddler= {{!!title}} bucket="0"/>
v Don't know
</$button>
 <$link to={{!!title}}><$view field="question"/> (<$view field="title"/>)</$link> 
- <$view field="modified" format="date" template="DD.MM.YY hh:mm:ss"/>

</$list>

!! OK
---
<$list filter="[!has[draft.of]tag[srs]bucket[2]sort[modified]limit[10]]">

<$button style="color: green">
<$action-setfield $tiddler= {{!!title}} bucket="3"/>
^ Know
</$button>
<$button set="TiddlerA!!caption" setTo={{caus}} style="color: red">
<$action-setfield $tiddler= {{!!title}} bucket="0"/>
v Don't know
</$button>
 <$link to={{!!title}}><$view field="question"/> (<$view field="title"/>)</$link> 
- <$view field="modified" format="date" template="DD.MM.YY hh:mm:ss"/>

</$list>


!! Good
---
<$list filter="[!has[draft.of]tag[srs]bucket[3]sort[modified]limit[10]]">

<$button style="color: green">
<$action-setfield $tiddler= {{!!title}} bucket="4"/>
^ Know
</$button>
<$button set="TiddlerA!!caption" setTo={{caus}} style="color: red">
<$action-setfield $tiddler= {{!!title}} bucket="0"/>
v Don't know
</$button>
 <$link to={{!!title}}><$view field="question"/> (<$view field="title"/>)</$link> 
- <$view field="modified" format="date" template="DD.MM.YY hh:mm:ss"/>

</$list>


!! Remembered
---
<$list filter="[!has[draft.of]tag[srs]bucket[4]sort[modified]limit[10]]">

<$button set="TiddlerA!!caption" setTo={{caus}} style="color: red">
<$action-setfield $tiddler= {{!!title}} bucket="0"/>
v Don't know
</$button>
 <$link to={{!!title}}><$view field="question"/> (<$view field="title"/>)</$link> 
- <$view field="modified" format="date" template="DD.MM.YY hh:mm:ss"/>

</$list>


It is really simple but it gets the job done. At least for me., for now.
But I can see few improvements which I might need some help with.

1) How not to repeat the code for each bucket OK, Good... make it DRY
2) How to handle date in fields when I want to implement better spaced repetition algorithm not just with buckets but with dates if answered correctly test again after 2,4,8,16,32,64,128.... days
Two fields will be needed lastCorrectAnswer and RepeatInXDays (times two or zeroed after each correct or false answer)
3) How to display count of Ok, Good, Remembered items  like OK (9), maybe some simple statistics
4) How i can check when the bucket field is empty so I do not have to write code like this !bucket[1]!bucket[2]!bucket[3]!bucket[4] and can write st like this bucket[0]!bucket[empty]
I will eventually figure all this out myself but I would really appreciate good resources or tutorial for tiddlywiki development.

Simon Huber

unread,
Apr 27, 2018, 5:10:05 PM4/27/18
to TiddlyWikiDev
Hi Ondrej, 

take a look at this thread in the tiddlywiki group

there's something like anki, it's a work in progress, not finished. I've offered my help there to improve it, maybe we can use some of your ideas, too?

all the best,
Simon

Ondrej Stanek

unread,
Apr 28, 2018, 3:27:14 AM4/28/18
to TiddlyWikiDev
Hi Simon, 

thanks for the link,  it is great to see someone is already working on this problem and takes it really seriously as I feel that some kind of fusion of notebook and srs like Anki is needed and could not find it anywhere.

I will definitely study AnWiki to learn more about the concepts behind development in TW.

What I am currently trying to do is simple bucket like SRS, something you use if you have paper cards and move the cards across buckets as you learn it. The idea is just to add srs tag and do not worry about anything else (as a task in task manager example) so I can reuse and learn from my old cards.

Best, Ondrej.

Diego Mesa

unread,
Jun 6, 2018, 9:39:57 PM6/6/18
to TiddlyWikiDev
Hey Ondrej,

As Simon said we'd love to have your feedback and ideas to improve anwiki! 
Reply all
Reply to author
Forward
0 new messages