TRMNL Anki is an Anki add-on / TRMNL plugin combination that allows a TRMNL to display your Anki flashcards. It supports multiple instances and mashups. It requires a TRMNL with developer edition.
This is the add-on that is added to Anki. It scans the Anki notes at a recurring interval, gets the relevant field data for a single note, compresses it, and sends it to the TRMNL server via a webhook. It does not support images or (of course) audio.
Configuration is as follows. You do not need to restart Anki for changes to take effect (unless the config change crashed the add-on, which means the thing that watches the config change also crashed).
This is the rate in seconds that the add-on will fetch and send data to the TRMNL server. It does not affect how often the TRMNL device refreshes its screen. It has a hard-coded minimum of 300 seconds to avoid rate limiting from TRMNL's server. To help aid initial setup, you can force the add-on to refresh in the Anki menu under Tools > Refresh TRMNL
(This can still be affected by the rate limiting).
An array of configuration for TRMNL Anki plugins.
Set to false
to stop the plugin from sending data.
An array of case-sensitive strings that are Anki note fields. If a note has one of these fields, it will be sent to the TRMNL server to be displayed. Data is sent in the order that the fields are listed. This means you should order the fields in the priority they should be displayed.
The webhook link for the TRMNL plugin. Found on the TRMNL website.
The query that will be executed to find notes. This takes the same syntax as the Anki Browser. Double quotes must be escaped.
Example:
"search_query": "(is:new OR is:learn OR is:review) \"note:Cantonese Basic\""
{
"plugins": [
{
"search_query": "(is:new OR is:learn OR is:review) \"note:Japanese Sentence Mine\"",
"visible_fields": [
"Word",
"Meaning",
"Sentence"
],
"webhook": "https://usetrmnl.com/api/custom_plugins/replace-this-1"
},
{
"search_query": "nid:1741914054864",
"visible_fields": [
"Word",
"Meaning",
"Sentence"
],
"webhook": "https://usetrmnl.com/api/custom_plugins/replace-this-2"
},
{
"search_query": "\"note:AnkiJazz - Theory\"",
"visible_fields": [
"Front",
"Back"
],
"webhook": "https://usetrmnl.com/api/custom_plugins/replace-this-3"
}
],
"refresh_rate": "300"
}
This is the plugin that is used by TRMNL. It retries the compressed data, decompresses it, and displays each field in the order it was received. HTML from fields are rendered as-is.