Skip to content

Commit

Permalink
lower python version and rename package to bitsrun
Browse files Browse the repository at this point in the history
  • Loading branch information
spencerwooo committed Oct 6, 2022
1 parent 2b9fbcc commit fbd4a62
Show file tree
Hide file tree
Showing 10 changed files with 142 additions and 69 deletions.
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
# 10_0_0_55
# bitsrun

> A headless login / logout script for 10.0.0.55.
> A headless login / logout script for 10.0.0.55 at BIT.
## Install

You need at least Python 3.8.
You need at least Python 3.7.

```bash
python -m pip install 10_0_0_55
python -m pip install bitsrun
```

## Usage

### CLI

```bash
python -m 10_0_0_55 login -u|--username xxxx -p|--password xxxx
python -m 10_0_0_55 logout -u|--username xxxx -p|--password xxxx
python -m bitsrun login -u|--username xxxx -p|--password xxxx
python -m bitsrun logout -u|--username xxxx -p|--password xxxx
```

Optional params:
Expand All @@ -37,22 +37,22 @@ Either `/etc/bit-user.json` or `~/.config/bit-user.json`:
```

```bash
python -m 10_0_0_55 login
python -m 10_0_0_55 logout
python -m bitsrun login
python -m bitsrun logout
```

### Raycast script (macOS)

![Raycast Script Screenshot](assets/raycast-screenshot.png)

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 `10_0_0_55` with this Python interpreter or setup your own Python interpreter path in the script.
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.

<details>
<summary>Using networkmanager-dispatcher (deprecated).</summary>

### 使用 NetworkManager-dispacher

`10_0_0_55.py` 复制为 `/usr/bin/bit-login`,权限+x
`bitsrun.py` 复制为 `/usr/bin/bit-login`,权限+x

`login-bit.sh` 复制到 `/etc/NetworkManager/dispatcher.d/`

Expand All @@ -73,7 +73,7 @@ poetry install
# Enter poetry virtual env
poetry shell

# ... normal stuff with python -m 10_0_0_55 ...
# ... normal stuff with python -m bitsrun ...
```

Build:
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
183 changes: 128 additions & 55 deletions poetry.lock

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
[tool.poetry]
name = "10_0_0_55"
version = "2.0.4"
name = "bitsrun"
version = "3.0.0"
description = "A headless login / logout script for 10.0.0.55"
authors = ["spencerwooo <[email protected]>"]
license = "MIT"

[tool.poetry.dependencies]
python = ">=3.8"
python = ">=3.7"
requests = "^2.27.1"

[tool.poetry.dev-dependencies]
Expand Down

0 comments on commit fbd4a62

Please sign in to comment.