IR Plugin for Anki 1.2.x

I've finally found some time to get started on porting my Incremental Reading plugin to the latest Anki version. I took me only a few minutes ... to realize I'm better off rewriting the whole thing from scratch . Damien was really busy with his Anki updates.

Right now, I only have a preliminary version that serves as a bare-bone IR support. It can import URLs and extract/remove sections (with undo support), but that's about it.. oh.. and it has some strange formatting bugs still.

On the bright side though the code is more concise now and should be more robust. I've replaced a lot of previously hand-written code with standard libraries. Unfortunately, this means I have to bundle the python libxml2 library with my plugin (I know, it's in the default python distribution, but not included in the Anki binaries, so folks who only have Anki still need it).

I've already based the new version on an idea proposed by 'marjur' (and in turn based on supermemo's IR support) : once sections are extracted they are not removed from the original text anymore, but instead marked in green. Hence, you can easily 'look back' in your original text when required, but also know exactly which sections have already been extracted for more detailled processing.

For the next update I plan to improve upon this feature by automatically scrolling the current card to the last extracted section. As the whole text remains in the original article you may soon find yourself scrolling down several pages to find the point where you left off the last time.

PS: I still have to update the corresponding article about the plugin on this very website when I find some time (so far I just added a sentence to inform readers that it's deprecated).

For the adventurous:

If you like bleeding-edge software you can get the current plugin from here. Just extract the file into your Anki plugins folder (Settings>Plugins>Open Plugin Folder...) and (re)start Anki. Make sure to create a separate deck for your incremental reading fun. I'm pretty confident that the plugin should not mess up any other decks, but better deactivate it before opening any other decks, as I will not give any guarantees . The plugin is still under GPL3, the bundled libxml2 library is from the official Python 2.7 distribution, detailled licensing information is included in the package.

Note that this is a very early version and I have only tested it with wikipedia articles so far. Copy an article's URL to your clipboard, open your IR deck in Anki and select Tools>Add URL for Incremental Reading. That  should download the page and all images, add the images to the media library, and add the page as a new card to the deck. (I suggest to use the print-version of wikipedia articles, as they're much nicer to work with in Anki.)

And most important: Leave your feedback in the comments here. Let me know if it works at all for you, has glitches or misses a fundamental thing.

If you're familiar with PyQt, I'd also appreciate if you could take a look at the strange font style changes and the   work-around I'm using. For some reason, Qt doesn't feel like adding my green background style change, unless I also add a dummy span with that space (and remove it again later).


Frank--thank you so much for doing this! i just started playing with it.  Keep up the good work.


Best, Luke

Hi Frank,

i get an error when i'm trying to open Anki after moving the plugin-files into my plugin-directory.

It says:


p, li { white-space: pre-wrap; }
An error occurred in a plugin. Please contact the plugin author.

Please do not file a bug report with Anki.

Traceback (most recent call last):

File "ankiqt/ui/main.pyc", line 2679, in loadPlugins

File "/Users/lo/Library/Application Support/Anki/plugins/", line 33, in

File "/Users/lo/Library/Application Support/Anki/plugins/", line 1, in

ImportError: cannot import name libxml2mod

Traceback (most recent call last):

File "ankiqt/ui/main.pyc", line 2679, in loadPlugins

File "/Users/lo/Library/Application Support/Anki/plugins/", line 1, in

ImportError: cannot import name libxml2mod"



Is it a problem on my side?



Hi Lorenz, This looks like a problem with loading the libxml library. Make sure that you also moved the and the whole libxmlmods/ directory into the plugin-dir. If that isn't the cause you may try to install the libxml2 python bindings from and then copy the corresponding libxmlmods directory and file. Best regards, Frank


Update: If you're running on Linux try this.

i guess there is a problem :S

is posible to add some formating tool for editor in IR?

Sure it is possible, however, I'm currently no longer working on the plugin myself.