It’s almost Spring! So doesn’t it feel like time for a refresh? A change is as good as a rest, and if that doesn’t go for our Anki decks too, I don’t know what does.
The thing with well-used tools is that, over time, the lose their sheen. Imperfections creep in, annoying niggles that we ignore for the time being. A note type out of place. An image not showing now and again. It may not interrupt our learning terribly, but after a while they can start to grate.
That’s why it’s a great idea to lay aside some time every few months to clean up your Anki decks. If you are also a stickler for order, you will understand this declutter itch!
So what is the order of ceremonies for our Anki freshen-up blast? Our tidying spree here will focus on three areas:
- Bringing card images into the Anki file rather than external links
- Cleaning up unwanted media (without deleting your card images)
- Identifying and eliminating rogue note types
Before we start, remember to exercise caution when tinkering around in Anki’s underbelly. Preferably, make a full backup via the Export feature before you start. Better safe than sorry!
1. All-inclusive media
If you know a bit of HTML, it’s easy to spruce up your cards with colour and images. When I customise Anki cards, I often use flags, for instance. For the visual polyglot learner in you, flags can really help keep multiple languages separate in memory.
Now, for speed and ease, I often just search for a flag image online and use the URL directly in the card, like this:
<img src="https://upload.wikimedia.org/wikipedia/en/thumb/0/03/Flag_of_Italy.svg/1500px-Flag_of_Italy.svg.png" width="50" height="40" style="margin-bottom: 20px; border: 2px solid black" />
The problem here is not only that the code looks bloated and long-winded. More seriously, when using the decks without internet, the flags are simply absent, since they are downloaded every time.
Bring them home
The trick is to download and place your images inside Anki so they ‘live’ inside your data. Anki has a media folder just for this. Usually, the program places items there automatically when you add sound or images to a card, for example. But you can place them there yourself, too, and refer to them in your card code.
To open the media folder, open your Anki Preferences. Then, select the Backups tab. You should see a link titled Open backup folder – click it.
Now, the folder it opens isn’t the one we want. We need to go up one directory level, then into the folder called collection.media. This is where your Anki account keeps all of its MP3, PNG and similar files. With this folder open, it’s a good idea to close the Anki program in the background while we work.
Download and add the flag images and otherwise to this folder. You might want to resize them first. And, if you have lots of them, use a file naming system that keeps things tidy. For example, I prefix flag image files with fl_.
Close the folder once you are done, then reopen Anki. Head to the browser, select a card for customising, and you are set to use simply the file name on its own to link the image:
<img src="flag_it.png" width="50" height="40" style="margin-bottom: 20px; border: 2px solid black" />
Isn’t that so much better?
One note: you can nest files in subfolders and refer to them in your code, like flags/flag_it.png. However, while the desktop app recognises these paths, it seems that the iPhone app doesn’t. As with all these things, it’s worth playing around to see what you can and can’t do (while taking copious backups along the way, of course).
2. Media hangover
While we hang around in Anki’s media emporium, we may as well take the opportunity to keep on cleaning!
For a long time, I wondered why my Anki syncs were so large. It turned out that the media from old, since removed, shared decks were still hanging around. Inexplicably, deleting the deck hadn’t deleted the associated media. Carefully checking and deleting that wodge of unwanted files took multiple megabytes off my sync.
Of course, Anki has a tool for this already, in Tools > Check Media. In theory, it lists unused / unliked media for deletion. But sometimes a hands-on approach is just a bit more reliable. For one thing, your card images, like the flags above, will be listed as unused. They are not attached to cards, but rather your card templates, meaning they fall through Anki’s net. We don’t want the program to delete those!
3. Rogue note types, begone!
Similarly, as with the media clutter, I’d accumulated some note types that meant nothing to me over prolonged use. Some of them seemed to be versions of standard cards but with odd suffixes, like Basic and Reversed Card-accfe. This seems to happen when cards are imported from shared decks, and there is some conflict with existing card types.
Fortunately, it is an easy problem to fix. Head to Tools > Manage Note Types on the home screen of the desktop app. Then, hit Add to create a new note type based on the same template as the strangely named notes.
After the new note type is ready, you can head to the Browse section of Anki. In the left-hand list, you should find an entry for the rogue note type. Click it to view cards assigned to that type, and highlight the notes you want to correct. Then go to Edit > Change Note Type, and change the selected cards to the new, corrected note type you set up above.
After you have done this to all the cards assigned to the strangely-named rogue types, you can go back to Tools > Manage Note Types on the main screen and delete them. Check that it reads 0 notes next to the type before you do – if not, you still need to change the type of some cards unless you no longer want to keep them.
As you get used to the internal machinery of the Anki app, you can do a regular sweep to keep on top of these foibles. It’s quite satisfying – a little akin to doing regular weeding to keep your garden in order – and will increase that sense of ownership you have over your vocabulary.
So roll up your sleeves, make plentiful backups, and get to Spring cleaning! Your Anki decks will positively shine for it.