Get flashcards from flashcardexchange.com

in
Type: 
Card Collection
Status: 
Incomplete
Compatibility: 
Mnemosyne 1.x +
Author: 
Adam Raizen
Source: 

Written by me.

Description: 

Simple python script to download a full set of flashcards from the site http://www.flashcardexchange.com. Simply run the script with the flashcard set number that you see in the URL of the set of cards you want. A few additional options are explained in the program's help message.

AttachmentSize
getcards.zip2.71 KB

Tweaks

So, I've tried this on a few of the flashcardexchange decks, and I quite like it - certainly it beats paying for downloads all hollow! But here're my suggestions to make it easier to use:
# Instead of requiring the deck ID number, why not let the parameter also be just a link? so one could go 'python getcards.py http://www.flashcardexchange.com/flashcards/view/341422' OR 'python getcards.py 341422'
# By default, dump to a file. I know of no way to take a dump to stdout and pipe it to Mnemosyne, so dumping to stdout by default is kind of useless. You always have to redirect to a file, either with the shell and <>, or explicitly with the -o option, no? So why not parse the page to get the deck name and just dump to ./deck-name.txt? (Perhaps with suitable substitutions of whitespace and capitalization - although 'About Philosophy Chapter 2.txt' would be perfectly cromulent).

Some info

On Windows, you have to specify the location of the Python interpreter. Check exactly where it is on your system, but the default is "C:\python25\python.exe", so put that before "getcards.py" and your other options and run it from a command prompt.

You need Python 2.5 for this. If you don't have it on your computer, download the latest version from python.org.

TOS

I made a similar script, but discovered it violated the site's terms of service, so users beware.