# rookierun **Repository Path**: tynam-yang/rookierun ## Basic Information - **Project Name**: rookierun - **Description**: 工具集合 - **Primary Language**: Python - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 0 - **Created**: 2024-01-05 - **Last Updated**: 2024-10-21 ## Categories & Tags **Categories**: Uncategorized **Tags**: dearpygui ## README # 菜鸟快跑 #### 介绍 常用的工具集合 [Windows 程序体验](https://gitee.com/tynam-yang/rookierun/wikis/Home?sort_id=9369798):https://gitee.com/tynam-yang/rookierun/wikis/Home?sort_id=9369798 演示如下: ![功能演示](img/功能演示.gif) 部分界面展示: 首页: ![home](img/home.png) 技术网站: ![home](img/技术网站.png) 翻译: ![home](img/翻译.png) 随机用户信息: ![home](img/随机用户信息.png) 赞赏: ![home](img/赞赏.png) #### 软件架构 软件架构说明 #### 使用说明 所需 python 版本:3.11+ 1. 下载代码,安装依赖包。 ```shell pip install package -i https://pypi.mirrors.ustc.edu.cn/simple/ ## 使用中科大镜像源 pip install -r requirement.txt ## 安装脚本里列出的库 ``` 2. 运行 `mian.py` 文件。 ```shell python mian.py ``` #### 参与贡献 扫码进群参与,共同建设: ![群二维码.png](img/id_card.jpg) ##### 步骤 1. Fork 本仓库 2. 新建 Feat_rookierun_{name} 分支 3. 提交代码 4. 新建 Pull Request #### 要求 ##### 注册工具 1. `./tool/` 下创建一个新的工具文件,例如 about.py。 2. 添加类,在 about.py 中实现逻辑。如下代码: ```PYTHON import dearpygui.dearpygui as dpg class About: def __init__(self): with dpg.window(label="关于我们", width=600, height=300, pos=[200, 100], no_collapse=True): self.__add_about() def __add_about(self): dpg.add_text(default_value="我们是一群流浪在除夕街头的有志测试人员") ``` 3. 注册工具。在 `menu.json` 对应的分类下添加新增的工具。例如添加 calculator 工具,第一层 `key` 为工具分类;第二层 `key` 为工具名; 第二层 `value` 为工具对应的类。例如 `About` 类,就为 `about.about`: ```json { "工具": { "关于":"about.About" } } ``` ##### 注册文档 1. 如果是文档分类,则只需要将文件保存在 `assets/documents/` 下,目前只支持 txt 和 csv 类型文档。 txt 文档读取后是一个内容展示页面,csv 文档读取后是一个表格样式页面。 2. 在 `menu.json` 的文档分类下添加新增的文档。例如添加 http_method.csv: ```json { "文档": { "HTTP请求方法":"http_method.csv" } } ``` ##### 注册在线网站 1. 如果是在线网站分类,则只需要将文件保存在 `page/websites/websites.py` 文件中,参考其他分类样式,添加一个类。 2. 在 `menu.json` 的在线网站分类下添加新增的在线网站。例如添加技术网站: ```json { "在线网站": { "技术网站":"websites.Technical" } } ``` ##### 重新打包 1. 新工具开发完成后,将依赖包保存在 `requirement.txt` 文件。 ```shell pip list --format=freeze >requirement.txt ``` 2. 重新生成单机应用程序。 ```shell pyinstaller rookierun.spec ``` 打包成功后,会在 `rookierun` 目录下生成一个 `dist` 目录, `dist` 目录下会生成 `rookierun.exe` 程序文件。 3. 将 `menu.json`、 `config.ini` 和 `assets` 文件复制到与打包后的 `rookierun.exe` 同一个目录下。 4. 运行 `rookierun.exe` 启动程序。 # 已申请软著 ![softwareid.png](img/softwareid.png)