huik-module
How to install:
pip install huik-module
Command Line Interface Usage
Command Line Interface are built with Click.
Use command --help for built in help info.
tool list module tl
Tool list (tl) provide a way to make user defined shortcuts for frequently used shell commands.
-
tlto start tool list. -
tl --helpto show help menu. -
tl [command key]to quickly invoke saved shell command.Hint: Shell commands are ran in a new process, if a command is changing shell behavior this change will not be reflected in the current shell. If user want to retain such behavior, one way to use
exec shellorexec zshat the end of command. (see folder module for example)
folder module fd
Folder (fd) can mark folder as favorites and let user quickly navigate to that folder
in terminal.
-
fd [favorite folder shortcut]cd to saved folder. -
fd -cconfig use bash or zsh as default shell.Under the hood,
fduses python subprocess to run shell script.subprocess.run("cd /path/to/folder;exec zsh",shell=True,)
The subprocess start another process and run shell command. Without
exec zsh, after the subprocess exits, the current shell will remain in the same folder.exec zshorexec bashstart a shell in the subprocess and allow user input in that process.
OK module ok
OK module let user write / install plugins to extend its function.
OK module also manages to import/export/sync configuration and plugins.
Some included plugins are: Dictionary def; calculator cal; github tools git
One would need to use plugins if simple shell command is not sufficient in certain complex using scenarios. For example, to handle user inputs or pull data from the web.
okorok --helpto show help menu.ok syncto configure Github gist id and user token for upload settings to github. User token is not needed for download public gist settings but required for create/upload settigns.ok [command]to run plugin commands.ok plugins --helpto show help menu for configure plugins.ok plugins -sfor--show-foldershow plugins folder.
Plugins
Plugins are single python files and stored under cli/plugins
folder. These individual files are read and loaded at runtime.
Basic structure:
import click
# other imports if needed
@click.command() # optionally use click.group() to allow multicommands.
@click.option('--option') # add other options or arguments if needed.
def cli(option):
"""
Documents
"""
# handle option
Metadata
Release files for huik-module 0.1.22
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| huik-module-0.1.22.tar.gz | 5.8 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| huik_module-0.1.22-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 11.8 MB
Release files / huik-module-0.1.22.tar.gz
| Download URL | huik-module-0.1.22.tar.gz |
|---|---|
| Size | 5.8 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e64402a4a428b98b38c2a5339cf2cc14e33bd9d2031724a6c927123be23715e6
|
|
BLAKE2b-256 checksum How to use checksums |
5e12485352104e097324f0851386996a18d68f17745ae87ffe4e4530b5726f7c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4
|
Release files / huik_module-0.1.22-py3-none-any.whl
| Download URL | huik_module-0.1.22-py3-none-any.whl |
|---|---|
| Size | 6.0 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a1e48c7d4d8f6785d625018df9a8d00e1c53c7a3e22acbad071b1ddca778e1a6
|
|
BLAKE2b-256 checksum How to use checksums |
e00cc0676054e6a43a7b6dd0d99372cbaef3326f59a7c188cf713b0db7c8c48c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4
|