Skip to content

Managing the card database

The card database is managed using the TCG Collector tools. TCG Collector-specific data is managed using the tcgcollector-tools cms command. For general usage help, the --help option can be used on any of its subcommands.

Adding cards

  1. Check this document for new cards to be added.

  2. Crawl the cards using the TCG Collector tools with the TCG regions, expansions, and/or card number ranges specified. The files required for the expansions argument can be exported using the tools CMS. The Pokédex file can be crawled using the tools as well.

    Export the TCG Collector expansions:

    tcgcollector-tools \
        cms \
        export \
        expansions \
        /home/user/Desktop/expansions
    

    Crawl the Pokédex:

    tcgcollector-tools \
        crawl \
        pokedex \
        /home/user/Desktop/pokedex.json
    

    Crawl the cards:

    tcgcollector-tools \
        crawl \
        cards \
        --tcg-regions 'Japan' \
        --expansions 'Scarlet & Violet Promos' \
        --card-number-ranges '071/SV\-P-500/SV\-P' \
        --no-tcg-region-output-subdirs \
        --no-expansion-output-subdirs \
        'Bulbapedia' \
        /home/user/Desktop/expansions \
        /home/user/Desktop/pokedex.json \
        /home/user/Desktop/sv-p-promos
    
  3. Check the crawling issues & limitations if any of the crawled data needs to be fixed. Be sure not to skip this step! Also double check card variants, especially for promotional cards! Also see the conventions regarding assigning card variants.

  4. After fixing errors, use the TCG Collector tools to analyze the changes: Be warned that this is a superficial check that can't validate everything!

    tcgcollector-tools \
        analyze \
        cards \
        /home/user/Desktop/sv-p-promos
    
  5. Crawl the card images using the TCG Collector tools if it wasn't available as an option when crawling cards. If not all card images can be crawled, manually download and assign the imageReference property for each card.

    tcgcollector-tools \
        crawl \
        card-images \
        --tcg-regions 'Japan' \
        --no-tcg-region-output-subdirs \
        'PokemonCard' \
        /home/user/Desktop/expansions \
        /home/user/Desktop/card-images-japan
    
  6. Assign the crawled images to the cards using the TCG Collector tools:

    tcgcollector-tools \
        assign \
        card-images \
        /home/user/Desktop/card-images-japan \
        /home/user/Desktop/sv-p-promos
    

    Optionally, the illustrators can be overridden:

    tcgcollector-tools \
        assign \
        card-images \
        --override-illustrators \
        /home/user/Desktop/card-images-japan \
        /home/user/Desktop/sv-p-promos
    
  7. Create the cards on TCG Collector using the TCG Collector tools CMS:

    tcgcollector-tools \
        cms \
        create \
        cards \
        /home/user/Desktop/sv-p-promos
    
  8. If applicable, map the TCGplayer prices using the TCG Collector tools CMS:

    Fetch the TCGplayer crawler data:

    rclone \
        sync \
        --s3-access-key-id 's3-access-key-id' \
        --s3-secret-access-key 's3-secret-access-key' \
        --s3-region 'us-east-005' \
        --s3-endpoint 'https://s3.us-east-005.backblazeb2.com' \
        --s3-provider 'AWS' \
        --checksum \
        --fast-list \
        --verbose \
        ':s3:tcgplayer-crawler-data' \
        /home/user/Desktop/tcgplayer-crawler-data
    

    Show the TCGplayer groups with unhandled products:

    tcgcollector-tools \
        cms \
        tcgplayer
        show-unhandled-groups \
        /home/user/Desktop/tcgplayer-crawler-data/unhandled-products
    

    Map the unhandled TCGplayer products:

    tcgcollector-tools \
        cms \
        tcgplayer \
        map-unhandled-products \
        /home/user/Desktop/tcgplayer-crawler-data/unhandled-products \
        /home/user/Desktop/tcgplayer-crawler-data/product-mappings \
        /home/user/Desktop/tcgplayer-crawler-data/skipped-products
    

    Map the unhandled TCGplayer products for a specific group:

    tcgcollector-tools \
        cms \
        tcgplayer \
        map-unhandled-products \
        --groups 'SWSH: Sword & Shield Promo Cards' \
        /home/user/Desktop/tcgplayer-crawler-data/unhandled-products \
        /home/user/Desktop/tcgplayer-crawler-data/product-mappings \
        /home/user/Desktop/tcgplayer-crawler-data/skipped-products
    

    Remap certain TCGplayer products if needed:

    tcgcollector-tools \
        cms \
        tcgplayer \
        remap-products \
        /home/user/Desktop/tcgplayer-crawler-data/product-mappings \
        /home/user/Desktop/tcgplayer-crawler-data/skipped-products \
        '475994'
    

    Upload the TCGplayer crawler data:

    rclone \
        sync \
        --s3-access-key-id 's3-access-key-id' \
        --s3-secret-access-key 's3-secret-access-key' \
        --s3-region 'us-east-005' \
        --s3-endpoint 'https://s3.us-east-005.backblazeb2.com' \
        --s3-provider 'AWS' \
        --checksum \
        --fast-list \
        --verbose \
        /home/user/Desktop/tcgplayer-crawler-data \
        ':s3:tcgplayer-crawler-data'
    
  9. If applicable, create a news post for new expansions using the TCG Collector API. Use the previous news posts as a reference. Be careful with regards to punctuation and spelling errors, because news posts cannot be edited through the TCG Collector API (yet)! If a mistake is made, it can still be corrected by editing the production database directly, although not recommended.

Adding card variants

When adding non standard or parallel set card variants, Always include a markdown description! For examples, use the TCG Collector tools CMS:

tcgcollector-tools \
    cms \
    show \
    card-variants \
    --has-description-md

Searching for specific descriptions is also possible:

tcgcollector-tools \
    cms \
    show \
    card-variants \
    --description-md-search 'Part of a description'