bitsrun-3.5.1
توضیحات
A headless login / logout script for 10.0.0.55
| ویژگی | مقدار |
|---|---|
| سیستم عامل | OS Independent |
| نام فایل | bitsrun-3.5.1 |
| نام | bitsrun |
| نسخه کتابخانه | 3.5.1 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | - |
| ایمیل نویسنده | spencerwooo <spencer.woo@outlook.com> |
| آدرس صفحه اصلی | - |
| آدرس اینترنتی | https://pypi.org/project/bitsrun/ |
| مجوز | WTFPL |
# bitsrun
[](https://github.com/charliermarsh/ruff)
[](https://pdm.fming.dev)
[](https://github.com/BITNP/bitsrun/actions/workflows/ci.yml)
[](https://github.com/BITNP/bitsrun/actions/workflows/python-publish.yml)
[](https://pypi.org/project/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`.
```shell
python3 -m pip install --user pipx
python3 -m pipx ensurepath
```
After which, install `bitsrun` with `pipx`.
```shell
pipx install bitsrun
```
## Usage
### CLI
Check login status of your device.

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

```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`.
### Configuration file
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)
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)

Import the two Raycast scripts from [`./scripts`](./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:
```shell
# Create virtual env and install deps
pdm install
# Enter virtual env
eval $(pdm venv activate)
# Install pre-commit hooks
pre-commit install
```
Build:
```shell
pdm build
```
Publish:
```shell
pdm publish
```
## Credits
- [Aloxaf/10_0_0_55_login](https://github.com/Aloxaf/10_0_0_55_login)
## License
[WTFPL License](LICENSE)
نیازمندی
| مقدار | نام |
|---|---|
| - | click>=8.1.3 |
| - | httpx>=0.23.3 |
| - | humanize>=4.5.0 |
| - | platformdirs>=2.6.2 |
| - | rich>=13.3.1 |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.8 | Python |
نحوه نصب
نصب پکیج whl bitsrun-3.5.1:
pip install bitsrun-3.5.1.whl
نصب پکیج tar.gz bitsrun-3.5.1:
pip install bitsrun-3.5.1.tar.gz