{"id":20243124,"url":"https://github.com/monteluka/mtgfetch","last_synced_at":"2025-05-07T11:31:45.654Z","repository":{"id":262714970,"uuid":"886990824","full_name":"monteluka/mtgfetch","owner":"monteluka","description":"Magic: The Gathering card information fetcher","archived":false,"fork":false,"pushed_at":"2024-11-13T00:58:03.000Z","size":2144,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-11-13T22:27:18.388Z","etag":null,"topics":["command-line","fetch","magic-the-gathering","mtg","mtg-cards","mtgfetch","terminal"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/monteluka.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-11-12T01:20:26.000Z","updated_at":"2024-11-13T01:10:06.000Z","dependencies_parsed_at":"2024-11-15T05:00:26.246Z","dependency_job_id":null,"html_url":"https://github.com/monteluka/mtgfetch","commit_stats":null,"previous_names":["monteluka/mtgfetch"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/monteluka%2Fmtgfetch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/monteluka%2Fmtgfetch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/monteluka%2Fmtgfetch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/monteluka%2Fmtgfetch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/monteluka","download_url":"https://codeload.github.com/monteluka/mtgfetch/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252868928,"owners_count":21816937,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["command-line","fetch","magic-the-gathering","mtg","mtg-cards","mtgfetch","terminal"],"created_at":"2024-11-14T09:01:35.699Z","updated_at":"2025-05-07T11:31:44.144Z","avatar_url":"https://github.com/monteluka.png","language":"C++","readme":"# MTGFETCH\n\n**mtgfetch** is a command line tool which displays information on a single (*for now*) Magic: The Gathering card. It\noffers some customizability in its output which can be set in the `config.yaml`\nfile. [Scryfall's](https://scryfall.com/) API is used in order to get card information. Currently, only Linux is\nsupported, but Windows and macOS support is in the works.\n\n\u003cimg src=\"./images/screenshots/example1.png\" alt=\"example 1\"/\u003e\n\u003cimg src=\"./images/screenshots/example2.png\" alt=\"example 2\"/\u003e\n\u003cimg src=\"./images/screenshots/example3.png\" alt=\"example 3\"/\u003e\n\u003cimg src=\"./images/screenshots/example4.png\" alt=\"example 4\"/\u003e\n\n## Features\n\n- Get information on any Magic: The Gathering card\n- Get information on a random card\n- Customizable output\n    - Display only the information you want\n    - Choose the color of label and text\n\n## Installation\n\n### Ubuntu\n\nFirst, download the .deb file from the releases page\n\n#### Graphical\n\n- Go to the directory where the .deb package was downloaded to\n- Double-click the .deb package and follow GUI installation steps\n\n#### Terminal\n\n- cd into the directory where the file was downloaded to\n- run `sudo apt install ./mtgfetch-0.1-x86_64.deb`\n\n### Fedora\n\nFirst, download the .rpm file from the releases page\n\n#### Graphical\n\n- Go to the directory where the .rpm package was downloaded to\n- Double-click the .rpm package and follow GUI installation steps\n\n#### Terminal\n\n- cd into the directory where the file was downloaded to\n- run `sudo apt install ./mtgfetch-0.1-x86_64.rpm`\n\n### Other Linux Distros\n\nThere are archive files in the releases page that contain the executable and other files needed for the program to run.\nYou can download the .zip or .tar.gz file and extract its contents. You can then move those contents over to\n`/usr` directory.\n\n### From Source\n\nIf you'd like to build from source, or if you run a linux distribution that doesn't support .deb or .rpm files, these\nare the steps\n\n#### Prerequisites\n\nGet the following packages from your package manager\n\n```\ncmake\ngit\ng++\nlibssl-dev (ubuntu) / openssl-devel (fedora)\n```\n\n#### Installation Steps\n\n1. Clone the project and enter the project directory\n\n```shell\ngit clone https://github.com/monteluka/mtgfetch.git\ncd mtgfetch\n```\n\n2. Build the project\n\n```shell\nmkdir build\ncd build\ncmake -DCMAKE_BUILD_TYPE=Release ..\ncmake --build . --target mtgfetch\n```\n\n3. Now that the project files have been built, run the following command to install the program\n\n```shell\nsudo cmake --install .\n```\n\n## Uninstall\n\n### Ubuntu\n\nRun `sudo apt remove mtgfetch`\n\n### Fedora\n\nRun `sudo dnf remove mtgfetch`\n\n### If built from source\n\nRun the following commands. Make sure to double-check commands as we are deleting things as root.\n\n```shell\nsudo rm /usr/local/bin/mtgfetch\nsudo rm -rf /usr/local/share/mtgfetch\nsudo rm /etc/bash_completion.d/mtgfetch\n```\n\n## Configuration\n\nmtgfetch uses a yaml file for storing its configuration. The program looks for the file at the directory\n`~/.config/mtgfetch`. The configuration file must be named `config.yaml`. You can generate a config file using either\n`mtgfetch --gen-config` or `mtgfetch --gen-config-all`. The former generate a default config which should be suitable\nfor most users. The latter generates a config with all available modules. There are two sections to the configuration\nfile. These sections are **options** and **modules**. Values that don't exist in a card but are set in your config are\nsimply skipped. An example of this is if you have `power` and `toughness` enabled in your config, but you search for\ninformation on a planeswalker. Since a planeswalker doesn't have those attributes, power and toughness won't show in\nyour output.\n\n### Options\n\nThe first section is called options. This section contains settings for customizing the output of the program. Options\nhas the following subsections.\n\n#### Formatting\n\n| Setting       | Value | Default Value | Description                                                      |\n|---------------|-------|---------------|------------------------------------------------------------------|\n| indent_length | int   | 2             | Sets the indent length of the sections and subsections in output |\n\n#### Color\n\n| Setting       | Value | Default Value | Description                                                                                                                                                                                                                                                                                |\n|---------------|-------|---------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| enabled       | bool  | true          | If set to true, output will have colored text by using ANSI color codes. At minimum, the mana symbols are colorized. If color options are set for `set_key_color` and `set_val_color` then those are colorized as well. If this option is set to false, then plain text will be outputted. |\n| set_key_color | 0-255 |               | Sets the color for the labels in output. There are 256 color options to choose from. An image with all color options can be found [here](https://user-images.githubusercontent.com/208617/147884040-8fc1e280-48fb-4ac6-9296-74ba3e29ee20.png).                                             |\n| set_val_color | 0-255 |               | Sets the color for the descriptive text in output. There are 256 color options to choose from. An image with all color options can be found [here](https://user-images.githubusercontent.com/208617/147884040-8fc1e280-48fb-4ac6-9296-74ba3e29ee20.png).                                   |\n\n### Modules\n\nThe second section is called modules. It contains the names of the pieces of card information we can get. Since we are\nusing Scryfall's api you can have a look at their docs [here](https://scryfall.com/docs/api/cards) to see what each\nlabel represents. If you are still confused on what some of the labels mean, then you should run the program using the\nconfig generated from `mtgfetch --gen-config-all` to see what each label outputs.\n\n### Customizing Order of Output\n\nAll top level values under modules can be arranged in the order you want for your output. It's important to note that\nsome values in the list are arrays and have their own set of possible values. An example of this is `card_faces` which\ncan be seen in the files [default_config.yaml](./presets/default_config.yaml)\nand [all_modules.yaml](./presets/all_modules.yaml). These arrays have their own set of available values that can also be\nset in any order you want. Take a look at both files to see how the `card_faces` array was rearranged.\n\n## Usage\n\nRun `mtgfetch --help` for usage details\n\n## Features/Bug\n\n- If there is a feature you want added, please open a feature\n  request [here](https://github.com/monteluka/mtgfetch/issues)\n- If there are any bugs you encounter, please report them [here](https://github.com/monteluka/mtgfetch/issues)","funding_links":[],"categories":["Miscellaneous"],"sub_categories":["Other"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmonteluka%2Fmtgfetch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmonteluka%2Fmtgfetch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmonteluka%2Fmtgfetch/lists"}