Mapping TiddlyRemember takeaways to specific Anki subdecks

I’m both a new user to both TiddlyWiki and Anki, and not a programmer; thanks for being patient with me while I try to be as clear as my understanding allows. If I’ve posted to the wrong forum or topic, please give guidance as to where I should post.

Objective: Have TiddlyRemember takeaways map to specific subdecks in Anki.

Vision: I would like to make one takeaway per tiddler. I intend to have a master list of takeaways to export to Anki from into a single giant tiddler, as demonstrated by the “Takeaway Export List” tiddler in “Grok Tiddly Wiki” by Soren Bjornstad at Grok TiddlyWiki — Build a deep, lasting understanding of TiddlyWiki. I hope to soon have several thousand takeaway tiddlers, and would like to give an instruction as I create the takeaway which will make the takeaways sort themselves into subdecks in Anki automatically.

So, let’s say I’m studying a book, and I want to make some takeaways from my notes in TiddlyWiki. I create a tiddler that houses a single takeaway. I transclude that takeaway into my main note tiddler for the chapter I’m studying, so I have context, and it’s displayed the way I’d prefer. The takeaway appears by automagic in the takeaway export list (haven’t figured this out yet, but “Grok TiddlyWiki” seems to do it somehow.) I sync with Anki. The takeaway appears in Anki deck “Deck::Book Name::Chapter #” Of course, there would be more subdecks by book names and chapters as I work through the book.

So far: I have managed to install and run the Node.js (just barely, I truly do not understand it beyond it being part of the mystical ritual that makes this thing somehow work.) I have dragged and dropped the TiddlyRemember plugin to my wiki, and it is syncing to my Anki to the default deck as expected. Anki seems to be working as expected as well.

I tried very hard to understand the instructions given in the “Mapping Tiddlers” section of the documentation here: TiddlyRemember — Embed Anki notes in your TiddlyWiki but I very severely do not get it. My usual strategy is to find a working example of what I’m trying to do, and copy it with minor modifications to make it work, but I can’t find an example to copy. The one example given is too complex for me. I have also tried to examine “Grok TiddlyWiki,” and while it was helpful, I couldn’t find examples of what I wanted to do there, either. Over the last two weeks I’ve put in a crazy amount of time to get this to work, and searching for hints, but nothing relevant has come up.

TL;DR: Does anyone have or is willing to share a simplified description of how to map a TiddlyRemember takeaway to a specific subdeck in Anki, within that takeaway? The documentation is too hard for me to understand.

Platform information:
OS: Windows 10 Pro
Browser: Chrome 94.0.4606.61 (Official Build) (64-bit)
TiddlyWiki: 5.1.23 on Node.js
Anki: 2.1.46

I wouldn’t expect subdecks to be supported yet as there’s nothing about that in the plugin’s documentation. TiddlyRemember feels very mature but is actually very young, and doesn’t (yet?) support all of Anki’s functionalities.

On a sidenote, it is also my opinion that the Mapping Tiddlers tiddler would gain from having more examples to copy and adapt. Here’s the very basic mapping I use to send all my takeaways to a single deck called PIM: [has[text]then[PIM]]. I think I’d be more than ready to graduate to multiple decks… and subdecks if/once they are supported so I’ll be following this thread closely :slight_smile:

This is great, though it would be a good idea to ping me with @sobjornstad in the future, in case I don’t happen to spot the post.

In TiddlyRemember, takeaways are called notes throughout the documentation, so I’ll use that to avoid confusion (takeaway is a term specific to the TakeAway mnemonic medium plugin).

Just to be clear, you mean you want to make one tiddler for each note, containing just the contents of that note, right? Just like //Grok TiddlyWiki// does? (I could imagine a situation where you had a tiddler containing a bunch of information with one call to rememberq or whatever – e.g., this one, and that might require a different approach.)

I don’t believe this is currently possible because the decks and tags mappings are evaluated once for each tiddler that’s parsed, and you’d be parsing only one tiddler (Takeaway Export List). So there’s no way to make different notes go to different decks. You could certainly make a separate export list for each book and chapter.

I will look into making it possible to pass in the deck and tags as parameters to the remember* macros, which would make this easy and could be useful in other situations as well.

Subdecks in Anki aren’t any different than top-level decks except that they have :: in their name, so there’s no issue here.

I agree, but it’s not easy for me to come up with a bunch because I only know my own workflow. :slight_smile: I can add yours in as an example (though note you can just leave it blank and use the “default deck” setting in Anki unless you have more than one wiki and want each wiki to go to a different deck).

I’m curious what you think is missing. Custom note types, media, and LaTeX are the big things I can think of. (LaTeX is already implemented but not released yet.) I’m doing a bunch of work on TR right now, so if there’s something that you think is missing and isn’t too hard, I might be able to add it in the next week or two!

1 Like

Thanks a lot @sobjornstad!

Good to know!

