# BunchOfPyTools **Repository Path**: FisherKK/bunch-of-py-tools ## Basic Information - **Project Name**: BunchOfPyTools - **Description**: 一揽子好玩的Python工具箱, 使用Flask作为前端, 采用Redis实现缓存和RabbitMQ作为消息队列.... - **Primary Language**: Python - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 1 - **Created**: 2021-12-04 - **Last Updated**: 2024-09-01 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # BunchOfPyTools ## 1. 介绍 一揽子好玩的Python工具箱, 使用Flask作为后端, Vue作为前端, 采用Redis实现缓存和RabbitMQ作为消息队列 ### 1.1 项目结构 ```shell |-- web |-- application.py # 程序启动器 |-- config.py # 配置 |-- requirements.txt # 项目依赖 |-- app | |-- __init__.py | |-- api # 接口 | | |-- document.py # 文档处理 | | |-- errors.py # 错误处理 | | |-- images.py # 图像处理 | | |-- information.py # 信息处理 | | |-- maths.py # 数学运算 | | |-- __init__.py | |-- consumer # 消息队列消费者 | | |-- consumer.py | | |-- __init__.py | |-- timer # 定时任务 | | |-- task.py | | |-- __init__.py | |-- tools # 所有工具的模块集合 | | |-- __init__.py | | |-- document | | | |-- pdfCut.py | | | |-- pdfWatermark.py | | | |-- __init__.py | | |-- images | | | |-- ocr.py | | | |-- watermark.py | | | |-- wordcloud.py | | | |-- __init__.py | | | |-- font | | | | |-- hupo.ttf | | |-- math | | | |-- matrix.py | | | |-- __init__.py | | |-- spider | | | |-- const.py | | | |-- mail.py | | | |-- spider.py | | | |-- __init__.py | | |-- visualization | | | |-- visual.py | | | |-- __init__.py |-- tests | |-- base64.txt | |-- base64_test.py | |-- ocr.html | |-- watermaker.html | |-- wordcloud.html ``` ### 1.2 功能模块 #### 消息聚合 支持消息订阅, 采用邮箱等方式 * [x] 微博热搜爬取 * [ ] GitHub的Trending爬取 * [x] 知乎热榜爬取 * [x] 抖音排行榜 * [ ] QQ音乐|网易云音乐评论爬取[难度较大] * [ ] 通用型简单爬虫 #### 数学计算 * [x] 简单的矩阵运算 #### 图片处理 * [x] 图片添加水印 * [x] 词云生成 * [x] 在线OCR #### 文档处理 * [x] PDF添加水印 * [x] PDF剪切 #### 可视化 * [ ] CSV|EXCEL文件在线可视化 ## 2. How to Eat ? Windows用户: 1. 安装必要依赖 ```shell pip install -r requirements.txt ``` 2. 设置环境变量 ```shell $env:FLASK_APP="application.py" $env:FLASK_DEBUG="1" ``` 3. Just run it ```shell flask run ``` ## 3. How to push 1. 首先写入依赖 ```shell pip freeze >requirements.txt ``` 2. push ## 4. 如何开始开发 参见`web/app/api/demo.py`文件