A headless login / logout script for 10.0.0.55
Project description
bitsrun
A headless login / logout script for 10.0.0.55 at BIT.
Install
You need at least Python 3.8. We recommend installing with pipx
.
python3 -m pip install --user pipx
python3 -m pipx ensurepath
After which, install bitsrun
with pipx
.
pipx install bitsrun
Usage
CLI
bitsrun login -u|--username xxxx -p|--password xxxx
bitsrun logout -u|--username xxxx -p|--password xxxx
Optional params:
-s|--silent
: No output what-so-ever.-nc|--no-color
: No color in error or verbose output.-v|--verbose
: Output verbose information including full response from the API.
Config file
Either /etc/bit-user.json
or ~/.config/bit-user.json
:
{
"username": "xxxx",
"password": "xxxx"
}
bitsrun login
bitsrun logout
Raycast script (macOS)
Import the two Raycast scripts from ./scripts
and setup your config file in ~/.config/bit-user.json
. The script uses /usr/bin/python3
by default, so you either need to install bitsrun
with this Python interpreter or setup your own Python interpreter path in the script.
Using networkmanager-dispatcher (deprecated).
使用 NetworkManager-dispacher
将 bitsrun.py
复制为 /usr/bin/bit-login
,权限+x
将 login-bit.sh
复制到 /etc/NetworkManager/dispatcher.d/
将配置文件保存在 /etc/bit-user.json
start 并且 enable NetworkManager-dispatcher
Developing
Install and run:
# Create virtual env and install deps
poetry install
# Enter poetry virtual env
poetry shell
Build:
# Bump version
poetry version x.x.x
# Building the wheel
poetry build
Publish:
poetry publish
License
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.