Commit Graph

18 Commits

Author SHA1 Message Date
d480d75de2
Removed setup.py for pyproject.toml 2023-07-30 16:04:16 +01:00
e12fa43ed1
Renamed _soypak.py -> soypak-cli.py
Also added logging to file.
2023-07-30 15:57:12 +01:00
9099b4aa1e
Udated README.md 2023-07-30 13:30:15 +01:00
ef81c93d52
Updated README.md
Added a TODO list
2023-07-05 22:26:39 +01:00
d10c635982
Updated help.py
Fixed type for annotation in init method
2023-07-05 21:48:00 +01:00
94d6f8f933
Updated soypakcli.py
soypakcli is responsible for registering all commands, parsing and
invoking the command to run.

- global optional flags are explicitly check first, regardless of the
  number of args.
- if there is no command, the program displays the help message and
  dies.
- fetches the command class for the identified soypak command and
  initialised the class command.
- SoypakCLI@run_command: invokes the `run()` method of a command class
2023-07-05 20:24:27 +01:00
6f8ef85d85
Updated parser.py
- Changed class@SoypakParser => class@_SoypackParser
- class@SoypakParser is now a singleton pattern which handles
  class@_SoypakParser.
- SoypakParser@add_action_command (static method): add a command to the
  action group (argparser).
2023-07-05 19:05:25 +01:00
52044e0b16
Added help.py
Added the soypak help command. When called, it will provide the user
with help information about the soypak command(s) provided as arguments.

- Implements a `__doc__` attribute with summar and usage.
- Overrides the `run()` method from `Command` when inherited.
- Inherits `command.Command` and metaclass `RegisterCommand`.
2023-07-05 19:01:37 +01:00
500ddd2a77
Added command.py
Module is responsible for allowing the creation, registering and
initilisation of soypak commands.

Added class@RegisterCommand:
	- used by command classes as a metaclass. Will be auto-invoked upon
	  the class' declaration.
	- checks if a command is registered already with an existing name.
	- uses the class' `__doc__` attribute to register an entry on the
	  help display message with name and summary.

Added class@Command:
	- Inherited by command classes.
	- Keeps record of the registered commands and the instance of the
	  class which can then be invoked during `get_command()`.
	- Command@get_command (static method): find and return an
	  initialised instance of a command that has been registered.
	  Otherwise return `None`.
	- Command@run (virtual): to be implemented on a child class of
	  `Command`.
2023-07-05 18:35:00 +01:00
5700eea0ed
Updated _soypak.py 2023-07-05 18:34:26 +01:00
ce8365ebe7
Added soypakcli.py
The soypak CLI interface module which handles arg parsing and the initialisation of soypak.
2023-07-04 20:52:59 +01:00
23fd41ce03
Added parser.py
Added soypak parser module using argparse to parse arguments, also have a custom help screen.
2023-07-04 20:51:45 +01:00
14864aff8f
Added _soypak.py
Main entry script for soypak. Preinitalisation will occur here and runs the cli modules.
2023-07-04 20:50:40 +01:00
50f11060e6
Added __version__.py
Added information about soypak
2023-07-04 20:49:48 +01:00
419be2811c
Updated setup.py 2023-07-04 20:47:51 +01:00
b7f572aaab
Added icon logos 2023-07-02 13:46:41 +01:00
9521184a4c
Updated README.md
added icon
2023-07-02 13:45:46 +01:00
f65deb2285
Initial commit 2023-07-01 21:32:54 +01:00