about summary refs log tree commit diff stats
path: root/update/library/trunk/xmlrpc
diff options
context:
space:
mode:
authorKelly Rauchenberger <fefferburbia@gmail.com>2008-09-20 16:04:35 +0000
committerKelly Rauchenberger <fefferburbia@gmail.com>2008-09-20 16:04:35 +0000
commita5be7960294b174face2ef8678c87ce2ada7cd6b (patch)
tree96314c1b1ffc38fe695011a161636881df69ac54 /update/library/trunk/xmlrpc
parent1ffda8b986326d994b036c81c8050bc91151f4c7 (diff)
downloadinstadisc-a5be7960294b174face2ef8678c87ce2ada7cd6b.tar.gz
instadisc-a5be7960294b174face2ef8678c87ce2ada7cd6b.tar.bz2
instadisc-a5be7960294b174face2ef8678c87ce2ada7cd6b.zip
Update: Wrote Subversion plugin
Fixes #62
Diffstat (limited to 'update/library/trunk/xmlrpc')
0 files changed, 0 insertions, 0 deletions
* Name.Constant */ .highlight .nd { color: #555555 } /* Name.Decorator */ .highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */ .highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */ .highlight .nl { color: #336699; font-style: italic } /* Name.Label */ .highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */ .highlight .py { color: #336699; font-weight: bold } /* Name.Property */ .highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #336699 } /* Name.Variable */ .highlight .ow { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
#include <Magick++.h>
#include <tclap/CmdLine.h>

#include <iostream>
#include <string>

#include "cardset.h"
#include "imagestore.h"
#include "wizard.h"

int main(int argc, char** argv) {
  Magick::InitializeMagick(nullptr);

  std::random_device randomDevice;
  std::mt19937 rng(5);  // randomDevice());

  try {
    TCLAP::CmdLine cmd("Spelling things with MTG cards", ' ', "1.0");

    TCLAP::ValueArg<std::string> cardsPath("c", "cards",
                                           "Path to the card definitions file",
                                           true, "", "filename");
    cmd.add(cardsPath);

    TCLAP::ValueArg<std::string> cachePath(
        "i", "image-cache", "Path to store cached card image downloads", true,
        "", "filename");
    cmd.add(cachePath);

    TCLAP::ValueArg<std::string> outputPath(
        "o", "output", "Path to write image output to", true, "", "filename");
    cmd.add(outputPath);

    TCLAP::ValueArg<std::string> textInput("t", "text", "Text to render", true,
                                           "", "text");
    cmd.add(textInput);

    cmd.parse(argc, argv);

    cardset cards(cardsPath.getValue());
    imagestore images(cachePath.getValue());

    wizard app(cards, images, textInput.getValue(), rng);
    Magick::Image result = app.run();
    result.write(outputPath.getValue());
  } catch (const TCLAP::ArgException& e) {
    std::cerr << "Error: " << e.error() << " for arg " << e.argId()
              << std::endl;
  }
}