Skip to content

xiaomanwong/llm_pkg_monitor

Repository files navigation

Android Package Monitor

This project is designed to monitor Android package updates, analyze APK files, generate reports, and serve them via a Flask server.

Project Structure

__pycache__/
.vscode/
analyzer_apk.py
android_package_monitor.py
apk_info_history.json
config.py
config.yaml
doc.ipynb
dowload.py
flask_server.py
generate_chart.py
generate_report.py
images/
index.py
llm.py
message.py
monitor.py
output_parser.py
readme.md
report/
requirement.txt
template/
tool/
yaml_parser.py

Key Components

config.py

Defines configuration classes such as Config, LLMConfig, LarkConfig, and ReportConfig.

android_package_monitor.py

Implements the AndroidPkgMonitor class which monitors Android package updates, analyzes APK files, and generates reports.

generate_report.py

Contains the ReportGenerator class which generates reports in markdown or HTML format.

flask_server.py

Sets up a Flask server to serve the generated reports.

yaml_parser.py

Parses the config.yaml file to create configuration objects.

Usage

Running the Flask Server

This will allow you to access the generated reports and images. To start the Flask server, run:

python flask_server.py

The server will be available at http://0.0.0.0:19923.

Deploying on Jenkins

The task is deployed on Jenkins. It is executed via a Jenkins shell and then started to generator Report

Reports are generated automatically by the AndroidPkgMonitor class when a new APK is analyzed. The reports are saved in the report directory.

python index.py --apk-path "http://app-package.ks3-cn-beijing.ksyuncs.com/xxxxxxx/app_Qa_4.5.20.63.apk" 

Configuration

The configuration is defined in config.yaml. It includes settings for LLM, Lark, and report generation.

Example config.yaml

llm_config:
  model: "your_model"
  url: "your_url"
  api_key: "your_api_key"

lark_config:
  webhook: "your_webhook"
  secret: "your_secret"

report:
  format: "html"

Dependencies

Install the required dependencies using:

pip install -r requirement.txt

License

This project is licensed under the MIT License.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published