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

19 lines
No EOL
786 B
Python
Executable file

#!/usr/bin/env python3
import argparse
import banana
if __name__ == "__main__":
parser = argparse.ArgumentParser(description="Convert dec number to banana")
parser.add_argument("num", help="Number to be converted", type=int)
parser.add_argument("--alphastart", help="Set starting alphabet", type=int)
parser.add_argument("--shiftend", help="Set shift for ending alphabet", type=int)
parser.add_argument("--minlength", help="Set minimum length", type=int)
parser.add_argument("--alphabet", help="Set alphabet")
args = parser.parse_args()
alphabet = None
if not args.alphabet is None:
alphabet = [list(i) for i in args.alphabet.split(",")]
print(banana.dec2banana(args.num, args.alphastart, args.shiftend, args.minlength, alphabet))