Skip to main content

No project description provided

Project description

AnkiPokerMaster

Python tool to generate one or multiple Anki decks for memorizing Texas Hold'em Poker preflop ranges.

Anki is a powerful tool to learn and memorize useful information. It is available for Windows, Linux, macOS, Android and iOS. Official website and inspiring examples of the power of Anki.

You can read some more about Poker preflop ranges here and here.

Usage

Write a YAML file to define all scenarios (situations) you want to memorize, for example "Opening as Button in a 100BB Cash game". AnkiPokerMaster will generate Anki decks based solely on this scenario.yml file and you will get Anki cards like the screenshots below.

- game: "Cash 100BB 6P"
  position: "LJ"
  scenario: "Opening"
  ranges:
    Raise: "A2s+, K5s+, Q9s+, JTs, T9s, ATo+, KJo+, QJo+, 77+"
  source: pokertrainer.se

See a more complex example here: example_scenarios.yml

Execute anki-poker-master --help to see usage information.

Ranges

Some examples for how ranges can be specified:

  • 77+ (All pairs 77 and up i.e. 77, 88, 99, ...)
  • 77- (All pairs 77 and below i.e. 77, 66, 55, ...)
  • A2s+ (A2 suited and up excluding pairs i.e. A2s, A3s, A4s, ...)
  • KT+ (KT and up both suited and offsuit excluding pairs i.e. KTs, KJs, KQs, KTo, KJo and KQo)
  • 23s (A specific hand i.e. 23s)
  • 95s-98s (Hands between i.e. 95s, 96s, 97s and 98s)
  • Combining any of the above separated by commas

Screenshots

When opening as the small blind, how should you play King Three offsuit?

Answer:

When opening as Lojack, how should you play Jack and another suited card?

Answer:

What table position does the following range table correspond to? (this question is a memorization aid)

Answer:

Fill in the blank cells in this range table.

Note that here it's possible to mark cells using the mouse or finger (touchscreen) as a memory aid before flipping to the answer side.

Answer:

Of course also with dark mode: How should you open with QQ as Hijack?

Answer:

Develop

Check the repository on GitHub: https://github.com/omarkohl/anki-poker-master

poetry install
poetry run anki-poker-master
# poetry shell

Tests

poetry run pytest

Most of the tests generate output that is compared with golden files (i.e. files containing the expected output). This has the big advantage that you can look at these files easily to see what the functions actually generate. Looking at the HTML files in a browser gives you the full experience.

If you modify the code instead of having to manually fix all golden files you can run the following command to overwrite them all. Obviously you should only do this if you understand what you are changing.

poetry run pytest --update-golden

Occasionally you should delete all golden files and re-generate them to make sure there are no orphaned files lying around because a test was renamed or deleted:

rm -rf tests/golden
poetry run pytest --update-golden

Manual tests

Currently some tests are not automated because they would require programatically evaluating Anki decks. For now doing it manually is simpler. The tests will interactively guide you.

APM_MANUAL_TESTS=true poetry run pytest tests/test_manual.py -s

Support

Raise any issues on GitHub.

License

Unless otherwise specified, the code is under the MIT license and the card images are published under LGPL 3.0 (see below for original source of the card images).

Credits

Playing Cards

Slightly modified (see list of changes in playing-cards.svg) from original source:

Vector Playing Cards 3.2
https://totalnonsense.com/open-source-vector-playing-cards/
Copyright 2011,2021 – Chris Aguilar – conjurenation@gmail.com
Licensed under: LGPL 3.0 - https://www.gnu.org/licenses/lgpl-3.0.html

Inspiration

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

anki_poker_master-0.2.0.tar.gz (1.3 MB view details)

Uploaded Source

Built Distribution

anki_poker_master-0.2.0-py3-none-any.whl (1.3 MB view details)

Uploaded Python 3

File details

Details for the file anki_poker_master-0.2.0.tar.gz.

File metadata

  • Download URL: anki_poker_master-0.2.0.tar.gz
  • Upload date:
  • Size: 1.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.8.10 Linux/5.4.0-172-generic

File hashes

Hashes for anki_poker_master-0.2.0.tar.gz
Algorithm Hash digest
SHA256 a3e08c8148a349bd25824e6accd885b74c121053b6fbbef3f64dc936d68666ee
MD5 6ecfc9f464d772891e8a1a033b6c31e1
BLAKE2b-256 a4ade94f18d929283e72b73123e616074288d32a1545d1181b74c068f3ddf137

See more details on using hashes here.

File details

Details for the file anki_poker_master-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: anki_poker_master-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 1.3 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.8.10 Linux/5.4.0-172-generic

File hashes

Hashes for anki_poker_master-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5c4a0828142d484ee17ac283955e920857f3c3c1609b09d9990baa43f11d056a
MD5 96e4c10c43c531cc2202941b49945c96
BLAKE2b-256 260cdb81aca03617061a5b245b8bd7dd5ed395275751c432ad06f34029102f40

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page