import yaml import eri.logging as logging import cards import common import scgdecks # ----------------------------- # # Module Constants # # ----------------------------- # # logging and file IO constants logging.getLogger("requests").setLevel(logging.WARNING) logger = logging.getLogger("scrape") logging.configure() # ----------------------------- # # Main routine # # ----------------------------- # def main(decksrc='scg', neo4jurl=common.NEO4J_URL): """do ery ol thang args: decksrc: string, the source of deck database elements we should parse into json for loading into our neo4j database. currently, only "scg" is a supported option (default: scg) neo4jurl: string, the url of the neo4j database into which we will load card and deck info (default: common.NEO4J_URL)
""" import argparse import os import eri.logging as logging import hug import jinja2 # ----------------------------- # # Module Constants # # ----------------------------- # logger = logging.getLogger(__name__) logging.configure() html = hug.get(output=hug.output_format.html) HERE = os.path.dirname(os.path.realpath(__file__)) TEMP_DIR = os.path.join(HERE, 'templates') JINJA_ENV = jinja2.Environment(loader=jinja2.FileSystemLoader(TEMP_DIR)) # ----------------------------- # # routes # # ----------------------------- # @hug.cli() @hug.get(examples='name=Zach&age=31') @hug.local()