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.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file bitsrun-3.2.2.tar.gz.
File metadata
- Download URL: bitsrun-3.2.2.tar.gz
- Upload date:
- Size: 6.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.2.2 CPython/3.11.0 Darwin/22.2.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
48fb4d5247ac82a5907e3c6ede2f3a06c77393e269a54b58ef0e5e6748a05d65
|
|
| MD5 |
72f5e163a4b870146940a0421a743733
|
|
| BLAKE2b-256 |
6f7216b73628f0fb054df9c6f1d2540b96c074a85545904bc20bde1c7ca7c47b
|
File details
Details for the file bitsrun-3.2.2-py3-none-any.whl.
File metadata
- Download URL: bitsrun-3.2.2-py3-none-any.whl
- Upload date:
- Size: 7.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.2.2 CPython/3.11.0 Darwin/22.2.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
65d4f9f60ab545cabbaea0e666c2dcc62f74ba534b53c5bc573bc036a4ce9b85
|
|
| MD5 |
2e3531eb0b5bf0d9d7db47e3e78085bd
|
|
| BLAKE2b-256 |
a05470f7121d0760ce1dca3e5e64182d73c9667518a5ed22839edef05e482b68
|