https://github.com/bitnp/bitsrun

A headless login / logout script for 10.0.0.55 at BIT. 北京理工大学 10.0.0.55 校园网登录登出的 Python 实现

https://github.com/bitnp/bitsrun

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (12.5%) to scientific vocabulary

Keywords

beijing-institute-of-technology bit srun srun-client srun-login
Last synced: 6 months ago · JSON representation

Repository

A headless login / logout script for 10.0.0.55 at BIT. 北京理工大学 10.0.0.55 校园网登录登出的 Python 实现

Basic Info
Statistics
  • Stars: 82
  • Watchers: 2
  • Forks: 15
  • Open Issues: 3
  • Releases: 11
Topics
beijing-institute-of-technology bit srun srun-client srun-login
Created over 7 years ago · Last pushed 6 months ago
Metadata Files
Readme License

README.md

bitsrun

Ruff Pre-commit PyPI Publish PyPI PyPI - Python Version PyPI - Downloads

A headless login / logout script for 10.0.0.55 at BIT.

Blazingly™ Fast Rust re-implementation of bitsrun available at spencerwooo/bitsrun, if you require or prefer a single compiled executable (or 🦀 Rust).
🌱 A Magic Bash re-implementation of bitsrun available at BITNP/bitsrun.sh, if you require or prefer a single bash script.

Install

You need at least Python 3.8. We recommend installing with pipx.

shell python3 -m pip install --user pipx python3 -m pipx ensurepath

After which, install bitsrun with pipx.

shell pipx install bitsrun

Alternatively, you can download a self-contained executable from GitHub Releases if you are working from an environment that does not have internet access.

Usage

CLI

Check login status of your device.

bitsrun status

```text Usage: bitsrun status [OPTIONS]

Check current network login status.

Options: --json / --no-json Output in JSON format. --help Show this message and exit. ```

Note: this is the output of bitsrun status --help.

Login or logout with your username and password.

bitsrun login

```text Usage: bitsrun login/logout [OPTIONS]

Log into or out of the BIT network.

Options: -u, --username TEXT Your username. -p, --password TEXT Your password. -v, --verbose Verbosely echo API response. --help Show this message and exit. ```

Note: this is the output of bitsrun login/logout --help.

Credentials config

Create new file named bit-user.json:

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)

On unix, set the file permission to 600, i.e., only read/writeable by the owner:

shell chmod 600 path/to/bit-user.json

Now you can simply call:

shell 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:

shell bitsrun config-paths

Raycast script (macOS)

raycast 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.

Developing

Create virtual environment and install deps:

shell python -m venv venv source venv/bin/activate pip install -e .

Running CLI entry:

shell python src/bitsrun/cli.py

Build:

shell pip install setuptools build python -m build

Credits and related

License

WTFPL License

Owner

  • Name: NetPioneer Association
  • Login: BITNP
  • Kind: organization
  • Email: webmaster@bitnp.net
  • Location: Beijing, China

网络开拓者协会 at Beijing Institute of Technology, China

GitHub Events

Total
  • Issues event: 1
  • Watch event: 24
  • Delete event: 9
  • Issue comment event: 6
  • Push event: 22
  • Pull request review event: 1
  • Pull request event: 20
  • Create event: 9
Last Year
  • Issues event: 1
  • Watch event: 24
  • Delete event: 9
  • Issue comment event: 6
  • Push event: 22
  • Pull request review event: 1
  • Pull request event: 20
  • Create event: 9

Committers

Last synced: almost 3 years ago

All Time
  • Total Commits: 95
  • Total Committers: 9
  • Avg Commits per committer: 10.556
  • Development Distribution Score (DDS): 0.358
Top Committers
Name Email Commits
spencerwooo s****o@o****m 61
renovate[bot] 2****]@u****m 10
felinae98 7****7@q****m 7
YinTianliang b****4@g****m 7
Y.D.X 7****7@u****m 3
Aloxaf a****x@g****m 3
Spencer (Shangbo Wu) s****o@g****m 2
everything411 e****1@1****m 1
lsylusiyao l****o@q****m 1
Committer Domains (Top 20 + Academic)
qq.com: 2 163.com: 1

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 4
  • Total pull requests: 13
  • Average time to close issues: about 11 hours
  • Average time to close pull requests: about 2 months
  • Total issue authors: 4
  • Total pull request authors: 2
  • Average comments per issue: 1.5
  • Average comments per pull request: 0.08
  • Merged pull requests: 11
  • Bot issues: 0
  • Bot pull requests: 12
Past Year
  • Issues: 1
  • Pull requests: 11
  • Average time to close issues: N/A
  • Average time to close pull requests: 27 days
  • Issue authors: 1
  • Pull request authors: 2
  • Average comments per issue: 0.0
  • Average comments per pull request: 0.09
  • Merged pull requests: 9
  • Bot issues: 0
  • Bot pull requests: 10
Top Authors
Issue Authors
  • CPT-KK (1)
  • KJH-x (1)
  • dongzhengru (1)
  • YDX-2147483647 (1)
Pull Request Authors
  • renovate[bot] (12)
  • everything411 (1)
Top Labels
Issue Labels
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 101 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 17
  • Total maintainers: 1
pypi.org: bitsrun

A headless login / logout script for 10.0.0.55

  • Versions: 17
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 101 Last month
Rankings
Dependent packages count: 6.6%
Downloads: 9.4%
Stargazers count: 12.7%
Forks count: 14.5%
Average: 14.8%
Dependent repos count: 30.6%
Maintainers (1)
Last synced: 7 months ago

Dependencies

.github/workflows/ci.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
  • pdm-project/setup-pdm v3 composite
  • pre-commit/action v3.0.0 composite
.github/workflows/python-publish.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
  • pdm-project/setup-pdm v3 composite
  • pypa/gh-action-pypi-publish 7eb3b701d11256e583f5b49899c5e7203deab573 composite
.github/workflows/release.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
  • svenstaro/upload-release-action v2 composite
pyproject.toml pypi
  • click >=8.1.3
  • httpx >=0.24.0
  • humanize >=4.5.0
  • platformdirs >=2.6.2
  • rich >=13.3.5