From 8e66bf1270511f551d31c69e903191058f449031 Mon Sep 17 00:00:00 2001 From: Uniminin <42061747+Uniminin@users.noreply.github.com> Date: Wed, 5 Feb 2020 17:01:55 +0600 Subject: [PATCH 01/10] idk. --- src/bin/main.py | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/src/bin/main.py b/src/bin/main.py index 5b65422..d895ccc 100644 --- a/src/bin/main.py +++ b/src/bin/main.py @@ -1 +1,30 @@ -print("FIXME: Translate zernit in python - resovle parsed arguments in cli and invoke appropriate function in '$repodir/src/subcoms'") \ No newline at end of file +import sys +from termcolor import cprint + + +def cli_arg(): + if len(sys.argv) == 1: + cprint("No Arguments Were Passed. Type -h to view basic usage.", "red") + exit() + # sys.arg[1] is the file itself. + elif sys.argv[1].lower() == "-h": + cprint(""" +File used as bankend to parse arguments and options into subcommands + +SYNOPSIS: command OPTION [SUBCOMS] + +OPTIONS: + -G, --gui Open Graphical User Interface + +SUBCOMS (Subcommands): + resolve resolve package on the system +""", "green") + else: + cprint("Incorrect Argument! Type -h to view basic usage.", "red") + + +if __name__ == '__main__': + try: + cli_arg() + except IndexError: + pass From 0346f906af79281544dedb10de8fcf0a2b0d441f Mon Sep 17 00:00:00 2001 From: Uniminin <42061747+Uniminin@users.noreply.github.com> Date: Wed, 5 Feb 2020 17:02:42 +0600 Subject: [PATCH 02/10] Update main.py --- src/bin/main.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/bin/main.py b/src/bin/main.py index d895ccc..163b464 100644 --- a/src/bin/main.py +++ b/src/bin/main.py @@ -19,6 +19,7 @@ OPTIONS: SUBCOMS (Subcommands): resolve resolve package on the system """, "green") + else: cprint("Incorrect Argument! Type -h to view basic usage.", "red") From 11c449edd8c3a54b010b9ee5ff011fd0380b0407 Mon Sep 17 00:00:00 2001 From: Kreyren Date: Wed, 5 Feb 2020 12:17:15 +0000 Subject: [PATCH 03/10] ping --- ping | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 ping diff --git a/ping b/ping new file mode 100644 index 0000000..e69de29 From be6591da21aa42fba814fcccace109da068cca5a Mon Sep 17 00:00:00 2001 From: Uniminin <42061747+Uniminin@users.noreply.github.com> Date: Wed, 5 Feb 2020 19:09:48 +0600 Subject: [PATCH 04/10] Create requirements.txt --- src/bin/rpython/requirements.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 src/bin/rpython/requirements.txt diff --git a/src/bin/rpython/requirements.txt b/src/bin/rpython/requirements.txt new file mode 100644 index 0000000..3ec90df --- /dev/null +++ b/src/bin/rpython/requirements.txt @@ -0,0 +1 @@ +termcolor==1.1.0 From 0ea413cc681605e36fc9c3594fe2633f1d779c50 Mon Sep 17 00:00:00 2001 From: Uniminin <42061747+Uniminin@users.noreply.github.com> Date: Wed, 5 Feb 2020 19:10:04 +0600 Subject: [PATCH 05/10] Delete main.py --- src/bin/main.py | 31 ------------------------------- 1 file changed, 31 deletions(-) delete mode 100644 src/bin/main.py diff --git a/src/bin/main.py b/src/bin/main.py deleted file mode 100644 index 163b464..0000000 --- a/src/bin/main.py +++ /dev/null @@ -1,31 +0,0 @@ -import sys -from termcolor import cprint - - -def cli_arg(): - if len(sys.argv) == 1: - cprint("No Arguments Were Passed. Type -h to view basic usage.", "red") - exit() - # sys.arg[1] is the file itself. - elif sys.argv[1].lower() == "-h": - cprint(""" -File used as bankend to parse arguments and options into subcommands - -SYNOPSIS: command OPTION [SUBCOMS] - -OPTIONS: - -G, --gui Open Graphical User Interface - -SUBCOMS (Subcommands): - resolve resolve package on the system -""", "green") - - else: - cprint("Incorrect Argument! Type -h to view basic usage.", "red") - - -if __name__ == '__main__': - try: - cli_arg() - except IndexError: - pass From 2ad3b81fe38ba1c23aec767b0cd3a60cb140e3bb Mon Sep 17 00:00:00 2001 From: Uniminin <42061747+Uniminin@users.noreply.github.com> Date: Wed, 5 Feb 2020 19:10:24 +0600 Subject: [PATCH 06/10] Create zernit.py --- src/bin/rpython/zernit.py | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 src/bin/rpython/zernit.py diff --git a/src/bin/rpython/zernit.py b/src/bin/rpython/zernit.py new file mode 100644 index 0000000..163b464 --- /dev/null +++ b/src/bin/rpython/zernit.py @@ -0,0 +1,31 @@ +import sys +from termcolor import cprint + + +def cli_arg(): + if len(sys.argv) == 1: + cprint("No Arguments Were Passed. Type -h to view basic usage.", "red") + exit() + # sys.arg[1] is the file itself. + elif sys.argv[1].lower() == "-h": + cprint(""" +File used as bankend to parse arguments and options into subcommands + +SYNOPSIS: command OPTION [SUBCOMS] + +OPTIONS: + -G, --gui Open Graphical User Interface + +SUBCOMS (Subcommands): + resolve resolve package on the system +""", "green") + + else: + cprint("Incorrect Argument! Type -h to view basic usage.", "red") + + +if __name__ == '__main__': + try: + cli_arg() + except IndexError: + pass From a72e502cc30354b9b36afbb625568724da73fe89 Mon Sep 17 00:00:00 2001 From: Uniminin <42061747+Uniminin@users.noreply.github.com> Date: Wed, 5 Feb 2020 19:12:19 +0600 Subject: [PATCH 07/10] Create makefile --- src/bin/rpython/makefile | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 src/bin/rpython/makefile diff --git a/src/bin/rpython/makefile b/src/bin/rpython/makefile new file mode 100644 index 0000000..74df0db --- /dev/null +++ b/src/bin/rpython/makefile @@ -0,0 +1,2 @@ +run: + pip install -r requirements.txt From e5cabe260b76afbd1bea3faec8884a9ed8a9f9bc Mon Sep 17 00:00:00 2001 From: Uniminin <42061747+Uniminin@users.noreply.github.com> Date: Wed, 5 Feb 2020 19:18:12 +0600 Subject: [PATCH 08/10] Create README.md --- src/bin/rpython/README.md | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 src/bin/rpython/README.md diff --git a/src/bin/rpython/README.md b/src/bin/rpython/README.md new file mode 100644 index 0000000..6946685 --- /dev/null +++ b/src/bin/rpython/README.md @@ -0,0 +1,8 @@ +# Requirements +* Python3.6 - python3.8.x +* pip -> termcolor + +# Run +```bash +$ python3.x -m pip install -r requirements.txt ; python3.x zernit.py +``` From e93184357976d2e0068e42343d8ccf95ece6c2e7 Mon Sep 17 00:00:00 2001 From: Uniminin <42061747+Uniminin@users.noreply.github.com> Date: Wed, 5 Feb 2020 19:41:13 +0600 Subject: [PATCH 09/10] Update makefile --- src/bin/rpython/makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/bin/rpython/makefile b/src/bin/rpython/makefile index 74df0db..00cb4f3 100644 --- a/src/bin/rpython/makefile +++ b/src/bin/rpython/makefile @@ -1,2 +1,5 @@ +requires: python3.6+ +requires: pip3 + run: pip install -r requirements.txt From 129db455353c176350b6b891db71097a09822d86 Mon Sep 17 00:00:00 2001 From: Kreyren Date: Fri, 7 Feb 2020 12:24:03 +0000 Subject: [PATCH 10/10] fixes --- .github/README.md | 2 +- Makefile | 4 ++-- ping | 0 requirements.txt | 3 +++ src/bin/README.md | 2 +- src/bin/{rpython/zernit.py => main.py} | 6 ++++++ src/bin/rpython/README.md | 8 -------- src/bin/rpython/makefile | 5 ----- src/bin/rpython/requirements.txt | 1 - 9 files changed, 13 insertions(+), 18 deletions(-) delete mode 100644 ping create mode 100644 requirements.txt rename src/bin/{rpython/zernit.py => main.py} (86%) delete mode 100644 src/bin/rpython/README.md delete mode 100644 src/bin/rpython/makefile delete mode 100644 src/bin/rpython/requirements.txt diff --git a/.github/README.md b/.github/README.md index f665044..7c04970 100644 --- a/.github/README.md +++ b/.github/README.md @@ -17,4 +17,4 @@ https://codesandbox.io/s/github/RXT0112/RXT0112 ## ABSTRACT Package manager capable of source and binary import/export with tracking in `world` file and options. -Developed with GUI in mind +Developed with GUI in mind \ No newline at end of file diff --git a/Makefile b/Makefile index 83e06ac..a5fd3eb 100644 --- a/Makefile +++ b/Makefile @@ -33,9 +33,9 @@ build-brainfuck: @ printf 'FIXME: %s\n' "translate zernit in brainfuck" @ exit 1 +# FIXME: requires python3.6+ and pip3 build-python: - @ printf 'FIXME: %s\n' "translate zernit in python" - @ exit 1 + @ pip3 install -r requirements.txt ## CLEAN ## diff --git a/ping b/ping deleted file mode 100644 index e69de29..0000000 diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..b7a7fb0 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,3 @@ +# Dependencies for python + +termcolor==1.1.0 \ No newline at end of file diff --git a/src/bin/README.md b/src/bin/README.md index 533d4f8..9a42c3d 100644 --- a/src/bin/README.md +++ b/src/bin/README.md @@ -11,4 +11,4 @@ Resolve arguments to subcommands and provide backend for libraries/modules if re ### Practical examples end-user inputs `main help` through cli -> Display help message -end-user inputs `main resolve app-compat/wine` -> Resolve wine on end-user's system if compatible system and toolchain is used \ No newline at end of file +end-user inputs `main resolve app-compat/wine` -> Resolve wine on end-user's system if compatible system and toolchain is used diff --git a/src/bin/rpython/zernit.py b/src/bin/main.py similarity index 86% rename from src/bin/rpython/zernit.py rename to src/bin/main.py index 163b464..8e62190 100644 --- a/src/bin/rpython/zernit.py +++ b/src/bin/main.py @@ -1,6 +1,12 @@ import sys from termcolor import cprint +""" + FIXME-DOCS: Add documentation + + Made for Python 3.6 ~ Python 3.8.1 + Requires pip for termcolor +""" def cli_arg(): if len(sys.argv) == 1: diff --git a/src/bin/rpython/README.md b/src/bin/rpython/README.md deleted file mode 100644 index 6946685..0000000 --- a/src/bin/rpython/README.md +++ /dev/null @@ -1,8 +0,0 @@ -# Requirements -* Python3.6 - python3.8.x -* pip -> termcolor - -# Run -```bash -$ python3.x -m pip install -r requirements.txt ; python3.x zernit.py -``` diff --git a/src/bin/rpython/makefile b/src/bin/rpython/makefile deleted file mode 100644 index 00cb4f3..0000000 --- a/src/bin/rpython/makefile +++ /dev/null @@ -1,5 +0,0 @@ -requires: python3.6+ -requires: pip3 - -run: - pip install -r requirements.txt diff --git a/src/bin/rpython/requirements.txt b/src/bin/rpython/requirements.txt deleted file mode 100644 index 3ec90df..0000000 --- a/src/bin/rpython/requirements.txt +++ /dev/null @@ -1 +0,0 @@ -termcolor==1.1.0