deckconverter

package module
v0.6.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 11, 2020 License: MIT Imports: 13 Imported by: 0

README

Tabletop Simulator TCG Deck Converter

PkgGoDev build test test-urls

Generate card decks for Tabletop Simulator.

Inspired by decker and Frogtown.

Demo

Features

Supported platforms

  • Windows 7 or later
  • macOS 10.11 or later
  • Linux 2.6.23 or later

Download

The latest release can be downloaded here.

Download the archive for your platform, extract it and run the program. No installation is required.

If you want the latest master build, go here, click on the topmost job, then download the appropriate package for your machine from the artifact list (e.g. tts-deckconverter-gui-windows-amd64 for the Windows GUI or tts-deckconverter-windows-amd64 for the Windows command-line interface).

Building

Go 1.13 or newer is required.

Command-line tool
go build ./cmd/tts-deckconverter

This will generate an executable called tts-deckconverter.

GUI

Install the dependencies required by Fyne, listed here.

go build ./cmd/tts-deckconverter-gui

This will generate an executable called tts-deckconverter-gui.

CLI usage

$ ./tts-deckconverter -h

Usage: tts-deckconverter TARGET

Flags:
  -back string
        card back (cannot be used with "-backURL"):
  -backURL string
        custom URL for the card backs (cannot be used with "-back")
  -chest string
        save to the Tabletop Simulator chest folder (use "/" for the root folder) (cannot be used with "-output")
  -compact
        don't indent the resulting JSON file
  -debug
        enable debug logging
  -format string
        format of the deck (usually inferred from the input file name or URL, but required with stdin)
  -mode string
        available modes: mtg, pkm, ygo, cfv, custom
  -name string
        name of the deck (usually inferred from the input file name or URL, but required with stdin)
  -option value
        plugin specific option (can have multiple)
        mtg:
            quality (enum): image quality (default: normal)
            rulings (bool): add the rulings to each card description (default: false)
        pkm:
            quality (enum): image quality (default: hires)
        ygo:
            format (enum): duel format (default: Master Duel)
        cfv:
            lang (enum): Language of the cards (default: en)
            vanguard-first (bool): Put the first vanguard on top of the deck (default: true)
        custom: no option available
  -output string
        destination folder (defaults to the current folder) (cannot be used with "-chest")
  -template string
        download each images and create a deck template instead of referring to each image individually. Choose from the following uploaders:
            imgur: Upload the template(s) anonymously to Imgur.
            manual: Let the user manually upload the template.
  -version
        display the version information
Usage examples
  • Generate Angelic Arrmy.json under the TTS Saved Objects folder (%USERPROFILE%/Documents/My Games/Tabletop Simulator/Saves/Saved Objects on Windows), with normal size images from Scryfall and ruling information in the card's description:

    tts-deckconverter -chest / -option quality=normal -option rulings=true https://www.mtggoldfish.com/deck/2062036#paper
    
  • Generate Test Deck.json under the decks folder:

    tts-deckconverter -mode mtg -output decks "Test Deck.txt"
    
  • Generate Starter Deck: Codebreaker.json under the YGO/Starter folder in the TTS Saved Objects:

    tts-deckconverter -chest /YGO/Starter "Starter Deck: Codebreaker.ydk"
    
  • Generate a single card from the standard input:

    echo "1 Black Lotus" | tts-deckconverter -mode mtg -name "Black Lotus" -
    

Aknowledgements

Icon and card backs created using the YGO Card Template (© 2017 - 2020 HolyCrapWhiteDragon).

Documentation

Index

Constants

This section is empty.

Variables

View Source
var FileExtHandlers map[string]plugins.FileHandler

FileExtHandlers are all the registered file extension handlers.

View Source
var Plugins map[string]plugins.Plugin

Plugins is the list of registered plugins.

View Source
var URLHandlers []plugins.URLHandler

URLHandlers are all the registered URL handlers.

Functions

func AvailablePlugins

func AvailablePlugins() []string

AvailablePlugins lists the registered plugins, sorted.

func Parse

func Parse(target, mode string, options map[string]string) ([]*plugins.Deck, error)

Parse a URL or file and generate a list of decks from it.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL