Merge pull request #37 from Uniminin/multilang_experiment
This commit is contained in:
commit
20065df6c6
2
.github/README.md
vendored
2
.github/README.md
vendored
@ -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
|
4
Makefile
4
Makefile
@ -56,9 +56,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
|
||||
|
||||
build-vlang:
|
||||
@ printf 'FIXME: %s\n' "translate zernit in vlang"
|
||||
|
3
requirements.txt
Normal file
3
requirements.txt
Normal file
@ -0,0 +1,3 @@
|
||||
# Dependencies for python
|
||||
|
||||
termcolor==1.1.0
|
@ -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
|
||||
end-user inputs `main resolve app-compat/wine` -> Resolve wine on end-user's system if compatible system and toolchain is used
|
||||
|
@ -1 +1,37 @@
|
||||
print("FIXME: Translate zernit in python - resovle parsed arguments in cli and invoke appropriate function in '$repodir/src/subcoms'")
|
||||
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:
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user