Don’t mistake me: you’ve done an outstanding job throughout GrokTiddlyWiki and most of your documentation. I’m generally impressed by how prescient you are of my assumptions for a start, despite operating on another plane of existence in terms of technical abilities. Mapping Tiddlers is one of the rare cases where your documentation had given me the wrong impression and mapping was actually much easier than I expected. That being said, I’ll make sure to share anything I’ll come up with that may provide any value to other users. As you say, workflows are highly idiosyncratic… Here’s a simple example for illustration purposes that matches the way I’m currently organizing my various Anki decks:

[tag[JavaScript]then[Coding::Javascript]] [tag[CSS]then[Coding::CSS]]

Custom note types is the big one for me. You certainly know more about this than I do, but I am under the impression that the two core groups of Anki users are medical students and language learners, and I’m certain that both audiences would benefit a lot from also using TiddlyWiki in their workflows. I’m in the latter camp, and though you’ve single-handedly made Anki work for me for non-language related notes, to get TiddlyRemember to be useful for language learning, custom notes are truly a base requirement.

Some sort of compatibility with Awesome TTS or custom media fields would be icing on the cake. Actual two-sync would probably be very demanding on your end, as well as being overkill from a user’s perspective, but having the possibility of deactivating automatic overwrites during sync for custom-labelled notes could offer a way of unidirectionally syncing new notes from TiddlyWiki to Anki, yet keep them in their new modified state once sound (or other media) is added directly on Anki.

1 Like

So, this discussion has been a huge help. I fixed my problem and did a write-up on how it was fixed (with four helpful images illustrating the fix) so anyone looking at this discussion later could use the conversation for guidance. However, when I tried to post it, I get the warning “Sorry, new users can only put one embedded media item in a post.” I’m not wild about just saying “thank I fixed it” and flouncing off, leaving later readers in the lurch. Is there any way my cap can be raised to four images so I can put in the more complete write-up of the solution?

I flagged your post for attention by the mods and explained the problem. Hopefully someone will come by and fix you up soon.

1 Like

Thank you for your help above!

Many thanks to @sobjornstad and @SonephetR2! I think I have a solution now. Here’s what I did.

I modified my workflow by removing the expectation of having a master tiddler with all the notes (not takeaways, wrong word.) Instead, I’ve decided to put the notes in tiddlers that match the chapter I’m studying, then have the plugin move the notes to a matching deck in Anki.

Special thanks to @SonephetR2 for the code snippet

[tag[CSS]then[Coding::CSS]]

This completely cleared up my understanding. I thought the “then” shown in the plugin documentation was some sort of… thingy… in TiddlyWiki, as a tag or field is a thing in TiddlyWiki. I didn’t understand that it means “take everything with the tag CSS, then put it in the Anki deck ‘Code::CSS.’”

I’ve attached images of what I did below to be helpful to any future readers who have the same challenge.

Relevant tiddlers:

The first tiddler is a sample of my chapter notes, with a cloze deletion item to me synced with Anki.

The second tiddler is the DeckMapping tiddler, which instructs the plugin to find all tiddlers with the tag “working” and then map them to the Anki Deck “Book 1”, subdeck “Chapter 1.”

Here is the result in Anki after syncing from TiddlyWiki:

Capture2

Next, because I can’t leave well enough alone, and I don’t like tags very much, I decided to use fields instead. I created the field “anki” and then added an instruction in the DeckMapping tiddler to put notes in tiddlers with the value “book1c2” into the Anki deck “Book 1,” subdeck “Chapter 2.” It works as expected, moving my sample cloze deletion note to a new subdeck.

Followed by a sync to Anki:

Capture4

The card appears in the chapter 2 subdeck as expected.

Also, my vote for new features for TiddlyRemember is audio, math support, maybe note-specific deck mapping (I guess I don’t need it now for my workflow, but I can imagine someone else will.) Thanks again to @sobjornstad for TiddlyRemember and Grok TiddlyWiki, both projects have been a huge help.

1 Like

Can you elaborate on how exactly you’d use audio with TiddlyRemember? I just implemented media syncing today, but I’m not sure if it’s going to be convenient to add audio on the TiddlyWiki end, so wondering if there’s anything I can sensibly do to make that work better. I barely ever use audio, so I’m not a good person to be trying to implement that workflow without more design information!

Happy to elaborate. I would like to (someday) make spelling cards that are like a spelling bee. The front of the card would be audio of the word and its use in an example sentence. I would then have to spell out the word by recitation or writing it out. The back would be the spelling of the word, to verify my spelling. I intend to use it for foreign language learning and some tougher-to-spell English words.

I value using TiddlyRemember for it (instead of just Anki) because I can give the notes context, organize them, and curate them in TW, but zap them over to Anki for convenient practice on my phone. That being said, I haven’t even figured out how to get audio into TW in an organized way yet, so… it might be a while until I get this figured out. Considering the struggles I’m having with video, I don’t expect to get audio figured out any time soon.

1 Like