diff --git a/.github/workflows/write-metrics-md.py b/.github/workflows/write-metrics-md.py index dc20e3fc..27c9dd21 100644 --- a/.github/workflows/write-metrics-md.py +++ b/.github/workflows/write-metrics-md.py @@ -1,7 +1,7 @@ import json -def process_user_data(json_file, top_pages, this_year, md_file): +def process_user_data(json_file, top_pages, this_year, map, md_file): with open(json_file, 'r') as f: user_data = json.load(f) @@ -21,8 +21,10 @@ def process_user_data(json_file, top_pages, this_year, md_file): f.write(table) f.write('\n\n') - f.write(f'![Top Pages]({top_pages})\n\n') f.write(f'![Users this Year]({this_year})\n\n') + f.write(f'![Top Pages]({top_pages})\n\n') + f.write(f'![Users by Country]({map})\n\n') + f.close() @@ -31,5 +33,6 @@ def process_user_data(json_file, top_pages, this_year, md_file): json_file = 'portal/metrics/user_metrics.json' top_pages = 'metrics/toppages.png' this_year = 'metrics/thisyear.png' + map = 'metrics/bycountry.png' md_file = 'portal/metrics.md' - process_user_data(json_file, top_pages, this_year, md_file) + process_user_data(json_file, top_pages, this_year, map, md_file) diff --git a/portal/metrics.md b/portal/metrics.md new file mode 100644 index 00000000..b05321b8 --- /dev/null +++ b/portal/metrics.md @@ -0,0 +1 @@ +# Metrics diff --git a/portal/metrics/user_metrics.json b/portal/metrics/user_metrics.json new file mode 100644 index 00000000..57a123c7 --- /dev/null +++ b/portal/metrics/user_metrics.json @@ -0,0 +1 @@ +{"Now": "", "Portal": "0K", "Foundations": "0K", "Cookbooks": "0K"}