Skip to main content

A command-line Magic: the Gathering card search

Project description

nyxfall, a command-line Magic: the Gathering card search

demo

Installation

Using pip

$ pip install nyxfall

From source (requires Python 3.12.3 or greater)

(optional) Start a virtual environment

$ python -m venv venv
$ source venv/bin/activate

Install the project with pip

$ python -m pip install .

Usage

$ nyxfall -h
usage: nyxfall [-h] [-e] [-r] [-a] [query]

positional arguments:
  query         query to run against Scryfall

options:
  -h, --help    show this help message and exit
  -e, --exact   try and match the query with an exact card name
  -r, --random  fetch a random card
  -a, --ascii   renders the card frame using only basic ASCII characters

Searching for a set of cards

If more than one card is returned from your search, use the arrow keys + enter to select which one to display

$ nyxfall llanowar

  Llanowar Elite
> Llanowar Elves
  Llanowar Empath
  Llanowar Envoy
  Llanowar Greenwidow
  Llanowar Knight
  Llanowar Loamspeaker

Page 2/4

┌──────────────────────────────────┐
│┌────────────────────────────────┐│
││Llanowar Elves               {G}││
│└┬──────────────────────────────┬┘│
│ │                              │ │
│┌┴──────────────────────────────┴┐│
││Creature — Elf Druid            ││
│└┬──────────────────────────────┬┘│
│ │{T}: Add {G}.                 │ │
│ │ ──────────────────────────── │ │
│ │The elves of the Llanowar     │ │
│ │forest have defended it for   │ │
│ │generations. It is their      │ │
│ │sacred duty to keep outside   │ │
│ │influences from corrupting    │ │
│ │their ancestral home.         │ │
│ │                       ┌─────┐│ │
│ └───────────────────────┤ 1/1 ├┘ │
│ FDN                     └─────┘  │
└──────────────────────────────────┘

Searching for an exact card

$ nyxfall -e "force of negation"

┌──────────────────────────────────┐
│┌────────────────────────────────┐│
││Force of Negation      {1}{U}{U}││
│└┬──────────────────────────────┬┘│
│ │                              │ │
│┌┴──────────────────────────────┴┐│
││Instant                         ││
│└┬──────────────────────────────┬┘│
│ │If it's not your turn, you may│ │
│ │exile a blue card from your   │ │
│ │hand rather than pay this     │ │
│ │spell's mana cost.            │ │
│ │Counter target noncreature    │ │
│ │spell. If that spell is       │ │
│ │countered this way, exile it  │ │
│ │instead of putting it into its│ │
│ │owner's graveyard.            │ │
│ │ ──────────────────────────── │ │
│ │"Try, if you must."           │ │
│ └──────────────────────────────┘ │
│ 2X2                              │
└──────────────────────────────────┘

Searching for a random card

$ nyxfall -r

┌──────────────────────────────────┐
│┌────────────────────────────────┐│
││Helpful Hunter            {1}{W}││
│└┬──────────────────────────────┬┘│
│ │                              │ │
│┌┴──────────────────────────────┴┐│
││Creature — Cat                  ││
│└┬──────────────────────────────┬┘│
│ │When this creature enters,    │ │
│ │draw a card.                  │ │
│ │ ──────────────────────────── │ │
│ │"Ah, the conquering hero      │ │
│ │returns! What trials did you  │ │
│ │face, little one?"            │ │
│ │—Basri Ket                    │ │
│ │                       ┌─────┐│ │
│ └───────────────────────┤ 1/1 ├┘ │
│ FDN                     └─────┘  │
└──────────────────────────────────┘

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

nyxfall-0.2.0.tar.gz (10.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nyxfall-0.2.0-py3-none-any.whl (8.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: nyxfall-0.2.0.tar.gz
  • Upload date:
  • Size: 10.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for nyxfall-0.2.0.tar.gz
Algorithm Hash digest
SHA256 383b9b1d5eb1a640d090350fec619025684336ed2619bc9c9cb216e49728703b
MD5 10705c0d2cd487f63df993c82b61dd7e
BLAKE2b-256 158a53cce3ab90c6ac9fad2175f6b2c2dd9be08fa65c0536a654dc95c62a9ca1

See more details on using hashes here.

Provenance

The following attestation bundles were made for nyxfall-0.2.0.tar.gz:

Publisher: python-publish.yml on avery-whitehead/nyxfall

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

  • Download URL: nyxfall-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 8.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for nyxfall-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 01b3e48b2131f2e52c3d38959dc3006e5e4025e6006764d71466ed1af6522d3d
MD5 b4347f2580d4c962bf7087590ce4069b
BLAKE2b-256 32c1f3c9dbcdec60d8fc4236d7fdbcaecf425394d5f192e9c98da84a82d33537

See more details on using hashes here.

Provenance

The following attestation bundles were made for nyxfall-0.2.0-py3-none-any.whl:

Publisher: python-publish.yml on avery-whitehead/nyxfall

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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