LUTE to Anki importer
Anki Add-on to import terms from LUTE to Anki This is still work in progress and by no means the best or most efficient way to code this. It currently supports creating simple cards with two fields:
Front: Term from LUTE Back: Translation from LUTE. Last updates
2025-18-01
Improved visuals for the GUI Added auto import: Ideal to use if you are learning only one language and with same settings import new terms to the same deck every time Some minor improvements to how used configuration is being updated through GUI Filtering out terms with Status 0 Unknown and fixed new line not displaying correctly in Anki (thanks Liozur) 2025-19-01: Bug fix for loading/saving selected language in GUI
2025-12-01
Filtering terms on start when loading them from lute.db instead of later during card creation. Added filters applied to the SQL query for selecting only parent terms and for allowing creation of cards with empty translation. Better handling and informing user about loading 0 terms from Lute How to Use
Select the lute.db file Click the Select lute.db file to import button the first time you use the add-on. This will open a dialog where you can navigate to and select your lute.db file. Tip: You can find the path to your lute.db file in LUTE under About → Version and software info → Data path.
Choose import filters
Use the checkboxes to include only parent terms, blank translations, and terms with the statuses Well known or Ignored. Decide whether you want to import tags. Select the number of previous days to import new terms from (default is 0, meaning today only; for example, 3 means everything from the past three days plus today).
Connect to lute.db After selecting your lute.db file and configuring the filters, click “Connect to lute.db” to load terms if path not set already (then it tries to connect automatically). Note: If you change any filters afterward, click Reload terms to refresh the loaded terms.
Select a card type Currently, the add-on uses the term for the Front and the translation for the Back.
Select the term language Choose the language of the terms you want to import. (This is based on the language of the text in LUTE from which the term was saved.) Note: Language options become available only after loading terms from LUTE (Step 3).
Input tags Enter any tags you want to assign to all imported cards. Separate unique tags with spaces. For example, “Add this tag” becomes three tags: “Add”, “this”, and “tag”.
Select a deck Choose the deck in which to create the new cards. The add-on automatically selects the last deck you used.
Auto Import Enable the auto-import feature to automatically sync new LUTE terms every time you open Anki.
Import to the selected deck Click Import to selected deck to create the new cards. Each card will have:
Front (First field): the term Back (Second field): the translation Depending on your filters, it’s possible that zero cards will be created.
Finish and review Close the add-on window when the import is complete. You can then review your new cards in Anki.
Configurable Settings
Parent terms only Check this option if you want to create notes only for Parent terms from LUTE.
Allowing empty translation Enable this if you wish to include terms that do not have a translation filled in LUTE.
Allowing duplicates Select this if you want to allow duplicates (creating notes even when the same Front—i.e., first field—already exists in your Anki collection).
Importing tags Turn this on if you want to import tags from LUTE.
Adjusting ease (difficulty) The add-on uses Anki’s default ease (250%) for LUTE terms with status 3. It increases or decreases the ease by 15% for higher or lower levels, and applies 300% ease to Well-known and Ignored terms.
Allow Well-known and Ignored Check this option if you have Well-known or Ignored terms (that include translations) in LUTE and want to create corresponding Anki cards.
Advanced Configuration
You can manually configure settings in Anki’s Add-ons menu:
Config File:
Edit config.json to set the lute.db path, preferred deck, and auto-import frequency. Last-used options are saved and auto-loaded for future sessions. Source code and contact GitHub repository: https://github.com/pd729/LutetoAnki Discord: HippoShaman#1138
Liên kết hỗ trợ
Reviews (1)
👍 2024-10-29
This looks great, thanks for writing it! (I wrote Lute)
One thing to be aware of: Lute stores multi-word terms with zero-width spaces between each “parsed token”. This add-on currently keeps these zero-width spaces, but you might want to remove them, or the resulting Anki cards might render with some funny parts. In python, you can get rid of them with something like raw_text.replace(“\u200B”, "").
Cheers!
Comment from author Thank you for the feedback, I have added removing the zero-width