An interactive chess template for anki.
Tutorial: https://youtu.be/NZOK1dZAvpI
- Works with PGN format
- Support for piece promotions
- Board auto orientates dpending on first move of given puzzle
- Works offline and on Ankidroid (Ankidroid verified, IOS)
- No addons required
- Analysis board on the backside
- Backside border colour to indicate mistakes
- support for multiple lines. this means you can choose multiple moves to be the correct answer, and the cards will respond with a random move (if multiple lines exist).
How to install:
- Go to the Releases page.
- In the latest release's Assets section, download "chess.apkg".
- Open Anki and make sure your devices are all synchronised.
- In the File menu, select Import.
- Browse for and select the downloaded file
chess.apkg
. - Download the Media Files.rar folder and extract. Copy the contents of the Media Files folder into you anki collection.media folder
👉 To stay informed of new releases, make sure to watch this repository's releases.
For both of the following lines changing flip=true
to flip=false
. should result in the first move of the PGN being the first move in the puzzle, as oppose to the default behaviour which is that the first moves plays automatically and you must then respond.
On BOTH front and back side:
var flip = true;
Changing the value of handicap in the following line will decide in the number of wrong moves you can make before the answer is shown. Note: Amount of wrong moves is equal to the value of handicap + 1.
var handicap = 0;
Changing the value of randomLines
will decide if variations in the PGN should be presented to you randomly or not. Note: If set to false
, it will always show the first variation.
var randomLines = true;
Changing the value of acceptVariations
will decide if side variations considered as correct or not. If those variations are accepted as correct, they will be played instead of the main variation. Note: Computer will still be able to play possible variations given in PGN file, randomLines
should be changed to stop this.
var acceptVariations = true;
I have verified compatability with Windows/Linux and Ankidroid, however cannot verify for IOS and MAC. This is a note template however, and does not rely on addons, so it should be compatable.
There are values in the styling section that can modify the board size. If the board is too big for your screen, you can try reducing the following values. Start by redcucing the height
value for both the body and iframe in the relevant section of your device: desktop, android, or iOS.
/* Styling for desktop devices */
body {
height: 100vh;
width: 100vw;
/* removes wierd overflow issues on different devices */
overflow: hidden
}
iframe {
height: 100vh;
width: 100vmin;
border: 0
}
/* Styling for android devices */
.mobile iframe {
height: 93vh;
width: min(93vh ,97vmin)
}
.mobile body {
height: 93vh;
}
/* Styling for iPad and iPhone devices */
.iphone .iframe, .ipad .iframe {
height: 85vh;
width: min(85vh ,97vmin)
}
.iphone .body, .ipad .body {
height: 85vh;
}
The upgrade process is typically the same as the installation process explained in the previous section. However, when upgrading media files, it is important to fist delete them from your media folder and then sync. this will remove the old files from the anki servers and will allow each device to sync without issues.
https://chessboardjs.com/index.html
https://github.com/ornicar/chessground
https://github.com/mliebelt/PgnViewerJS
http://gorgonian.weebly.com/pgn.html