Skip to main content

A headless login / logout script for 10.0.0.55

Project description

bitsrun

PyPI PyPI - Python Version PyPI - Downloads

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

Usage: bitsrun login/logout [OPTIONS]

  Log in/out the BIT network.

Options:
  -u, --username TEXT  Username.
  -p, --password TEXT  Password.
  -v, --verbose        Verbose output.
  -s, --silent         Silent output.
  -nc, --no-color      No color output.
  --help               Show this message and exit.

Configuration file

Create new file named bit-user.json:

{
    "username": "xxxx",
    "password": "xxxx"
}

This file should be put under the following directory:

  • Windows: %APPDATA%\bitsrun
  • macOS and Linux: ~/.config/bitsrun (Following the XDG spec)

Now you can simply call:

bitsrun login
bitsrun logout

Besides, a system-wide configuration file is supported, and the location also depends on your platform.

To list all possible paths for your system (including those only for backward compatibility), call:

bitsrun config-paths

Raycast script (macOS)

CleanShot 2023-01-22 at 21 55 40@2x

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.

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.3.tar.gz (6.8 kB view hashes)

Uploaded Source

Built Distribution

bitsrun-3.2.3-py3-none-any.whl (7.8 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