1
0
mirror of https://codeberg.org/fediverse/fep.git synced 2026-08-08 21:45:52 +00:00

Website: Display proposal type and implementation counts in table (#747)

This PR addresses https://codeberg.org/fediverse/fep/issues/686 and https://codeberg.org/fediverse/fep/issues/194

The "Type" column is added to all FEP lists, the value is either "informational" or "implementation (N)".

Reviewed-on: https://codeberg.org/fediverse/fep/pulls/747
Reviewed-by: helge <helge@noreply.codeberg.org>
Co-authored-by: silverpill <silverpill@firemail.cc>
Co-committed-by: silverpill <silverpill@firemail.cc>
This commit is contained in:
silverpill
2026-03-07 17:43:33 +01:00
committed by silverpill
parent 2fcc468c73
commit f68a69fc79
3 changed files with 15 additions and 16 deletions
+2
View File
@@ -12,6 +12,8 @@ def columns_for_status(status: str) -> list[str]:
columns = [
"title",
"repo_link_image",
"fep_type",
"implementation_count",
"tracking_issue",
"discussions",
"date_received",
+13
View File
@@ -74,6 +74,18 @@ class TableLineBuilder:
url = f"{repo_base}fep/{self.fep.fep}/fep-{self.fep.fep}.md"
return f"[codeberg]({url})"
@property
def fep_type(self) -> str:
fep_type = self.parsed.get("type") or "informational"
return fep_type.capitalize()
@property
def implementation_count(self) -> str:
if self.parsed.get("type") == "implementation" and self.fep.implementation_count > 0:
return str(self.fep.implementation_count)
else:
return ""
def get_attribute(self, column: str):
try:
return self.__getattribute__(column)
@@ -93,6 +105,7 @@ class TableTitle:
column_to_title = {
"title": "Title",
"fep_type": "Type",
"status": "Status",
"tracking_issue": "Tracking issue",
"discussions": "Discussions",
-16
View File
@@ -1,16 +0,0 @@
#!/usr/bin/env python
from fep_tools import index
result = []
print("| Title | Status | Count |")
print("| ----- | ------ | ----- |")
for fep in index():
slug = fep.parsed_frontmatter["slug"]
status = fep.parsed_frontmatter["status"]
typ = fep.parsed_frontmatter.get("type") or "-"
if fep.implementation_count == 0:
continue
print(
f"| [{fep.title}](https://codeberg.org/fediverse/fep/src/branch/main/fep/{slug}/fep-{slug}.md) | {status} | {fep.implementation_count} |"
)