Added ribes avocado + fixes

This commit is contained in:
itec78 2020-08-31 18:28:53 +02:00
parent 0e77ec5ae1
commit 081eaeb01d
6 changed files with 45 additions and 3 deletions

10
avocado2dec.py Executable file
View file

@ -0,0 +1,10 @@
#!/usr/bin/env python3
import argparse
import banana
if __name__ == "__main__":
parser = argparse.ArgumentParser(description="Convert avocado string to dec")
parser.add_argument("avocado", help="String to be converted")
args = parser.parse_args()
print(banana.banana2dec(args.avocado, 1, 0))

View file

@ -3,8 +3,8 @@ 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 = argparse.ArgumentParser(description="Convert dec number to ananas")
parser.add_argument("num", help="Number to be converted", type=int)
parser.add_argument("--minlength", help="Set minimum length", type=int)
args = parser.parse_args()

11
dec2avocado.py Executable file
View file

@ -0,0 +1,11 @@
#!/usr/bin/env python3
import argparse
import banana
if __name__ == "__main__":
parser = argparse.ArgumentParser(description="Convert dec number to avocado")
parser.add_argument("num", help="Number to be converted", type=int)
parser.add_argument("--minlength", help="Set minimum length", type=int)
args = parser.parse_args()
print(banana.dec2banana(args.num, 1, 1, args.minlength))

View file

@ -4,7 +4,7 @@ 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("num", help="Number to be converted", type=int)
parser.add_argument("--dictstart", help="Set starting dictionary", type=int)
parser.add_argument("--shiftend", help="Set shift for ending dictionary", type=int)
parser.add_argument("--minlength", help="Set minimum length", type=int)

11
dec2ribes.py Executable file
View file

@ -0,0 +1,11 @@
#!/usr/bin/env python3
import argparse
import banana
if __name__ == "__main__":
parser = argparse.ArgumentParser(description="Convert dec number to ribes")
parser.add_argument("num", help="Number to be converted", type=int)
parser.add_argument("--minlength", help="Set minimum length", type=int)
args = parser.parse_args()
print(banana.dec2banana(args.num, 1, 1, args.minlength))

10
ribes2dec.py Executable file
View file

@ -0,0 +1,10 @@
#!/usr/bin/env python3
import argparse
import banana
if __name__ == "__main__":
parser = argparse.ArgumentParser(description="Convert ribes string to dec")
parser.add_argument("ribes", help="String to be converted")
args = parser.parse_args()
print(banana.banana2dec(args.ribes, 1, 0))