Tiddly Wiki Spaced Repetition Plugin

682 views
Skip to first unread message

James Anderson

unread,
May 24, 2021, 6:06:15 PM5/24/21
to TiddlyWiki
This is my, first pass, attempt at providing a very basic Anki/Super Memo like functionality in Tiddlywiki. From a quick search It seems a few people have had similar ideas recently :)


Setup is pretty simple. Tag a tiddler with "$:/tags/twsr" and any other tags that match subjects you want to study. That tiddler will then show a interface for you to be able to review/add/grade "cards" that match the tags you have supplied.

In the example linked to above, i've tagged the example tiddler with 一画, 二画, 三画, 四画 & 五画 (1 stroke, 2 strokes, ...5 strokes in english) so any Japanese characters  matching these number of stokes are possible candidates for revision in this tiddler. They will not be added however unless you click the cog icon and select +1,+5,+10 which will  the selected number of cards to the scheduler.

lastly, you can add a <$question>...</$question> segment to a tiddler which will be hidden when viewing the tiddler normally, but when appearing in a scheduled card within a twsr tiddler will be shown instead of the main contents. When the user clicks "show answer" the main contents will be displayed. If there is no question segment the main contents will be displayed by default.


無題.png


Thanks!
James

James Anderson

unread,
May 24, 2021, 6:19:17 PM5/24/21
to TiddlyWiki
Also Thanks to  Saq for all the help answering my questions :)

unread,
May 26, 2021, 3:10:05 AM5/26/21
to TiddlyWiki
Hi James,

As a user, it's great seeing so much interest in this space.

Are you aware that Soren has done a lot of work integrating SRS with TiddlyWiki? Tiddly Remember at [[https://sobjornstad.github.io/TiddlyRemember/]] allows writing Anki notes within a TW, "providing an excellent way of seamlessly producing relevant notes to memorize via Anki while also providing context/traceability". You can also find a full-blown SRS solution in his Grok Tiddlywiki at [[https://groktiddlywiki.com/]].

Regards,


James Anderson

unread,
May 26, 2021, 4:56:31 AM5/26/21
to TiddlyWiki
Was aware of TiddlyRemember before I started, I was looking for something standalone within TW though. 

I saw the takeaway system in GrokTW once i had finished, which is really nice (as is Grok in general). 
I guess this is a different attempt at something similar. In my admittedly very basic plugin the tiddlers themselves are the revision cards / or contain the question in addition to the actual content, where as in GrokTW they exist separately to the tiddler they concern.

Thanks,
James

Soren Bjornstad

unread,
May 26, 2021, 5:54:49 PM5/26/21
to TiddlyWiki
The cool thing about TiddlyRemember (IMHO) is that it supports storing your questions however you want – as cards, within other tiddlers, or some other way. You just have to make sure you somewhere call the remember* macros with appropriate parameters. The $question widget is cool, though; there is not a super easy way to hide the questions in TR if that's what you want to do. (I did come up with this hack for someone, which demonstrates the flexibility of the macro approach but isn't super elegant!)

I'm all for getting different approaches out there so we can learn from each other.

James Anderson

unread,
May 30, 2021, 4:36:05 PM5/30/21
to TiddlyWiki
> I'm all for getting different approaches out there so we can learn from each other.
agreed :)

I've updated this plugin, you can now configure pretty much everyting and have mutiple config files and interfaces per deck/tag

Example here: http://welford.github.io/kanji.html , which adds a second config for studying using the config tag "kanji study" which has customised labels, adding brackets (1,2,3 instead of 1,5,10) and grading translations :) you could also add more than 3 grades per answer if you like.

無題.png



Thanks,
James

Saq Imtiaz

unread,
May 30, 2021, 5:01:44 PM5/30/21
to TiddlyWiki
Cool stuff, neat to see this coming along nicely.

Mohammad Rahmani

unread,
May 30, 2021, 11:38:07 PM5/30/21
to tiddl...@googlegroups.com
Hi James
Very nice and thank you for improving!

