Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Latest commit

 

History

11 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tart

tarot tellings in your terminal. a full 78-card deck shuffled with crypto/rand (real entropy, no seeds, no take-backs), voiced through customisable personas, with pixel art for every card.

two art styles, both rendered with unicode half-blocks:

  • sprite (default): 22x22 hand-drawn sprites in the sweetie-16 palette. majors are individually drawn, pip cards arrange their suit emblems marseille-style, courts are page/knight/queen/king figures tinted per suit and holding their emblem
  • rws: the full rider-waite-smith deck (pamela colman smith, 1909, public domain, scans via wikimedia commons) over a shared 64-color palette, embedded at three sizes: large 110x190, medium 56x96, small 36x62. by default the largest size that fits your terminal is picked per render; pin one with --art-size large|medium|small. without a terminal (pipes) auto means large

pick per run with --art rws, or persistently with art: rws in the config. reversed cards render their art rotated 180 degrees, upside down for real. browse everything with tart gallery. regenerate the rws data with uv run --with pillow hack/rwsgen.py.

install

go install github.com/dappermint/tart@latest
nix run github:dappermint/tart -- read

from a checkout:

go build -o tart .
nix build             # or: nix run . -- read
just                  # lists recipes: build test lint check fmt gallery bump ...

the flake exposes packages.default, a devshell, and nixfmt as the formatter. just bump repins the tart input in a flake that consumes it, defaulting to /etc/nix-darwin; pass another path as just bump ~/my-flake.

usage

tart read                                # three card spread, default persona
tart read should i take the job          # args become the question
tart read -s celtic -p goth "this year"  # pick spread and persona
tart read -s single --upright            # no reversals
tart read -c                             # compact, skip the card art

tart draw 3                              # quick pull, no telling
tart cards                               # browse the deck
tart cards tower                         # one match shows full meanings
tart cards grief                         # search by keyword too
tart spreads                             # list spreads and positions
tart gallery                             # all 78 cards, three per row
tart gallery --reversed                  # the whole deck upside down

spreads: single, three, horseshoe (7), celtic (10).

reversals default to a 1 in 3 chance per card. tune per run with --reversal-chance 0.5, or persistently via reversal_chance in the config.

suit glyphs use the traditional playing-card correspondence: wands ♣, cups ♥, swords ♠, pentacles ♦.

personas

a persona is a template pack that shapes the voice of the telling. builtins: mystic (default), plain, goth, sunny.

tart persona list
tart persona show goth
tart persona use sunny          # set the default
tart persona create moonbat     # scaffold a custom one

custom personas live in ~/.config/tart/personas/<name>.yaml (honors XDG_CONFIG_HOME) and shadow builtins with the same name. templates are go text/template:

name: moonbat
description: transmissions from the night side
accent: "141"                   # 256-color number or hex

# greeting and closing receive {{.Question}} and {{.Spread}}
greeting: |-
  static clears{{if .Question}}. the frequency carries: “{{.Question}}”{{end}}.

# card_intro runs once per card and receives:
#   {{.Position}} {{.Hint}} {{.Name}} {{.Keywords}} {{.Suit}}
#   {{.Reversed}} {{.Index}} {{.Count}}
card_intro: |-
  signal {{.Index}} of {{.Count}}, {{.Position}}: {{.Name}}{{if .Reversed}}, inverted{{end}}.

closing: |-
  transmission ends.

# short interjections dropped between cards, sometimes
flourishes:
  - the dial drifts.

config lives at ~/.config/tart/config.yaml:

persona: mystic
reversal_chance: 0.33
art: sprite

disclaimer

the cards are cardboard. you get the final say.

license

apache-2.0, see LICENSE.

the rider-waite-smith art is derived from pamela colman smith's 1909 deck, public domain, scanned by wikimedia commons. everything else is mine.

About

tarot tellings in your terminal

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages