~jb753/wikidata2anki

Generate Anki decks using WikiData queries.
84bc216c — James Brind 2 years ago
Start on monarchs
7e9cb1e3 — James Brind 2 years ago
Fix Gladstone party
b0f6049a — James Brind 2 years ago
Update link

refs

master
browse  log 

clone

read-only
https://git.sr.ht/~jb753/wikidata2anki
read/write
git@git.sr.ht:~jb753/wikidata2anki

You can also use your local clone with git send-email.

#WikiData2Anki.py

This script queries the WikiData knowledge graph to find all persons that have held a certain political office, e.g. British Prime Minister Q14211, and generates a deck of Anki flashcards.

See this blog post for a fuller exposition.

Requirements:

pip install sparqlwrapper genanki

Usage:

python wikidata2anki.py OFFICE_ITEM_ID

For example, to generate a deck of British Prime Ministers,

python wikidata2anki.py Q14211

with a typical result,