mirror of
https://github.com/Cockatrice/Magic-Token.git
synced 2026-03-23 18:44:20 -05:00
Tokens.xml for M:tG
* add missing excludes for double entries
cockatrice will actually implicitly mark the second reverse-related tag
on the same token as exclude, however we prefer to mark them explicitly,
there are only two relations that we happened to have this wrong
lazy bash:
tag="reverse-related"
relationrx="( *)<$tag([^>]*)>([^<]*)</$tag>"
exclude='exclude="exclude"'
while IFS= read -r line; do
if [[ $line =~ $relationrx ]]; then
space=${BASH_REMATCH[1]}
args=${BASH_REMATCH[2]}
name=${BASH_REMATCH[3]}
if [[ $last_name && $name == "$last_name" ]]; then
if [[ ! $args =~ $exclude ]]; then
echo "$space<$tag$args $exclude>$name</$tag>"
continue
fi
else
last_name=$name
fi
else
last_name=""
fi
echo "$line"
done <tokens.xml | sponge tokens.xml
* update version to 20230311
---------
Co-authored-by: github-actions <github-actions@github.com>
|
||
|---|---|---|
| .github/workflows | ||
| challenge_tokens.xml | ||
| LICENSE | ||
| README.md | ||
| tokens.xml | ||
| version.txt | ||
Magic-Token

This repo contains token information in Cockatrice's XML card database format for Magic: The Gathering.
It describes individual tokens with linked art and the relation to their creators.
For normal tokens, save the file found here: tokens.xml
For tokens from the Theros block challege decks, save the file found here: challenge_tokens.xml