{"id":22731780,"url":"https://github.com/fenhl/magic-set-generator","last_synced_at":"2025-04-14T00:44:58.333Z","repository":{"id":148504060,"uuid":"90142000","full_name":"fenhl/magic-set-generator","owner":"fenhl","description":"Generate Magic Set Editor files from lists of card names","archived":false,"fork":false,"pushed_at":"2023-03-25T00:35:58.000Z","size":449,"stargazers_count":17,"open_issues_count":13,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-27T14:55:05.854Z","etag":null,"topics":["magic-set-editor","magic-the-gathering","mtgjson"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/fenhl.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":"2017-05-03T11:34:24.000Z","updated_at":"2024-09-07T13:02:23.000Z","dependencies_parsed_at":"2023-04-25T18:47:40.444Z","dependency_job_id":null,"html_url":"https://github.com/fenhl/magic-set-generator","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fenhl%2Fmagic-set-generator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fenhl%2Fmagic-set-generator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fenhl%2Fmagic-set-generator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fenhl%2Fmagic-set-generator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fenhl","download_url":"https://codeload.github.com/fenhl/magic-set-generator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248804721,"owners_count":21164127,"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":["magic-set-editor","magic-the-gathering","mtgjson"],"created_at":"2024-12-10T19:30:40.257Z","updated_at":"2025-04-14T00:44:58.326Z","avatar_url":"https://github.com/fenhl.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"**This project is looking for maintainers!** I am currently taking a break from Magic, so I'm not working on this tool right now. If you would like to revive the project, let me know.\n\n**Magic Set Generator** (previously known as `json-to-mse`) is a tool which generates [Magic Set Editor](https://magicseteditor.boards.net/) set files from a list of card names (or other sources). It is available as a Windows app and as a cross-platform command-line tool.\n\nDownload the app: [Windows (64-bit)](https://github.com/fenhl/magic-set-generator/releases/latest/download/msg-win64.exe) • [Windows (32-bit)](https://github.com/fenhl/magic-set-generator/releases/latest/download/msg-win32.exe)\n\n**Note:** The app currently has limited functionality. For advanced configuration, please use the command-line tool.\n\n# Command-line tool\n\n**Note:** This is a beta preview of Magic Set Generator version 2. It is not yet feature complete. If you encounter any bugs or missing features, please [open an issue](https://github.com/fenhl/magic-set-generator/issues/new) or let me know on Discord.\n\n## Installation\n\n1. Install Rust:\n    * On Windows, download and run [rustup-init.exe](https://win.rustup.rs/) and follow its instructions.\n    * On other platforms, please see [the Rust website](https://www.rust-lang.org/learn/get-started) for instructions.\n2. (Skip this step if you're not on Windows.) If you're on Windows, you'll also need to download and install [Visual Studio](https://visualstudio.microsoft.com/vs/) (the Community edition should work). On the “Workloads” screen of the installer, make sure “Desktop development with C++” is selected. (Note that [Visual Studio Code](https://code.visualstudio.com/) is not the same thing as Visual Studio. You need VS, not VS Code.)\n3. Open a command line:\n    * On Windows, right-click the start button, then click “Windows PowerShell” or “Command Prompt”.\n    * On other platforms, look for an app named “Terminal” or similar.\n4. In the command line, run the following command. Depending on your computer, this may take a while. You can continue with step 5 while it's running.\n\n    ```\n    cargo install --git=https://github.com/fenhl/magic-set-generator\n    ```\n5. Some features may require MSE templates not packaged with MSE. You can get them from one of the following sources:\n    * Cajun's Megafile (recommended):\n        1. If you don't have MSE yet, download the Advanced Magic Set Editor files from \u003chttp://magicseteditor.boards.net/page/downloads\u003e.\n        2. Download the Megafile from \u003chttp://magicseteditor.boards.net/thread/77\u003e.\n        3. Merge the Megafile contents into your MSE `data` folder.\n    * The Custom Magic template pack. To install, join [the Custom Magic Discord server](https://discord.gg/FbMK9UE) and follow the instructions in the message pinned in #resources. (Download the Full MTG pack, not the Basic M15 pack or the M15 pack.)\n\n## Basic usage\n\n1. Open a command-line in the folder where you want to save your MSE set file:\n    * On Windows, locate the folder in File Explorer, then right-click it while holding shift and select “Open PowerShell window here” or “Open command prompt here”.\n    * On other platforms, open a command line and navigate to the folder using `cd`. For example, if you want to save in your user folder → games → magic → sets, run the command `cd games/magic/sets`.\n2. In the command line, run the following command:\n\n    ```\n    msegen Counterspell \"Dryad Arbor\" -o example.mse-set\n    ```\n\n    This will create an MSE set file containing the cards [Counterspell](https://lore-seeker.cards/card/ss1/4) and [Dryad Arbor](https://lore-seeker.cards/card/fut/174) and save it as `example.mse-set` in the folder you selected. (Note that card names containing spaces must be enclosed in quotation marks.)\n\n    You can also save your card names as a plain text file in the same folder (one card name per line), and use that file to generate the cards, like this: (let's assume the text file is called `cards.txt`)\n\n    ```\n    msegen -i cards.txt -o example.mse-set\n    ```\n3. `-i` and `-o` aren't the only options available. The full list is described below in the section “Command-line options”, but here's one that's especially important. Magic Set Generator normally downloads card art from [Scryfall](https://scryfall.com/) each time it runs, but you can speed up subsequent runs (and avoid getting yourself blocked if you download the same images over and over again) by creating a folder where it should save these images, and then adding the following option each time you use Magic Set Generator. For example, if you created a folder named `card images` inside the folder that you opened in step 1, you can run `msegen --images=\"card images\" -i cards.txt -o example.mse-set`.\n4. Another useful option is `-v` if you want to see more information about what MSG is doing. This will also make MSG check if any updates are available (and tell you how to update).\n\n## Advanced usage\n\nSections marked **(NYI)** are not yet implemented in MSG version 2.\n\nThe script takes any number of command line arguments. Arguments are interpreted as follows:\n\n* Arguments starting with `-` are interpreted as options (see below).\n* Arguments starting with `!` are special commands. The following commands are currently supported:\n    * `!all`: Generate all cards present in the database (see `--db` below), except tokens and un-cards.\n    * **(NYI)** `!tappedout \u003cdeck-id\u003e`: Download the given decklist from [tappedout.net](http://tappedout.net/) and generate all cards from it.\n* Arguments starting with `#` are ignored. This can be used in input files (see `-i` below) to write comments.\n* Arguments starting with `=` are parsed according to [Lore Seeker syntax](https://lore-seeker.cards/help/syntax) to generate all cards from the result. This requires an internet connection or a `find_cards` script compatible with the one from [magic-search-engine](https://github.com/taw/magic-search-engine), see also `--find-cards` and `--offline` below.\n* Any other arguments are interpreted as card names. This can be used to specify cards to generate instead of, or in addition to, those read from an input file.\n\nIf your shell supports input/output redirection, you can also pipe arguments into the script (again, one argument per line, and currently not supported on Windows), and pipe the output into a `.zip` file. For example,\n\n```\necho 'Dryad Arbor' | msegen \u003e example.mse-set\n```\n\nis equivalent to\n\n```\nmsegen 'Dryad Arbor' -o example.mse-set\n```\n\n## Image handling\n\nHow card artwork is handled is determined as follows:\n\n1. If `--no-images` is set, all artwork is left blank. All following steps are skipped.\n2. If `--images` is set to a directory containing a file named `\u003ccard name\u003e.png`, `\u003ccard name\u003e.jpg`, or `\u003ccard name\u003e.jpeg`, that image will be used. (If the card name contains the symbols `:`, `\"`, and/or `?`, these should be omitted from the file name.) After `--images`, `--scryfall-images` and `--lore-seeker-images` are checked. Then if neither `--images` nor both `--scryfall-images` and `--lore-seeker-images` are set, an OS-specific cache directory is checked.\n3. If neither `--no-scryfall-images` nor `--offline` are set, MSG will attempt to download the card artwork from [Scryfall](https://scryfall.com/). If successful, that image is used. If `--scryfall-images` is set to a directory, the image will also be saved there as `\u003ccard name\u003e.png`. Otherwise, MSG will attempt to save the image to `--images`, or to an OS-specific cache directory if that isn't set either.\n4. If neither `--no-lore-seeker-images` nor `--offline` are set, MSG will attempt to download the card artwork from [Lore Seeker](https://lore-seeker.cards/). If successful, that image is used. If `--lore-seeker-images` is set to a directory, the image will also be saved there as `\u003ccard name\u003e.png`. Otherwise, MSG will attempt to save the image to `--images`, or to an OS-specific cache directory if that isn't set either.\n5. If none of the previous steps were successful, the artwork for that card is left blank.\n\n## Command-line options\n\nMSG accepts the following command line options:\n\n* `-b`, `--border=\u003ccolor\u003e`: Set the card border color. Supported colors are:\n    * `b` or `black`\n    * `w` or `white`\n    * `s` or `silver`\n    * `g` or `gold`\n    * `bronze`, the default, for clearly marking cards as proxies\n    * a 3- or 6-digit [hex triplet](https://en.wikipedia.org/wiki/Web_colors#Hex_triplet)\n* `-h`, `--help`: Print a short message with a link to this readme file instead of doing anything else.\n* `-i`, `--input=\u003cpath\u003e`: Read card names from the file or directory located at `\u003cpath\u003e`. This can be specified multiple times to combine multiple input paths into one MSE set file. The following formats are understood:\n    * A plain text file with one card name per line. Special lines are also supported as with directly specified arguments (see “advanced usage” above). `!` commands and their arguments should be on the same line, with arguments shell-quoted if necessary.\n    * **(NYI)** A directory containing images named `\u003ccard name\u003e.png`, `\u003ccard name\u003e.jpg`, or `\u003ccard name\u003e.jpeg`. This will set `--images` to this directory if it's not already set (see below), and generate the named cards.\n* `-o`, `--output=\u003cpath\u003e`: Write the zipped MSE set file to the specified path, instead of the standard output. Any existing file at that path will be deleted!\n* `-v`, `--verbose`: Check for self-updates (unless `--offline` is given), report progress while generating the set file, and give more detailed error messages if anything goes wrong.\n* **(NYI)** `--allow-uncards`: This script has no official support for silver-bordered “un-cards” and other shenanigans like [1996 World Champion](https://lore-seeker.cards/card/pcel/1). As a result, most un-cards will be rendered incorrectly, so the script will refuse to generate them unless this option is used. Reports of issues encountered while using this option will be closed as invalid.\n* `--auto-card-numbers`: Display automatically-assigned collector numbers on the cards, below the text box.\n* `--copyright=\u003cmessage\u003e`: The copyright message, appearing in the lower right of the card frame. Defaults to `NOT FOR SALE`.\n* `--db=\u003cpath\u003e`: The path from which to load the card database. In `--offline` mode, this defaults to `data\\sets` in the [gitdir](https://github.com/fenhl/gitdir) master for [Lore Seeker](https://github.com/fenhl/lore-seeker). Otherwise, the database is downloaded from [mtgjson.com](https://mtgjson.com/) by default. The following formats are understood:\n    * A file in the [MTG JSON AllSets](https://mtgjson.com/files/all-sets/) format.\n    * A directory containing [MTG JSON Individual Set](https://mtgjson.com/files/individual-set/) files.\n* **(NYI)** `--find-cards=\u003cpath\u003e`: The path to the `find_cards` executable used for [Lore Seeker syntax](https://lore-seeker.cards/help/syntax). In `--offline` mode, this defaults to `search-engine\\bin\\find_cards` in the [gitdir](https://github.com/fenhl/gitdir) master for [Lore Seeker](https://github.com/fenhl/lore-seeker). Otherwise, [the Lore Seeker website](https://lore-seeker.cards/) is used by default.\n* `--holofoil-stamps`: Enable holofoil stamps on the bottom of text boxes of rare and mythic cards.\n* `--[no-]images[=\u003cpath\u003e]`: See [Image handling](#image-handling).\n* `--[no-]include-schemes`: Enable or disable the inclusion of schemes as regular-sized cards in the main set file. This is on by default unless `--schemes-output` is given.\n* `--[no-]include-vanguards`: Enable or disable the inclusion of vanguards as regular-sized cards in the main set file. This is on by default unless `--vanguards-output` is given.\n* `--lore-seeker-hostname=\u003chost\u003e`: Use this hostname for all Lore Seeker requests. Defaults to `lore-seeker.cards`.\n* `--[no-]lore-seeker-images[=\u003cpath\u003e]`: See [Image handling](#image-handling).\n* `--offline`: This option has the following effects:\n    * It enables `--no-lore-seeker-images` and `--no-scryfall-images`.\n    * MSG won't check for self-updates, even in `--verbose` mode.\n    * It won't attempt to download the card database. Instead, if `--db` isn't given, it expects a local copy of [the Lore Seeker repository](https://github.com/fenhl/lore-seeker). See `--db` for details.\n    * It won't attempt to use [Lore Seeker](https://lore-seeker.cards/) for syntax queries (arguments starting with `=`). Instead, `find_cards` is required if any queries are performed. See `--find-cards` for details.\n* **(NYI)** `--plane-templates=\u003ctemplates\u003e`: Specify which templates to use for planes and phenomena, as a comma-separated list of any number of the following. The default is `large`. If multiple templates are specified, each plane and phenomenon card will appear multiple times in the set file.\n    * `large`: The default Planechase template.\n    * `mini`: A smaller version of the Planechase template, same size as regular cards. Very small text.\n    * `basic`: The default template for regular cards.\n* `--schemes-output=\u003cpath\u003e`: Save schemes to a separate MSE set file at the specified path. Any existing file at that path will be deleted! By default, these cards are not rendered using a correct oversized template, use this option to fix this.\n* `--[no-]scryfall-images[=\u003cpath\u003e]`: See [Image handling](#image-handling).\n* `--set-code=\u003ccode\u003e`: The set code of the generated set. Defaults to `PROXY`.\n* `--update`: Attempt to update MSG to the latest version instead of doing anything else.\n* `--vanguards-output=\u003cpath\u003e`: Save vanguards to a separate MSE set file at the specified path. Any existing file at that path will be deleted! By default, these cards are not rendered using the correct oversized template, use this option to fix this.\n* `--version`: Print version information instead of doing anything else.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffenhl%2Fmagic-set-generator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffenhl%2Fmagic-set-generator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffenhl%2Fmagic-set-generator/lists"}