Scripts to generate monthly reports on the repo and download stats.
- Python 93.4%
- Shell 6.6%
| reports | ||
| .gitignore | ||
| .gitmodules | ||
| .woodpecker.yml | ||
| config.json | ||
| generate_markdown.py | ||
| generate_report_data.py | ||
| generate_reports.sh | ||
| historical_design.json | ||
| README.md | ||
| report_design.json | ||
| report_points.md | ||
Generating a report
Run one script to generate markdown for the previous month
./generate_reports.sh current
Run one script to generate the markdown reports for all months (since 2025-01)
./generate_reports.sh batch
More fine-grained control
Run the script to generate data
python generate_report_data.py 2025 1 config.json
Run the script to generate the markdown file
python generate_markdown.py reports/report_data_2025-01.json
Requirements
Resources
monthly-in-daysdownload stats as iod-stats-collector (currently manually copied)- Package-name:label-map as provided in iod-stats-collector
/__helpers - CSV of added apps as provided in iod-stats-collector
/__helpers - CSV of removed apps as provided in iod-stats-collector
/__helpers - Package-name:categories map: as provided in iod-stats-collector
/__helpers
Development
- Python 3.X
- Markdown-reader with mermaid support
Config
"thresholds" contains configuration values for the report generation:
- "top_apps_count": Number of apps to include in the top apps category (default 10)
- "top_apps_display_count": Number of apps to display in the top apps section (default 50)
- "fastest_growing_minimum_downloads": Minimum downloads for an app to be considered for the fastest growing category (default 2000)
- "fastest_growing_count": Number of apps to include in the fastest growing category (default 5)
- "consistent_performer_months": Number of months an app needs to consistently perform well to be considered a consistent performer (default 3)
- "max_client_preference_apps": Maximum number of apps to display for each client preference (default 5)
"data_paths" covers the paths to the necessary resources for report generation:
- "download_stats": Path to the monthly download stats data (default "./iod-stats-collector/stats/upstream/monthly-in-days/")
- "package_labels": Path to the package-name:label-map (default "./iod-stats-collector/stats/__helpers/appnames.json")
- "package_categories": Path to the package-name:category-map (default "./iod-stats-collector/stats/__helpers/appcategories.json")
- "new_apps_log": Path to the CSV of added apps (default "./iod-stats-collector/stats/__helpers/new_apps.csv")
- "removed_apps_log": Path to the CSV of removed apps (default "./iod-stats-collector/stats/__helpers/removed_apps.csv")
- "historical_data": Path to the historical tracking data (default "./reports/historical_tracking.json")
- "output_report_data": Path to save the generated report data (default "./reports/report_data_YYYY-MM.json")
- "output_markdown": Path to save the generated markdown report (default "./reports/monthly_report_YYYY-MM.md")
Cron job
The included woodpecker job generates the report of last month and then commits it.
Future plans
- Include RB-reports data