Skip to main content

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)

Raycast Script Screenshot

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

WTFPL License

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bitsrun-3.2.2.tar.gz (6.4 kB view hashes)

Uploaded Source

Built Distribution

bitsrun-3.2.2-py3-none-any.whl (7.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page