Create -o flag for toggling orientation off
Some possibly incorrect man updates for clean working dir
Fixed up path resolutions to ignore all characters preceding :
tarotfs is a tarot card filesystem for plan9 inspired by webfs. It enables you to create and persist tarot spreads on a plan9-based system.
This is very much a project for personal use and as an exploration of plan9 features and development workflow, so don't be surprised if it has bugs, eats all your memory or summons Lucifuge Rofocale.
Finally, the project is still very much in flux and I'll probably shuffle some things around, so any integrations you build may well break!
I can't promise that I'll accept contributions so before embarking on features that you'd like to see upstreamed, please ask!
In terms of bugfixes, I'd love to improve my C so please send patches or just report the bugs :)
git/clone https://git.sr.ht/~grimmware/tarotfs
cd tarotfs
mk install
From man 4 tarot
:
TAROT(4) TAROT(4)
NAME
tarot - tarot card filesystem
SYNOPSIS
tarot [ -DdkPh ] [ -p definitions ] [ -m mtpt ]
DESCRIPTION
Tarotfs presents a file system interface to generating and
interacting with tarot spreads. Tarotfs mounts itself at
mtpt (default /mnt/tarot). The -D flag enables 9P debug
prints and other debug files and -h displays the short list
of options.
Tarotfs also optionally supports displaying keywords and
definitions when reading files for the drawn cards by pro-
viding a definitions directory with the flag -p wherein the
directory structure should follow the structure:
Name/Suit/Card/ and contain the files keywords and
description, both of which can be freeform text files. The
keywords should ideally contain a short list of keywords to
associate with both the upright and reversed configuration
of each file. The Name/Suit/Card naming convention has the
following restrictions:
Name This can be any directory name, and isn't actually uti-
lized (yet). Currently tarotfs will just pick the
first named pack inside the supplied definitions direc-
tory.
Suit There must be definitions for all of
Cups,Pentacles,Swords,Wands,Major the last of which
must obviously be populated with the Major Arcana.
Card For the minor arcana these will be the capitalised form
of the card's name or number, for example
Eight,Ace,King. For the major arcana, it must be the
full name of the card (with spaces) e.g.
TheMagician,Strength,WheelofFortune. This is a little
more hairy, so read the code if you're unsure.
The flags -dkP enable displaying the definitions, keywords
and definition paths when reading the card files respec-
tively when -p is supplied.
The top level contains the file clone, and the directory
card_library, the latter of which contains a tree of all the
available cards.
Reading or writing to the clone file creates a new numbered
subdirectory for a new tarot spread and redirects the opera-
tion to the ctl file at the top of the directory.
Each "spread" directory contains the files: ctl, draw,
shuffle and remaining.
The ctl file is used to control the various settings for the
spread by writing commands and arguments to the file:
spread
Sets the names for the drawn cards in addition to their
numbers. Arguments are space separated.
keywords
Toggles whether keywords are displayed when reading
card files
descriptions
Toggles whether descriptions are displayed when reading
card files
paths
Toggles whether definition paths are displayed when
reading card files
Reading the ctl file will return the spread number (matching
the spread's directory) on the first line. If a deck defini-
tion was supplied, it will also print on the following lines
the attributes deckpath,keywords,description each followed
by a space and then the path of the deck definition and the
booleans for whether keywords and descriptions are enabled
for the spread respectively.
Reading draw draws a card, reading remaining shows how many
cards are remaining in the deck and shuffle will reshuffle
the deck.
If the -D option is passed on startup, there will also be
the deck file which outputs the integer representations of
all the cards in the deck along with their number order.
This is currently only used for debugging purposes.
EXAMPLE
The following shows a simple example of cloning a new
spread, setting the spread name and then drawing all the
cards from the spread.
† tarot
† ls /mnt/tarot
/mnt/tarot/card_library
/mnt/tarot/clone
† cat /mnt/tarot/clone
1
† cd /mnt/tarot/1
† ls
ctl
draw
remaining
† echo spread past present future advice > ctl
† for(i in `{seq 1 4}) cat draw
Four of Pentacles
upright
Ⅱ: The High Priestess
reversed
King of Wands
upright
Seven of Cups
reversed
† ls
1:past
2:present
3:future
4:advice
ctl
draw
remaining
† cat remaining
74
SOURCE
https://git.sr.ht/~grimmware/tarotfs