Some small suggestions on UI mainly
1. On mouse hover on gear button use the pointer shape for cursor! Now it behaves like input textbox
2. Good to organize the small tutorial, so a newbie like me can understand how to create SR step by stp


Other comments:
Is it possible to have a data tiddler or JSON act as a source of Q/A? Of course having this as an extra!
For example for language learning word: definition can be simply stored in data tiddler!



Best wishes
Mohammad


--
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 view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/59f7f91d-9cf4-45d8-91ff-9e98a91fcd7an%40googlegroups.com.

James Anderson

unread,
May 31, 2021, 3:53:05 AM5/31/21
to TiddlyWiki
Hi Mohammad,

I will fix the mouse cursor issue.

> Is it possible to have a data tiddler or JSON act as a source of Q/A? Of course having this as an extra!

I'm not quite sure what you mean. In the kanji example ( http://welford.github.io/kanji.html ) the input from the SRS is other tiddlers tagged with specific tags. 

It's explained with more detail in the example, but the basic idea is that you tag a single tiddler with $:/tags/twsr to mark it as containing the SRS UI for revision. You can then add additional tags to that tiddler for subjects you wish to study. In this case it's Japanese characters with 1 to 5 strokes (which is a pool of 113 tiddlers to be used as flash cards)

> For example for language learning word: definition can be simply stored in data tiddler!

Unless i am misunderstanding, this is what the Kanji example achieves.

(1 ) below is the scheduled card, because i am using he <$question> section only the character i wish to learn is displayed.
(2) Is the display when i click show answer, which should just show the original tiddler as it is.
(3) is the original tiddler shown normally. It's tagged with 二画 which gets it picked up the SRS scheduling tiddlers. 

 無題.png

Which tags you use however is completely up to you, you could have "french definitive article" tags and do something like this in your tiddlers

```
<$question>?? chien et ?? chat s’entendent bien.</$question>
Le chien et le chat s’entendent bien.
```

1無題.png

Does that cover what you mean?

thanks,
James




James Anderson

unread,
May 31, 2021, 4:02:58 AM5/31/21
to TiddlyWiki
Just a thought but it might be a good idea to have a <$answer> tag in addition to question. that gets replaced with ??? or blacked out when displayed as a scheduled card.

e.g.

```
<$answer>Le</$answer> chien et <$answer>le</$answer> chat s’entendent bien.
```

Mohammad Rahmani

unread,
May 31, 2021, 4:35:39 PM5/31/21
to tiddl...@googlegroups.com


On Mon, May 31, 2021 at 12:23 PM James Anderson <james.w....@gmail.com> wrote:
Hi Mohammad,

Hi James

Many thanks for your detailed explanation!
Yes, Now I know how it works! Very flexible design!
Thank you again!

Best wishes
Mohammad

 

James Anderson

unread,
May 31, 2021, 4:56:36 PM5/31/21
to TiddlyWiki
No worries, i've fixed the ⚙ pointer problem.

I've also added an <$answer> widget that obscures segments of the tiddler, that you can view by clicking on them. the second card in this gif:

Mohammad Rahmani

unread,
May 31, 2021, 5:54:34 PM5/31/21
to tiddl...@googlegroups.com
Very nice! I love the <$answer> to show the answer gradually!
One can use it on a presentation (like a lecture in the class and show students parts gradually)

Lovely! Thank you



Best wishes
Mohammad


James Anderson

unread,
Jun 5, 2021, 2:30:23 PM6/5/21
to TiddlyWiki
Another small update (probably last one for a while), moved the example here http://welford.github.io/twsr.html

- Allow nested answers.
- cleaned up some of the config names
- fixed: ignore tags did not work with already scheduled tiddlers
- fixed: answers did not mask tables.

Animation.gif

James Anderson

unread,
Jun 14, 2021, 4:24:45 PM6/14/21
to TiddlyWiki
http://welford.github.io/twsr.html

Got some bug reports on the scheduler, it was broken after reviewing the same card a few times. should be fixed now.

Based on what Mohammad said above, I've added the ability to enable the "answer" widget outside of the scheduler, which is enabled with $:/tags/twsr/hide tag:

Reply all
Reply to author
Forward
0 new messages