Exemple #1
0
def export_set(session, options):
    from ptcgdex import tcg_tables
    from ptcgdex import load as ptcg_load
    from pokedex.db import util
    sets = []
    for set_ident in options['<set-identifier>']:
        sets.append(util.get(session, tcg_tables.Set, set_ident))
    if options['--all']:
        sets = session.query(tcg_tables.Set)
    for tcg_set in sets:
        print ptcg_load.yaml_dump(ptcg_load.export_set(tcg_set)),
Exemple #2
0
def export(session, options):
    from ptcgdex import tcg_tables
    from ptcgdex import load as ptcg_load
    from pokedex.db import util
    prints = []
    for print_id in options['<print-id>']:
        prints.append(util.get(session, tcg_tables.Print, id=int(print_id)))
    if options['--all']:
        prints = session.query(tcg_tables.Print)
    for tcg_print in prints:
        print ptcg_load.yaml_dump(ptcg_load.export_print(tcg_print)),
Exemple #3
0
 def __call__(self):
     return Response(
         load.yaml_dump(self.parent.__json__()),
         content_type=b'application/x-yaml')