forked from nortti/tea_cah
29 lines
431 B
Python
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()
|