Linux command line interface package
Project description
Bushi
This package contains functions to handle commands in a Linux based terminal. The main purpose of this package is to replace Shell Script with a simplier Python based functions.
Target
Version 1.0
Major
Terminal input and output formatting.(done since0.1.0)Manage multiple sessions with. (done sincetmuxcommand0.3.0)- Build a ROS based package with
colconcommand. - Manage a Git repository with
gitcommand. - Manage an APT package with
apt-getcommand.
Minor
(aborted,cmd.run()must preserve the output formating.cmd.run()changes to not pipe output)
Changelogs
Version 0.3.0 (14/03/2020)
- Add
tmuxclass that handle multiple session with the following functionalities:- Check existence of a session using
tmux.session_exist(). - Kill a session using
tmux.session_kill(). - Detach from current session using
tmux.detach(). - Run a separate process with output on different session using
tmux.session_run()with the following functionalities:- It will call
bushi-tmux-runnerthat handle how the process is called and how it return the process returncode to the parent process. - It uses to replace
tmux.run()where we want to do a process while viewing its output. - Process failed when the tmux session was detached.
- On keyboard interrupt, or when the process failed, it will continue with detaching the current session.
- It will call
- Check existence of a session using
- Modify functions in
ioas follow:- Change how a process thread is called, it will only be created when needed, else it will be destroyed.
- Call
io.process_stop()instead of changingio.__process_textto stop the process thread. - Add
io.press_enter()function that try to wait forenterkey before continue the program. - Add
io.ask_yes_no()function that will ask question that acceptyesornoinput and return that value asTrueandFalserespectively. If the input is invalid, it will terminate the program.
- Modify a function in
cmdas follow:- Change
cmd.run()to callsubprocess.run()instead ofsubprocess.pOpen()that pipe the output to the parent process.
- Change
Version 0.2.0 (13/03/2020)
- Add
cmdclass that handle subprocess run with the following functionalities:run()to run a subprocess with outputs.runmuted()to run a subprocess without any outputs.
- Add
pathclass that handle files and directories with the following functionalities:- Check existence of files and directories using
isfile(), andisdir(). - Get and change working directory using
getdir()andchangedir()respectively. - Some others functionality that also exist in the
os.path.
- Check existence of files and directories using
- Modify functions in the
ioas follow:- Change how output should behave.
- Modify output format for the process command.
- Change how process symbol be animated.
- Output the duration in the process command.
Version 0.1.0 (12/03/2020)
- Add
ioclass that handle terminal input and output with the following functionalities:- Output to the terminal using
info(),warn(),fail(),succes(),info_list(),warn_list(),fail_list(),success_list(), andprocess(). - Input from the terminal using
ask(), andask_secret(). - Both input and output will emphasize a string between
*. (ex:*here*) - Exit current process using
terminate(). With empty argument, this function will return0. Else, it will output the arguments and return1.
- Output to the terminal using
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
bushi-0.3.0.tar.gz
(5.0 kB
view details)
File details
Details for the file bushi-0.3.0.tar.gz.
File metadata
- Download URL: bushi-0.3.0.tar.gz
- Upload date:
- Size: 5.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.0.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.6.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
673dc63544bfc528e1fe2f041da5d679a6f36dc9d6bf695b04d511a58bebfd87
|
|
| MD5 |
e040ba53413937db58f9bdfd2a6f1a7e
|
|
| BLAKE2b-256 |
8f7da2a70df138ffd27b856185c523dd07c4f6ffc36d4c541082ae1f50f716fc
|