Hi! It’d be fantastic if we had a machine readable index of FEPs and their frontmatter available in the repository in codeberg, which would allow software to integrate that data.
Would this be possible?
Hi! It’d be fantastic if we had a machine readable index of FEPs and their frontmatter available in the repository in codeberg, which would allow software to integrate that data.
Would this be possible?
cc @silverpill or someone
I they don’t want to add it to the repo, it wouldn’t be difficult to write a small script or web app to generate it.
We can do this. There’s a script that facilitators run every time a new proposal is registered: create_readme.py. It adds new FEPs to the table in README.md
file, and it can generate a JSON file as well.
Awesome! I thought that might be possible. I don’t mind if it’s JSON or RSS come to think of it, as long as it’s machine readable
It’s good to know that the scripts are still in use and working. This means that my coding can survive 6 months of me being MIA.
My general opinion of having something as the script below as part of the process: It creates another failure point. As maintaining this type of script creates another burden, I would like to avoid it.
Anyway, the correct place to look would be fep/scripts/tools/__init__.py at main - fediverse/fep - Codeberg.org
Or the script
import json
from tools import FepFile, get_fep_ids, build_url_link
fep_files = [FepFile(fep) for fep in get_fep_ids()]
fep_files = sorted(
fep_files,
key=lambda x: (x.parsed_frontmatter["dateReceived"], x.parsed_frontmatter["slug"]),
)
result = []
for fep in fep_files:
link = f"[FEP-{fep.fep}: {fep.title}](./{fep.filename})"
parsed = fep.parsed_frontmatter
tracking_issue = build_url_link(parsed["trackingIssue"])
if "dateFinalized" in parsed:
date_final = parsed["dateFinalized"]
elif "dateWithdrawn" in parsed:
date_final = parsed["dateWithdrawn"]
else:
date_final = "-"
result.append(
{
"slug": f"FEP-{fep.fep}",
"title": fep.title,
"trackingIssue": tracking_issue,
"link": f"https://w3id.org/fep/{fep.filename}",
"dateFinalized": date_final
}
)
print(json.dumps(result, indent=2))
saved as scripts/make_json.py
works. You don’t even need to install any dependencies for it.
I also wouldn’t mind if this was done as a CI job to push data somewhere
See:
Unless there is a volunteer to maintain the FEP CI or funding, I feel the burden is too great.
I opened a pull request (WIP): #426 - WIP: Create FEP index in JSON format - fediverse/fep - Codeberg.org
We can generate JSON index at the same time as readme table
@thisismissem did you want something like this JSON file? fep/index.json at 9562596336256502412ccc540150f2a34c26e2d1 - fediverse/fep - Codeberg.org
(from #426 - WIP: Create FEP index in JSON format - fediverse/fep - Codeberg.org)
yep, but maybe unwrap the quotes on the fep slug?
- "slug": "\"ae0c\"",
+ "slug": "ae0c",
perhaps this is workable? Working with Codeberg's CI | Codeberg Documentation
Maybe SWF could pay to host a woodpecker CI instance for ActivityPub spec/process stuff?
cc @eprodrom
Sure. Updated the PR and marked it as ready for review
We already use Codeberg CI (although it stopped working several days ago, I haven’t looked into that yet).
@thisismissem My pull request has been merged and FEP index in JSON format is now available at fep/index.json at main - fediverse/fep - Codeberg.org