Tokens.xml for M:tG
Go to file
ebbit1q 6282826daf
add missing excludes for double entries (#203)
* 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>
2023-03-11 12:25:55 +01:00
.github/workflows Update check_links.yml (#189) 2022-11-30 03:27:06 +01:00
challenge_tokens.xml Split Challenge Decks and Heros By Set (#173) 2022-08-10 14:51:15 +02:00
LICENSE Initial commit 2014-07-27 11:15:08 +08:00
README.md CI: Check image links (#131) 2022-09-12 14:13:36 +02:00
tokens.xml add missing excludes for double entries (#203) 2023-03-11 12:25:55 +01:00
version.txt add missing excludes for double entries (#203) 2023-03-11 12:25:55 +01:00

Discord Gitter Chat

Magic-Token Picture Health

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