Update 'Currently Updated' section in the readme

This update has been generated by the new report.py script.
This commit is contained in:
Marc Wrobel
2023-05-13 10:33:30 +02:00
parent 1fbebbceff
commit 8f82712642
2 changed files with 257 additions and 85 deletions

31
report.py Executable file
View File

@@ -0,0 +1,31 @@
import frontmatter
import time
from glob import glob
products = {}
count = 0
count_auto = 0
for product_file in sorted(list(glob('website/products/*.md'))):
with open(product_file, "r") as f:
data = frontmatter.load(f)
count += 1
title = data['title']
permalink = data['permalink']
if 'auto' in data:
count_auto += 1
method = list(data['auto'][0].keys())[0]
products[title] = [permalink, '✔️', method]
else:
products[title] = [permalink, '', 'n/a']
print(f"As of {time.strftime('%Y-%m-%d')}, {count_auto} of the {count} products"
f" tracked by endoflife.date have automatically tracked releases:")
print()
print('| Product | Permalink | Auto | Method |')
print('|---------|-----------|------|--------|')
for product in sorted(products.keys(), key=str.lower):
data = products[product]
print(f"| {product} | {data[0]} | {data[1]} | {data[2]} |")
print()
print('This table has been generated by [report.py](/report.py).')