TiddlyRemember 1.3.0 released

This large feature upgrade includes support for media syncing, math markup, setting initial scheduling parameters (so you can import from other TiddlyWiki-based spaced repetition tools if you want to switch to the Anki approach), exporting TW macro calls from Anki to a text file, customization of macro snippets, and a few other things.

Let me know if you run into any problems!

You can read the full release notes here and download the plugin / find documentation here:

TiddlyRemember — Embed Anki notes in your TiddlyWiki.

3 Likes

I just released 1.3.1 to fix a bug in the media syncing functionality if using a file wiki with embedded images, a combination which escaped my tests for some reason.

Awesome, thank you Soren!

Hi Soren, thank you for this plugin. It is because of it that I started to use Anki although I bought the mobile version years ago. :slightly_smiling_face:

I have a small question regarding version 1.3.1. I noticed that now the images are embedded in the Anki database. Why this change ?

I’m not very familiar with Anki. From my point of view I would prefer having a smaller sync traffic and keeping links in my notes (I have to have network access anyway for links to TW notes) - but maybe I’m missing something obvious.

Is there a way to embed the images as links in Anki notes after 1.3.1 instead of the actual images ?

Thank you again for your work on this.

Hi Cristi,

This is the normal/correct way to do it in Anki. If you paste or attach an image within Anki, it’s basically always pulled into the media database. It would be possible to manually add HTML within Anki to get a hotlinked image, but I’m not aware of anyone ever doing that.

Most users of TiddlyRemember should prefer this method, too, because it doesn’t require you to have network access to see the images, nor do you have to wait for large images to download before you can see the cards. If you have images embedded in your wiki or on a personal device, you might be unable to access them from your mobile device even if you have Internet access, since most people don’t expose their local filesystem to the public internet. Adding the images to the media database means that they are always available when reviewing no matter where you are.

Also, the images aren’t actually “embedded in the Anki database,” they are tracked in a separate media database (and stored as files on the device’s filesystem). Within Anki, syncing media takes place asynchronously and in the background and uses a different comparison mechanism, so once you initially get the images synced across, there is no overhead. Images will only need to be copied once, so it actually uses much less bandwidth overall, and backups of your collection are not bloated by images.

Is there a way to embed the images as links in Anki notes after 1.3.1 instead of the actual images?

No, it always downloads and syncs anything that’s referenced in an <img> tag now. If this is a deal-breaker for you, you could file an issue and I could consider an option for future releases, but I’d want to see at least another user or two who wants this – I didn’t expect anyone to see this as a downgrade!

1 Like

I didn’t know that. Glad it works this way.

Thank you for answering, Soren and for taking time to explain. I understand that there will always be people requesting small tweaks.

The plug-in is good enough as it is right now. I will consider opening an issue to allow choosing between link and embeddable image but as of right now it is extremely low priority.

Thanks again for the explanations.

I don’t know if I should start a new thread with this question.

Is there a way to run the TR Anki plugin from command line, without having to start Anki and use SHIFT-Y ?

It would be very handy when I add/commit TiddlyRemenber questions from mobile. :slight_smile:

No, Anki doesn’t have any command-line options for things like this.

It would be possible to sync outside of Anki with a little Python script, though – my test harness for TiddlyRemember creates an Anki collection object without starting the Anki UI and syncs cards into it, which is basically what you want to do, only with your real collection rather than a temporary one.

Example of a test:

The col_tuple fixture is defined as follows:

You’d just need to import the TiddlyRemember add-on as a Python package, then combine those snippets in some way to load up your real collection rather than one in a temporary directory, and find_notes() in the wiki matching a filter and sync() them.

Thank you. Don’t know too much python but I’ll give it a try.

To confirm, this would update the Anki collection locally, correct?

And there is no solution to sync the updated collection to Anki web outside Anki app.

Correct.

I don’t know for sure as I have never tried, but I would assume there is a similar solution for this that you could add to the script. As far as I know, anything in the anki library should be accessible outside of the UI provided that you have a collection object.

One solution if that doesn’t work out, albeit a dirty one, could be to launch Anki in the background (with your profile selected via the command-line option, if you have multiple), then wait a little while and automatically kill it. If you have Anki configured to sync on start, I’d think this would do the trick.

1 Like

Thank you Soren for your time. I appreciate the suggestions and will look into the anki library.

Also, really admire your expertise and contributions to TiddlyWiki. :slight_smile:

1 Like

I’ve tried to add some images to my cards. In general, it worked fine, but in one particular case I’ve received a warning.

I’ve opened an issue Warning when using embedded images in question · Issue #58 · sobjornstad/TiddlyRemember · GitHub

Is there a log that can be checked with the output of the TR plugin ?

I’ve responded to your issue on GitHub.

Thank you, I will save the images prior to add them to a TR card.

In case we are to think of a way to specify if an image should be left as URL or saved locally, how would it look like ? Would the formatting of the img tag be altered in rememberq ?

How do you think cases like this should be treated?

Adding arbitrary attributes to HTML tags is invalid except in HTML 5, which TW doesn’t use, at least not strictly – although you might be hard-pressed to find a browser that didn’t swallow it without error, so maybe it’s not that big a deal. It feels like a total hack though!

We could require a special class or wrap the image tags in a div or span with a special class, like tr-skip-sync or something. This would make the syncing code a bit more ugly, but would be totally doable with BeautifulSoup.

Adding classes or attributes to images isn’t too nice to work with in TiddlyWiki though, since it prevents you from using the wikitext syntax, but if this is only going to be used occasionally maybe it’s not that big a deal.

We could add an option to skip media syncing entirely, as we discussed earlier, but that seems like a blunt instrument when the problem is really a couple of images that don’t sync correctly.

It would be nice to have the flexibility to skip media sync at least for some (external) images, but I understand your point of this not being practical, nor widely used. Will stick with the recommended way for now.

Would such an option be specified in the Anki plugin configuration or in the TiddlyRemember plugin?

It could be either, but seems to me it would make more sense in the Anki plugin configuration, as a per-wiki setting.

The documentation says that we can apply a password for a protected file, but there is no password field that I can see.

It also says that my Anki plugin is 1.2.2 . I’m using the code for download given on both your documentation page and on the Anki add-on page. (60456529) Is there a new code for the new plugin?

Thanks!

The field was added in the Anki add-on version 1.3.0, so that’s why you aren’t seeing it. You can try clicking “Check for Updates” with TiddlyRemember selected in Tools → Add-ons. The download code does not change for new versions.

If it doesn’t find anything, you likely aren’t getting the latest version because your version of Anki is too old – try grabbing the latest from https://apps.ankiweb.net and trying the add-on update again.

I have 2.1.33, which is listed as being supported.

So I update to 2.1.48, and now it tells me that the TR plugin needs vsn <= 2.1.44.

Just by running, it apparently updated something. So I have to downgrade. Then when I run 2.1.44, the ‘About’ says 2.1.44, but the title bar says 2.1.48 ?

When I try to update TR, it says “no updates” available. There is still no password field.

I guess I could uninstall the TR plugin and see if it will install the latest after that.