Skip to content

asdfjkl/pgn2anki

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pgn2anki

Convert the positions of a (chess) PGN file with opening lines into an Anki deck.

The Problem

You are building an opening repertoire but you just cannot memorize the moves.

The solution

  • You create an opening repertoire as a PGN file (e.g. with Jerry)
  • use pgn2anki to automatically convert the PGN into a CSV file
  • import this CSV into Anki
  • memorize your lines with Anki
  • PROFIT!!!

Steps

Preliminaries

  • For Anki Desktop you need to install the FEN chess visualizer first.
  • Ankidroid (Android) can already display FEN strings.

Windows

  • Download the binary package from the release page
  • unzip into a directory
  • open a DOS-Shell (cmd.exe) and change to the directory
  • run pgn2anki.exe --pgn FILENAME.pgn --depth 5 --player White. This will take the first 5 moves from root of FILENAME.pgn and extract positions whenever White is to move. You can omit the depth parameter if you want, then the whole PGN is used.
  • a file import_anki.csv is created.
  • import this file as a basic deck (front/back) into Anki (File -> Import).

Linux / OS X

Ensure you have a working installation of python 2.7 and git (default on OS X).

open command prompt. clone repo:

git clone https://github.com/asdfjkl/pgn2anki

cd pgn2anki

then

./pgn2anki --pgn FILENAME.pgn --depth 5 --player White

will take the first 5 moves from root of FILENAME.pgn and extract positions whenever White is to move.

Start Anki. Create new deck. Open deck.

File-> Import

Navigate to pgn2anki folder

Open "import_anki.csv"

FINALLY

Learn, learn, learn. And remember to not just memorize the moves, but also the strategy and concepts of the opening...

CREDITS

Niklas Fikas for python-chess

About

Convert PGN with opening repertoire to Anki deck

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages