1
0
Fork 0
forked from nortti/tea_cah
tea_cah/dump_deck.py
2019-05-05 23:39:50 +03:00

29 lines
431 B
Python

import sys
import cardcast_api
def main():
code = sys.argv[1]
info = cardcast_api.info(code)
print('%s: %s by %s (%s black, %s white)' % (
info['code'],
info['name'],
info['author']['username'],
info['call_count'],
info['response_count']
))
print()
calls, responses = cardcast_api.cards(code)
for i in calls:
print('_'.join(i))
print()
for i in responses:
print(i)
if __name__ == '__main__':
main()