From 081eaeb01d69d48076b42c12366b997cdf559def Mon Sep 17 00:00:00 2001 From: itec78 Date: Mon, 31 Aug 2020 18:28:53 +0200 Subject: [PATCH] Added ribes avocado + fixes --- avocado2dec.py | 10 ++++++++++ dec2ananas.py | 4 ++-- dec2avocado.py | 11 +++++++++++ dec2banana.py | 2 +- dec2ribes.py | 11 +++++++++++ ribes2dec.py | 10 ++++++++++ 6 files changed, 45 insertions(+), 3 deletions(-) create mode 100755 avocado2dec.py create mode 100755 dec2avocado.py create mode 100755 dec2ribes.py create mode 100755 ribes2dec.py diff --git a/avocado2dec.py b/avocado2dec.py new file mode 100755 index 0000000..23284f5 --- /dev/null +++ b/avocado2dec.py @@ -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)) diff --git a/dec2ananas.py b/dec2ananas.py index 8406766..269f1cb 100755 --- a/dec2ananas.py +++ b/dec2ananas.py @@ -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() diff --git a/dec2avocado.py b/dec2avocado.py new file mode 100755 index 0000000..781d009 --- /dev/null +++ b/dec2avocado.py @@ -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)) diff --git a/dec2banana.py b/dec2banana.py index 19681cc..da26df4 100755 --- a/dec2banana.py +++ b/dec2banana.py @@ -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) diff --git a/dec2ribes.py b/dec2ribes.py new file mode 100755 index 0000000..03e9172 --- /dev/null +++ b/dec2ribes.py @@ -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)) diff --git a/ribes2dec.py b/ribes2dec.py new file mode 100755 index 0000000..865180f --- /dev/null +++ b/ribes2dec.py @@ -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))