Skip to content

Commit

Permalink
add back map and files
Browse files Browse the repository at this point in the history
  • Loading branch information
jukent committed Mar 19, 2024
1 parent 4acda05 commit 03e7eb2
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/write-metrics-md.py
Original file line number Diff line number Diff line change
@@ -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)

Expand All @@ -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()

Expand All @@ -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)
1 change: 1 addition & 0 deletions portal/metrics.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Metrics
1 change: 1 addition & 0 deletions portal/metrics/user_metrics.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"Now": "", "Portal": "0K", "Foundations": "0K", "Cookbooks": "0K"}

0 comments on commit 03e7eb2

Please sign in to comment.