1
0
Fork 0
forked from itec/banana
banana/banana2dec.py

14 lines
603 B
Python
Raw Permalink Normal View History

2020-08-29 18:44:55 +02:00
#!/usr/bin/env python3
2020-08-30 14:59:07 +02:00
import argparse
2020-08-29 18:44:55 +02:00
import banana
if __name__ == "__main__":
2020-08-30 14:59:07 +02:00
parser = argparse.ArgumentParser(description="Convert banana string to dec")
parser.add_argument("banana", help="String to be converted")
2020-08-31 18:21:24 +02:00
parser.add_argument("--dictionary", help="Set dictionary", type=list, nargs='+')
parser.add_argument("--dictstart", help="Set starting dictionary", type=int)
parser.add_argument("--shiftend", help="Set shift for ending dictionary", type=int)
2020-08-30 14:59:07 +02:00
args = parser.parse_args()
print(banana.banana2dec(args.banana, args.dictstart, args.shiftend, args.dictionary))