27 3
Sign in to rate

Media Import

<10kB. Updated 2018-07-14. Supports both Anki 2.0.x and 2.1.x.

Description

Import media files as new notes. This add-on will allow you to import media files into your Anki collection and use their file names as a component of the note. You can create cards that might look like this (using apple.jpg): When the add-on is installed, a Media Import... option will be added to the Tools menu. Selecting this menu item will open the Media Import window. From this window, you are able to: - Browse and select which folder to use as the source of media files - Choose which note type to use for the imported notes - Decide what content to put into each of the fields Here is a list of the content available to insert into fields. We will use an example file named apple.jpg. - Media - The media file itself (image or audio will appear on the card) - File Name - The name of the file without the extension (apple) - File Name (full) - The name of the file including the extention (apple.jpg) - Extension - Only the extension of the file (jpg) - Sequence - A number indicating the order in which the file was imported. If 15 files were imported, each file will contain a value starting from 0 to 14. All new notes are added to a deck named MediaImport. This deck is created for you automatically if it doesn't exist. If you would like to report an issue or offer contributions, please see the add-on's github page. Current version: 2.5 Changed in 2.5: - Anki 2.1 support (2.0.x will no longer be supported) - Fixed various cases that could generate empty/incorrect decks - Allow mapping to tags Changes in 2.1: - Fixed bug where no cards are generated if you don't select a note type (and use the default). Changes in 2.1: - Fixed bug where you couldn't use a non-ascii path Changes in 2.0: - Added user interface to allow selection of note type and field mapping Changes in 1.3: - Improved error handling if no cards generated Changes in 1.2: - Fixed several issues with non-English file names on Windows Changes in 1.1: - Fixed unicode conversion error (thanks to commenter below)

Download

As add-ons are programs downloaded from the internet, they are potentially malicious. You should only download add-ons you trust.

To download this add-on, please copy and paste the following code into the desktop program:

1531997860

If you were linked to this page from the internet, please open Anki on your computer, go to the Tools menu and then Add-ons>Browse & Install to paste in the code.

Other Anki 2.0.x Add-Ons Other Anki 2.1.x Add-Ons Ask a Question

Reviews

on 1540483343
Ok
on 1535799088
This add-on fulfills my requirements exactly!
on 1531339230
very useful! Thanks a lot for your work!
I'm looking forward to the version for Anki 2.1
on 1522886400
Perfect for what I needed!
on 1521504000
exactly what i needed
on 1505347200
Pretty Well but

I really liked the add-on but I still don't know if I can create more than one deck with different images. Anyone knows how to do it?
on 1503964800
Great idea, however, it doesn't work :(

When I import media and then try to view the flashcard, a bluebox with a question mark in it displays instead of the image. Pretty confident I'm not doing anything wrong, I think it's just a big with the addon.
on 1485043200
Great addition to Anki

Thanks for writing this add-on. It has been very useful for adding lecture slides to my notes.
on 1479772800
Created Duplicates

I love this feature, if it weren't for the fact that it creates duplicates every time! I have two of the same card every time I import and they both get deleted if I try to delete one of them
on 1475107200
nice feature, but lacks one point

this is nice, indeed. But it lacks the same point as anki itself for media import. It does not rename the imported files. This might get troublesome, if you have asian (etc) sign inside your filenames, as that might mess up your anki-sync.
on 1407369600
Awesome App

Very useful and time saving for me. The only Issue I face is that I cannot change the card type after it has been imported. It would be nice if I could change the individual card types according to my needs. Please make it possible. Thanks in advance
on 1405123200
same problem

I have the same problem when selecting the folder with the pictures:

Traceback (most recent call last):
File "C:\Users\manuel\Documents\Anki\addons\Media_Import.py", line 65, in doMediaImport
note['Front'] = exp
File "C:\cygwin\home\dae\win\build\pyi.win32\anki\outPYZ1.pyz/anki.notes", line 101, in __setitem__
File "C:\cygwin\home\dae\win\build\pyi.win32\anki\outPYZ1.pyz/anki.notes", line 95, in _fieldOrd
KeyError: 'Front'

I'm using Windows 7. What is this cygwin by the way. Could I solve the problem by installing it?

Thanks a lot.
on 1403913600
Useful if it worked

I always get this error:

Traceback (most recent call last):
File "C:\Users\user\Documents\Anki\addons\Media_Import.py", line 65, in doMediaImport
note['Front'] = exp
File "C:\cygwin\home\dae\win\build\pyi.win32\anki\outPYZ1.pyz/anki.notes", line 101, in __setitem__
File "C:\cygwin\home\dae\win\build\pyi.win32\anki\outPYZ1.pyz/anki.notes", line 95, in _fieldOrd
KeyError: 'Front'



Btw.: C:\cygwin\home doesn't exist on my computer...
on 1399939200
Problems with character encoding

Thanks for creating this useful addon! I've encountered a bug: It won't work if the filenames contain special characters (like "ó" or "á"), it doesn't import anything. I'm on Windows 7, with the most recent version of Anki (2.0.26)

"UnicodeDecodeError: 'utf8' codec can't decode byte 0xe1 in position 7: invalid continuation byte"

after i've changed all the "special" characters, it worked fine!