Exemplo n.º 1
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)),
Exemplo n.º 2
0
 def __json__(self):
     return load.export_print(self.print_)