|
|
|
@@ -1,4 +1,4 @@
|
|
|
|
# TO BE NAMED
|
|
|
|
# Quick Magic Finder
|
|
|
|
|
|
|
|
|
|
|
|
A quick way to search up Magic the Gathering (TM) cards for Linux (maybe MacOS? Don't have one, so haven't tried).
|
|
|
|
A quick way to search up Magic the Gathering (TM) cards for Linux (maybe MacOS? Don't have one, so haven't tried).
|
|
|
|
|
|
|
|
|
|
|
|
@@ -11,9 +11,9 @@ This repo has 2 main parts to it:
|
|
|
|
* The `magic_finder` rust code, which does the "heavy lifting" of updating a database, searching through it for cards, and finding close names (kind of)
|
|
|
|
* The `magic_finder` rust code, which does the "heavy lifting" of updating a database, searching through it for cards, and finding close names (kind of)
|
|
|
|
* The supporting scripts which use [`rofi`](https://github.com/davatorium/rofi)
|
|
|
|
* The supporting scripts which use [`rofi`](https://github.com/davatorium/rofi)
|
|
|
|
|
|
|
|
|
|
|
|
`magic_finder` can be used without the rofi parts if you wanted a command for loading showing basic mtg card info.
|
|
|
|
`magic_finder` can be used without the rofi parts if you wanted a command for loading showing basic mtg card info from the CLI.
|
|
|
|
|
|
|
|
|
|
|
|
The `rofi` part is so that I can quickly and easily, with a couple of commands, get the card info I want. Basically just adds a very simple and easy GUI to the `magic_finder` part.
|
|
|
|
The `rofi` part is so that I can quickly and easily get the card info I want. Basically just adds a very simple and easy GUI to the `magic_finder` part. I've written 2 wrapper scripts to enable this.
|
|
|
|
|
|
|
|
|
|
|
|
## Requirements
|
|
|
|
## Requirements
|
|
|
|
|
|
|
|
|
|
|
|
@@ -37,20 +37,20 @@ I am sorry in advance, this is a bit of a pain becuase of my lack of knowledge o
|
|
|
|
|
|
|
|
|
|
|
|
**TODO - don't forget that I need to install sqlite3-lib/dev/something - or maybe I add the feature flag "bundled"**
|
|
|
|
**TODO - don't forget that I need to install sqlite3-lib/dev/something - or maybe I add the feature flag "bundled"**
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
*TODO - don't forget about adding the shortcut to the overall wrapper script*
|
|
|
|
|
|
|
|
|
|
|
|
## Before you use this
|
|
|
|
## Before you use this
|
|
|
|
|
|
|
|
|
|
|
|
## Update
|
|
|
|
## Update
|
|
|
|
Basically the same as the "Before you use this" secion. Go to the [Scryfall Bulk Download](https://scryfall.com/docs/api/bulk-data) page and get the Oracle Cards download.
|
|
|
|
Basically the same as the "Before you use this" secion. Go to the [Scryfall Bulk Download](https://scryfall.com/docs/api/bulk-data) page and get the Oracle Cards download.
|
|
|
|
|
|
|
|
|
|
|
|
Then run the `update_with_rofi.sh` script, locate the downloaded file, and it should Just Work (TM). If not, try updating this repo. If it still doesn't work, log a ticket. It's probably going to something with Scryfall updating their schema that I haven't accounted for.
|
|
|
|
Then run the `update_with_rofi.sh` script, locate the downloaded file, and it should Just Work (TM). If not, try updating this repo. If it still doesn't work, log a ticket. It's probably going to something with Scryfall updating their schema that I haven't accounted for. Alternatively, run `COMMAND --update <path to file>` where `<path to file>` is the full path to where you downloaded the file.
|
|
|
|
|
|
|
|
|
|
|
|
Alternatively, run `COMMAND --update <path to file>` where `<path to file>` is the full path to where you downloaded the file.
|
|
|
|
NOTE: Updating *will* delete the previous db - that shouldn't be a problem though, because you shouldn't use that unless you really know what you're doing.
|
|
|
|
|
|
|
|
|
|
|
|
This will delete the previous db - that shouldn't be a problem though, because you shouldn't use that unless you really know what you're doing.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## Why this exists
|
|
|
|
## Why this exists
|
|
|
|
|
|
|
|
|
|
|
|
I often watch Magic the Gathering (TM) videos while coding, working, writing, whatever, and, often, I don't know what card they're talking about. They'll often say the card name (sometimes a nickname - this doesn't help with that), and show it on the screen briefly (or in a tiny/obscured view), and I'll miss what it actually does. When this happens, I need to open a tab on my browser, go to [Scryfall](scryfall.com), type in the name, (sometimes) click the specific card, and the view it. This takes 2-3 page loads, changing my active window and just a bit of a pain.
|
|
|
|
I like watch Magic the Gathering (TM) videos, expecially while coding, working, writing, whatever. Often, I don't know what card they're talking about. They'll often say the card name (sometimes a nickname - this tool doesn't help with that), and show it on the screen briefly (or in a tiny/obscured view), and I'll miss what it actually does. When this happens, I need to open a tab on my browser, go to [Scryfall](scryfall.com), type in the name, (sometimes) click the specific card, and the view it. This takes 2-3 page loads, changing my active window and just a bit of a pain.
|
|
|
|
|
|
|
|
|
|
|
|
This tool, especially using `rofi` enables me to hit `Ctrl+M`, type in the card name, navigate to the card (if needed) with my keyboard, and display the card. No browser, no HTTP, lower context switch, displayed right there, and goes away when I press anything else.
|
|
|
|
This tool, especially using `rofi` enables me to hit `Ctrl+M`, type in the card name, navigate to the card (if needed) with my keyboard, and display the card. No browser, no HTTP, lower context switch, displayed right there, and goes away when I press anything else.
|
|
|
|
|
|
|
|
|
|
|
|
@@ -99,6 +99,10 @@ cp build/rofi ~/bin
|
|
|
|
* Display the actual card image (probably won't do this)
|
|
|
|
* Display the actual card image (probably won't do this)
|
|
|
|
* Some kind of auto-magic direct link between the return codes set out in `main.r`s and the `rofi` scripts. Currently I need to manually make sure they're the same between the `rust` code and the `sh` code.
|
|
|
|
* Some kind of auto-magic direct link between the return codes set out in `main.r`s and the `rofi` scripts. Currently I need to manually make sure they're the same between the `rust` code and the `sh` code.
|
|
|
|
I'm guessing would involve cargo build scripts (or just a find+replace?)
|
|
|
|
I'm guessing would involve cargo build scripts (or just a find+replace?)
|
|
|
|
|
|
|
|
* Add some classic nicknames (might be difficult to find them all). examples include:
|
|
|
|
|
|
|
|
** Bob - Dark Confidant
|
|
|
|
|
|
|
|
** AK - Accumulated Knowledge
|
|
|
|
|
|
|
|
** find more here: https://mtg.wiki/page/List_of_Magic_slang/Card_nicknames
|
|
|
|
|
|
|
|
|
|
|
|
## Thanks
|
|
|
|
## Thanks
|
|
|
|
|
|
|
|
|
|
|
|
|