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-1.0.0.tar.gz (10.7 kB view details)

Uploaded Source

Built Distribution

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

nyxfall-1.0.0-py3-none-any.whl (8.5 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for nyxfall-1.0.0.tar.gz
Algorithm Hash digest
SHA256 50c005d75daef80db7491ad0ec0fc28f415d948da01109fa76ac4a769473576b
MD5 16bb2ed2f49dd4520bb9f0a344cfa07a
BLAKE2b-256 08bb4007584119db51335a614ff5b23c93b3a6697ca416fad3f9cde039c18486

See more details on using hashes here.

Provenance

The following attestation bundles were made for nyxfall-1.0.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-1.0.0-py3-none-any.whl.

File metadata

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

File hashes

Hashes for nyxfall-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c6a5a3bf73f12206ccb032e117192cd17f13cf0a02b8b7fbbcef75012ca1a16b
MD5 feae1ad3ad8ba49f52b92635ac5c4bf6
BLAKE2b-256 820a960901fb16aad40f337888b4ccc3ded1e447d04828c027c0ea9e5aa9b9bd

See more details on using hashes here.

Provenance

The following attestation bundles were made for nyxfall-1.0.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