Scripts to generate monthly reports on the repo and download stats.
  • Python 93.4%
  • Shell 6.6%
Find a file
2026-05-08 18:01:40 +00:00
reports [skip ci] Add monthly report 2026-05-08 18:01:40 +00:00
.gitignore Init .gitignore 2026-01-09 01:49:37 +01:00
.gitmodules Remove: iod-stats-collector sub-module 2026-03-10 10:33:10 +01:00
.woodpecker.yml Remove leftover TODO 2026-03-12 19:34:18 +01:00
config.json Add: Config's entry for categories-data 2026-02-13 14:31:24 +01:00
generate_markdown.py Fix: Reports footer 2026-03-13 13:24:02 +01:00
generate_report_data.py Add Florid to known clients 2026-03-12 19:21:59 +01:00
generate_reports.sh Add: Script to generate reports (to-be-targeted in CI-actions) 2026-02-15 16:03:04 +01:00
historical_design.json Add: Initial version of report data and historica data designs 2026-01-08 01:26:04 +01:00
README.md Clean up README 2026-03-12 19:28:23 +01:00
report_design.json Add: Initial version of report data and historica data designs 2026-01-08 01:26:04 +01:00
report_points.md Update TODOs-list 2026-01-28 01:45:56 +01:00

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-days download 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