srunpy


Namesrunpy JSON
Version 1.0.6.7 PyPI version JSON
download
home_pagehttps://github.com/HofNature/SRunPy-GUI
Summary适用于深澜网关的校园网第三方登录器
upload_time2024-11-24 18:15:24
maintainerNone
docs_urlNone
authorHofNature
requires_python>=3.7
licenseGPL-3.0
keywords srun srunpy srun-client srun-gui srunpy-gui srun-client-gui network login logout gateway
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 校园网自动登陆器(深澜网关专用)

### 支持功能

1. 记住账号密码
2. 开机自动启动
3. 掉线自动重连
4. 从命令行操作

### 界面展示

![界面展示](https://github.com/HofNature/SRunPy-GUI/raw/main/Show.png)

### 使用说明

**方法一:** 通过 `pip` 安装 `srunpy` 并运行 `srunpy`  (推荐)  

```sh
# 需要先安装Python 3.7~3.12
pip install srunpy
srunpy
```
初次启动时会自动创建桌面快捷方式,之后可以直接双击桌面快捷方式启动程序。

本程序默认使用Edge WebView2作为浏览器内核,可修改为QtWebEngine, 可用  

```sh
pip install srunpy[qt]
srunpy --qt
```
**方法二:** 前往 [Github Release](https://github.com/HofNature/SRunPy-GUI/releases) 下载SRunClient.zip,解压后直接运行  

**方法三:** 从Github Clone 本项目,然后安装  

```sh
git clone https://github.com/HofNature/SRunPy-GUI.git
cd SRunPy-GUI
pip install .
srunpy
```

**方法四:** Clone 本项目,使用 `environment.yaml` 创建 Anaconda 环境,然后运行 `srun_client.py`  

```sh
git clone https://github.com/HofNature/SRunPy-GUI.git
conda env create -f environment.yaml
conda activate srunpy
python srun_client.py
```

此方法无需安装Python环境,但无法使用命令行操作,且由于应用程序未签名,可能会被Windows Defender或其他杀毒软件误报。

本程序默认设置为北航网关,其它使用深澜网页认证的用户可以点击界面左侧的设置按钮修改为自己学校的认证地址。

配置文件位于C:\Users\<用户名>\AppData\Roaming\SRunPy,其中的`config.json`文件保存了用户的账号密码等信息。

### 命令行使用说明

本程序也支持命令行操作,以下是一些常用命令:

- 查看网关状态:
    ```sh
    srunpy-cli --info
    ```
- 登录网关:
    ```sh
    srunpy-cli --login --username <你的用户名> --passwd <你的密码>
    ```
- 登出网关:
    ```sh
    srunpy-cli --logout
    ```

### TODO

1. 编写注释
2. 支持 GUI 修改断线重连超时

### 经测试院校

1. 北京航空航天大学 沙河校区

### 致谢

本程序后端基于 [iskoldt/srunauthenticator](https://github.com/iskoldt-X/SRUN-authenticator) 修改

前端基于 [r0x0r/pywebview](https://github.com/r0x0r/pywebview) 开发

界面字体为 [MiSans Medium](https://hyperos.mi.com/font/details/sc)

---

# Campus Network Auto Login Tool (For Srun Gateway)

### Supported Features

1. Remember account and password
2. Auto start on boot
3. Auto reconnect on disconnection
4. Operate from command line

### Interface Display

![Interface Display](https://github.com/HofNature/SRunPy-GUI/raw/main/Show.png)

### Usage Instructions

**Method 1:** Install `srunpy` via `pip` and run `srunpy` (Recommended)

```sh
# Requires Python 3.7~3.12
pip install srunpy
srunpy
```
The first time you start, a desktop shortcut will be created automatically. You can then start the program by double-clicking the desktop shortcut.

This program uses Edge WebView2 as the browser engine by default. It can be changed to QtWebEngine, available with

```sh
pip install srunpy[qt]
srunpy --qt
```
**Method 2:** Go to [Github Release](https://github.com/HofNature/SRunPy-GUI/releases) to download SRunClient.zip, unzip and run directly

**Method 3:** Clone this project from Github and then install

```sh
git clone https://github.com/HofNature/SRunPy-GUI.git
cd SRunPy-GUI
pip install .
srunpy
```

**Method 4:** Clone this project, create an Anaconda environment using `environment.yaml`, and then run `srun_client.py`

```sh
git clone https://github.com/HofNature/SRunPy-GUI.git
conda env create -f environment.yaml
conda activate srunpy
python srun_client.py
```

This method does not require a Python environment, but cannot use command line operations. Also, since the application is unsigned, it may be falsely flagged by Windows Defender or other antivirus software.

This program is set to the Beihang University gateway by default. Other users using Srun web authentication can click the settings button on the left side of the interface to change to their school's authentication address.

The configuration file is located at C:\Users\<username>\AppData\Roaming\SRunPy, where the `config.json` file saves the user's account and password information.

### Command Line Usage Instructions

This program also supports command line operations. Here are some common commands:

- Check gateway status:
    ```sh
    srunpy-cli --info
    ```
- Login to gateway:
    ```sh
    srunpy-cli --login --username <your username> --passwd <your password>
    ```
- Logout from gateway:
    ```sh
    srunpy-cli --logout
    ```

### TODO

1. Write comments
2. Support GUI modification of disconnection reconnection timeout

### Tested Schools

1. Beihang University Shahe Campus

### Acknowledgements

The backend of this program is modified from [iskoldt/srunauthenticator](https://github.com/iskoldt-X/SRUN-authenticator)

The frontend is developed based on [r0x0r/pywebview](https://github.com/r0x0r/pywebview)

The interface font is [MiSans Medium](https://hyperos.mi.com/font/details/sc)
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/HofNature/SRunPy-GUI",
    "name": "srunpy",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": null,
    "keywords": "srun, srunpy, srun-client, srun-gui, srunpy-gui, srun-client-gui, network, login, logout, gateway",
    "author": "HofNature",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/ff/e1/baaffcb2f255eec75acd334da5eedec70947e2c574c0644a7edcd87d04bd/srunpy-1.0.6.7.tar.gz",
    "platform": null,
    "description": "# \u6821\u56ed\u7f51\u81ea\u52a8\u767b\u9646\u5668\uff08\u6df1\u6f9c\u7f51\u5173\u4e13\u7528\uff09\r\n\r\n### \u652f\u6301\u529f\u80fd\r\n\r\n1. \u8bb0\u4f4f\u8d26\u53f7\u5bc6\u7801\r\n2. \u5f00\u673a\u81ea\u52a8\u542f\u52a8\r\n3. \u6389\u7ebf\u81ea\u52a8\u91cd\u8fde\r\n4. \u4ece\u547d\u4ee4\u884c\u64cd\u4f5c\r\n\r\n### \u754c\u9762\u5c55\u793a\r\n\r\n![\u754c\u9762\u5c55\u793a](https://github.com/HofNature/SRunPy-GUI/raw/main/Show.png)\r\n\r\n### \u4f7f\u7528\u8bf4\u660e\r\n\r\n**\u65b9\u6cd5\u4e00:** \u901a\u8fc7 `pip` \u5b89\u88c5 `srunpy` \u5e76\u8fd0\u884c `srunpy`  (\u63a8\u8350)  \r\n\r\n```sh\r\n# \u9700\u8981\u5148\u5b89\u88c5Python 3.7~3.12\r\npip install srunpy\r\nsrunpy\r\n```\r\n\u521d\u6b21\u542f\u52a8\u65f6\u4f1a\u81ea\u52a8\u521b\u5efa\u684c\u9762\u5feb\u6377\u65b9\u5f0f\uff0c\u4e4b\u540e\u53ef\u4ee5\u76f4\u63a5\u53cc\u51fb\u684c\u9762\u5feb\u6377\u65b9\u5f0f\u542f\u52a8\u7a0b\u5e8f\u3002\r\n\r\n\u672c\u7a0b\u5e8f\u9ed8\u8ba4\u4f7f\u7528Edge WebView2\u4f5c\u4e3a\u6d4f\u89c8\u5668\u5185\u6838\uff0c\u53ef\u4fee\u6539\u4e3aQtWebEngine, \u53ef\u7528  \r\n\r\n```sh\r\npip install srunpy[qt]\r\nsrunpy --qt\r\n```\r\n**\u65b9\u6cd5\u4e8c:** \u524d\u5f80 [Github Release](https://github.com/HofNature/SRunPy-GUI/releases) \u4e0b\u8f7dSRunClient.zip,\u89e3\u538b\u540e\u76f4\u63a5\u8fd0\u884c  \r\n\r\n**\u65b9\u6cd5\u4e09:** \u4eceGithub Clone \u672c\u9879\u76ee\uff0c\u7136\u540e\u5b89\u88c5  \r\n\r\n```sh\r\ngit clone https://github.com/HofNature/SRunPy-GUI.git\r\ncd SRunPy-GUI\r\npip install .\r\nsrunpy\r\n```\r\n\r\n**\u65b9\u6cd5\u56db:** Clone \u672c\u9879\u76ee\uff0c\u4f7f\u7528 `environment.yaml` \u521b\u5efa Anaconda \u73af\u5883\uff0c\u7136\u540e\u8fd0\u884c `srun_client.py`  \r\n\r\n```sh\r\ngit clone https://github.com/HofNature/SRunPy-GUI.git\r\nconda env create -f environment.yaml\r\nconda activate srunpy\r\npython srun_client.py\r\n```\r\n\r\n\u6b64\u65b9\u6cd5\u65e0\u9700\u5b89\u88c5Python\u73af\u5883\uff0c\u4f46\u65e0\u6cd5\u4f7f\u7528\u547d\u4ee4\u884c\u64cd\u4f5c\uff0c\u4e14\u7531\u4e8e\u5e94\u7528\u7a0b\u5e8f\u672a\u7b7e\u540d\uff0c\u53ef\u80fd\u4f1a\u88abWindows Defender\u6216\u5176\u4ed6\u6740\u6bd2\u8f6f\u4ef6\u8bef\u62a5\u3002\r\n\r\n\u672c\u7a0b\u5e8f\u9ed8\u8ba4\u8bbe\u7f6e\u4e3a\u5317\u822a\u7f51\u5173\uff0c\u5176\u5b83\u4f7f\u7528\u6df1\u6f9c\u7f51\u9875\u8ba4\u8bc1\u7684\u7528\u6237\u53ef\u4ee5\u70b9\u51fb\u754c\u9762\u5de6\u4fa7\u7684\u8bbe\u7f6e\u6309\u94ae\u4fee\u6539\u4e3a\u81ea\u5df1\u5b66\u6821\u7684\u8ba4\u8bc1\u5730\u5740\u3002\r\n\r\n\u914d\u7f6e\u6587\u4ef6\u4f4d\u4e8eC:\\Users\\<\u7528\u6237\u540d>\\AppData\\Roaming\\SRunPy\uff0c\u5176\u4e2d\u7684`config.json`\u6587\u4ef6\u4fdd\u5b58\u4e86\u7528\u6237\u7684\u8d26\u53f7\u5bc6\u7801\u7b49\u4fe1\u606f\u3002\r\n\r\n### \u547d\u4ee4\u884c\u4f7f\u7528\u8bf4\u660e\r\n\r\n\u672c\u7a0b\u5e8f\u4e5f\u652f\u6301\u547d\u4ee4\u884c\u64cd\u4f5c\uff0c\u4ee5\u4e0b\u662f\u4e00\u4e9b\u5e38\u7528\u547d\u4ee4\uff1a\r\n\r\n- \u67e5\u770b\u7f51\u5173\u72b6\u6001:\r\n    ```sh\r\n    srunpy-cli --info\r\n    ```\r\n- \u767b\u5f55\u7f51\u5173:\r\n    ```sh\r\n    srunpy-cli --login --username <\u4f60\u7684\u7528\u6237\u540d> --passwd <\u4f60\u7684\u5bc6\u7801>\r\n    ```\r\n- \u767b\u51fa\u7f51\u5173:\r\n    ```sh\r\n    srunpy-cli --logout\r\n    ```\r\n\r\n### TODO\r\n\r\n1. \u7f16\u5199\u6ce8\u91ca\r\n2. \u652f\u6301 GUI \u4fee\u6539\u65ad\u7ebf\u91cd\u8fde\u8d85\u65f6\r\n\r\n### \u7ecf\u6d4b\u8bd5\u9662\u6821\r\n\r\n1. \u5317\u4eac\u822a\u7a7a\u822a\u5929\u5927\u5b66 \u6c99\u6cb3\u6821\u533a\r\n\r\n### \u81f4\u8c22\r\n\r\n\u672c\u7a0b\u5e8f\u540e\u7aef\u57fa\u4e8e [iskoldt/srunauthenticator](https://github.com/iskoldt-X/SRUN-authenticator) \u4fee\u6539\r\n\r\n\u524d\u7aef\u57fa\u4e8e [r0x0r/pywebview](https://github.com/r0x0r/pywebview) \u5f00\u53d1\r\n\r\n\u754c\u9762\u5b57\u4f53\u4e3a [MiSans Medium](https://hyperos.mi.com/font/details/sc)\r\n\r\n---\r\n\r\n# Campus Network Auto Login Tool (For Srun Gateway)\r\n\r\n### Supported Features\r\n\r\n1. Remember account and password\r\n2. Auto start on boot\r\n3. Auto reconnect on disconnection\r\n4. Operate from command line\r\n\r\n### Interface Display\r\n\r\n![Interface Display](https://github.com/HofNature/SRunPy-GUI/raw/main/Show.png)\r\n\r\n### Usage Instructions\r\n\r\n**Method 1:** Install `srunpy` via `pip` and run `srunpy` (Recommended)\r\n\r\n```sh\r\n# Requires Python 3.7~3.12\r\npip install srunpy\r\nsrunpy\r\n```\r\nThe first time you start, a desktop shortcut will be created automatically. You can then start the program by double-clicking the desktop shortcut.\r\n\r\nThis program uses Edge WebView2 as the browser engine by default. It can be changed to QtWebEngine, available with\r\n\r\n```sh\r\npip install srunpy[qt]\r\nsrunpy --qt\r\n```\r\n**Method 2:** Go to [Github Release](https://github.com/HofNature/SRunPy-GUI/releases) to download SRunClient.zip, unzip and run directly\r\n\r\n**Method 3:** Clone this project from Github and then install\r\n\r\n```sh\r\ngit clone https://github.com/HofNature/SRunPy-GUI.git\r\ncd SRunPy-GUI\r\npip install .\r\nsrunpy\r\n```\r\n\r\n**Method 4:** Clone this project, create an Anaconda environment using `environment.yaml`, and then run `srun_client.py`\r\n\r\n```sh\r\ngit clone https://github.com/HofNature/SRunPy-GUI.git\r\nconda env create -f environment.yaml\r\nconda activate srunpy\r\npython srun_client.py\r\n```\r\n\r\nThis method does not require a Python environment, but cannot use command line operations. Also, since the application is unsigned, it may be falsely flagged by Windows Defender or other antivirus software.\r\n\r\nThis program is set to the Beihang University gateway by default. Other users using Srun web authentication can click the settings button on the left side of the interface to change to their school's authentication address.\r\n\r\nThe configuration file is located at C:\\Users\\<username>\\AppData\\Roaming\\SRunPy, where the `config.json` file saves the user's account and password information.\r\n\r\n### Command Line Usage Instructions\r\n\r\nThis program also supports command line operations. Here are some common commands:\r\n\r\n- Check gateway status:\r\n    ```sh\r\n    srunpy-cli --info\r\n    ```\r\n- Login to gateway:\r\n    ```sh\r\n    srunpy-cli --login --username <your username> --passwd <your password>\r\n    ```\r\n- Logout from gateway:\r\n    ```sh\r\n    srunpy-cli --logout\r\n    ```\r\n\r\n### TODO\r\n\r\n1. Write comments\r\n2. Support GUI modification of disconnection reconnection timeout\r\n\r\n### Tested Schools\r\n\r\n1. Beihang University Shahe Campus\r\n\r\n### Acknowledgements\r\n\r\nThe backend of this program is modified from [iskoldt/srunauthenticator](https://github.com/iskoldt-X/SRUN-authenticator)\r\n\r\nThe frontend is developed based on [r0x0r/pywebview](https://github.com/r0x0r/pywebview)\r\n\r\nThe interface font is [MiSans Medium](https://hyperos.mi.com/font/details/sc)\r\n```\r\n",
    "bugtrack_url": null,
    "license": "GPL-3.0",
    "summary": "\u9002\u7528\u4e8e\u6df1\u6f9c\u7f51\u5173\u7684\u6821\u56ed\u7f51\u7b2c\u4e09\u65b9\u767b\u5f55\u5668",
    "version": "1.0.6.7",
    "project_urls": {
        "Homepage": "https://github.com/HofNature/SRunPy-GUI"
    },
    "split_keywords": [
        "srun",
        " srunpy",
        " srun-client",
        " srun-gui",
        " srunpy-gui",
        " srun-client-gui",
        " network",
        " login",
        " logout",
        " gateway"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f8f6b34969e31ddcf7cea43af7008857a08154745723305a3aadada4963060e1",
                "md5": "82844a97428b342921d803fa60da5800",
                "sha256": "0ce69ab0d93d661725b969bebd48a7dba0b4d90f7923af131b3af3df63c5904e"
            },
            "downloads": -1,
            "filename": "srunpy-1.0.6.7-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "82844a97428b342921d803fa60da5800",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 5531322,
            "upload_time": "2024-11-24T18:15:22",
            "upload_time_iso_8601": "2024-11-24T18:15:22.124968Z",
            "url": "https://files.pythonhosted.org/packages/f8/f6/b34969e31ddcf7cea43af7008857a08154745723305a3aadada4963060e1/srunpy-1.0.6.7-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ffe1baaffcb2f255eec75acd334da5eedec70947e2c574c0644a7edcd87d04bd",
                "md5": "3f6b83a58bfbdf9012f5488ea052ddd9",
                "sha256": "cb7bd61e11c626f9d7178454c00876984aaa338507ff094a35dec0bcc3977347"
            },
            "downloads": -1,
            "filename": "srunpy-1.0.6.7.tar.gz",
            "has_sig": false,
            "md5_digest": "3f6b83a58bfbdf9012f5488ea052ddd9",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 5521692,
            "upload_time": "2024-11-24T18:15:24",
            "upload_time_iso_8601": "2024-11-24T18:15:24.754590Z",
            "url": "https://files.pythonhosted.org/packages/ff/e1/baaffcb2f255eec75acd334da5eedec70947e2c574c0644a7edcd87d04bd/srunpy-1.0.6.7.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-11-24 18:15:24",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "HofNature",
    "github_project": "SRunPy-GUI",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "srunpy"
}
        
Elapsed time: 0.47920s