Skip to content

Latest commit

 

History

History
176 lines (141 loc) · 6.76 KB

README.md

File metadata and controls

176 lines (141 loc) · 6.76 KB

Go Reference Go Report Card

forgefs -- The Keyforge Filesystem

Finally! A filesystem that lets you browse all (Keyforge)[https://keyforging.com/) cards and all the decks you have registered at decksofkeyforge.com. forgefs is a filesystem that runs on Ubuntu and MacOS that shows up like a thumb drive, letting you browse both cards and decks from the command line or in your file broswer.

Usage

Here is an example of browsing the filesystem on Linux. In this example, we show:

  1. Listing all Keyforge cards from the command line, then showing the card data and image for one card.
  2. Doing the same thing, from the GUI file browser.
  3. Listing all your decksofkeyforge decks, then showing the deck data for one of them.
  4. Generate a PDF of all the cards in the deck on the fly using a standard Linux tool.

Using forgefs in Linux

You can also see a decklist image for any of your decks, courtesy of the amazing SkyJedi:

Seeing your deck image in Linux

Filtering decks

One of the coolest things you can do is filter your decks by different decksofkeyforge statistics, or by what houses or sets it has, right from the command line.

All you need to do is navigate into a virtual directory in your my-decks directory. This isn't a real directory that will show up in ls or in your file browser listing; it only exists when you go into it or try to ls it directly. Like magic!

The name for this virtual directory describes the kind of filter you want. There are a bunch of stats you can filter on, all calculated by the awesome folks at decksofkeyforge.com.

  • a: amber control
  • e: expected amber
  • r: artifact control
  • c: creature control
  • f: efficiency
  • d: disruption
  • sas: overall SAS score
  • aerc: AERC score
  • expansion or set: the acronym of the Keyforge set of the deck. These are case-insensitive:
    • CotA
    • AoA
    • WC
    • MM
    • DT
  • house: matches one of the houses in the deck. These are also case-insensitive:
    • Brobnar
    • Dis
    • Logos
    • Mars
    • Sanctum
    • Saurian
    • Shadows
    • Staralliance
    • Unfathomable
    • Untamed

You can choose one of those stats, followed by an = and either the exact number you want to match, or a range. Ranges are one or two numbers combined with a :. The minimum number goes to the left of the :, and the maximum number goes to the right. For example:

  • Amber control minimum of 10: a=10:
  • Creature control maximum of 5: c=:5
  • SAS between 80 and 90 (inclusive): sas=80:90

What's more, you can combine these stat filters using boolean logic and parentheses. The possible boolean operators are:

  • And: , or +
  • Or: ^

Examples, assuming you have navigated into your my-decks directory:

  • Count all your decks with SAS between 80 and 90 (inclusive): Filter on SAS
  • Count your decks with "perfect" stats (amber control >= 10, expected amber >= 20, creature control >= 10, artifact control >= 1.5, and efficiency >= 10): Filter on perfect stats
  • Count your decks with "perfect" stats or a SAS of at least 80: Filter on perfect stats or SAS of 80
  • Count your Mass Mutation decks with an AERC of at 68: Filter on AERC and set
  • Pick a random deck out of your MM decks with a SAS of at least 68: Random deck

Note that the above examples are just counting directory entries using a standard wc command line tool. Each of those directory entries is a full deck directory, where you can access cards and decklist images as well. The only limit on what you can do with that is your imagination!

Build/Install

forgefs is written in Go. Once you install and configure Go, it is super easy to install forgefs. This will download the repository and install it in your $GOPATH/bin directory:

go get github.com/strib/forgefs
go install github.com/strib/forgefs/forgefs

Alternatively, you can find a pre-built package for Debian/Ubuntu here.

Configuration/Run:

The forgefs config file lives by default at $HOME/.forgefs_config.json (though you can specify an alternate config file location on the command line to the forgefs binary). Before you can run it, you need to generate a decksofkeyforge API key for yourself; you can do that here. Once you have your key, create a config file at $HOME/.forgefs_config.json that looks something like this:

  {
    "dok_api_key": "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX"
  }

where you need to substitute your real decksofkeyforge API key (in quotes) in place of "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX".

By default, the mountpoint for forgefs is $HOME/ffs, though that is also configurable on the command line or in the config file (with a "mountpoint" key). That directory must exist and be empty before you run forgefs. forgefs also caches data on your file system, by default in directory $HOME/.local/share/forgefs. You also need to make that directory.

mkdir -p $HOME/ffs
mkdir -p $HOME/.local/share/forgefs/forgefs_images

After that, you're ready to run it! You can run forgefs with no command line and starting browsing.

Debian/Ubuntu

If you've installed our .deb package, you can run it with the run_forgefs command, which starts up forgefs using systemd so it always runs in the background. It also creates the appropriate directories for you.

Credit

  • decksofkeyforge.com is awesome, consider supporting it on Patreon. It assigns a bunch of statistics to your decks and is also a great deck collection manager, in addition to other things.
  • SkyJedi is an amazing Keyforge community member, consider support him as well on Patreon.