X-Git-Url: https://git.ladys.computer/x_status_git/blobdiff_plain/d5d7c05e0493fdd25574d9afd1781529c3eff695..refs/heads/current:/post-receive diff --git a/post-receive b/post-receive index 9698ba4..b07ad47 100755 --- a/post-receive +++ b/post-receive @@ -76,9 +76,9 @@ if stdin.read().split()[-1] == f"refs/heads/{LIVE_BRANCH}": status["subject"] = topic author_path = next(path.parent.glob("1=*"), None) if author_path: - status["author"] = { "name": author_path.name[2:] } + status["creator"] = { "name": author_path.name[2:] } with author_path.open("r", encoding="utf-8") as text: - status["author"]["@id"] = text.read().strip() + status["creator"]["@id"] = text.read().strip() title_path = next(path.parent.glob("2=*"), None) if title_path: with title_path.open("r", encoding="utf-8") as text: @@ -160,11 +160,11 @@ if stdin.read().split()[-1] == f"refs/heads/{LIVE_BRANCH}": publishedElt = entryElt.appendChild(doc.createElement("published")) publishedElt.appendChild(doc.createTextNode(item["created"])) authorElt = entryElt.appendChild(doc.createElement("author")) - if "author" in item: + if "creator" in item: nameElt = authorElt.appendChild(doc.createElement("name")) - nameElt.appendChild(doc.createTextNode(item["author"]["name"])) + nameElt.appendChild(doc.createTextNode(item["creator"]["name"])) uriElt = authorElt.appendChild(doc.createElement("uri")) - uriElt.appendChild(doc.createTextNode(item["author"]["@id"])) + uriElt.appendChild(doc.createTextNode(item["creator"]["@id"])) else: nameElt = authorElt.appendChild(doc.createElement("name")) nameElt.appendChild(doc.createTextNode("Anonymous")) @@ -202,7 +202,7 @@ if stdin.read().split()[-1] == f"refs/heads/{LIVE_BRANCH}": else: yyyy_mm = datetime[0:7] if yyyy_mm not in months: - months[yyyy_mm] = { "@context": { "@language": LANG, "activity": "https://www.w3.org/ns/activitystreams#", "dct": "http://purl.org/dc/terms/", "foaf": "http://xmlns.com/foaf/0.1/", "sioc": "http://rdfs.org/sioc/ns#", "sioct": "http://rdfs.org/sioc/types#", "OrderedCollectionPage": "activity:OrderedCollectionPage", "Thread": "sioc:Thread", "MicroblogPost": "sioct:MicroblogPost", "current": { "@id": "activity:current", "@type": "@id" }, "first": { "@id": "activity:first", "@type": "@id" }, "items": { "@id": "activity:items", "@type": "@id", "@container": "@list" }, "partOf": { "@id": "activity:partOf", "@type": "@id" }, "prev": { "@id": "activity:prev", "@type": "@id" }, "next": { "@id": "activity:next", "@type": "@id" }, "source": { "@id": "activity:source", "@type": "@id", "@context": { "content": { "@id": "activity:content", "@type": "http://www.w3.org/2001/XMLSchema#string" }, "mediaType": "activity:mediaType" } }, "created": { "@id": "dct:created", "@type": "http://www.w3.org/2001/XMLSchema#dateTime" }, "creator": { "@id": "dct:creator", "@type": "@id" }, "identifier": { "@id": "dct:identifier", "@type": "http://www.w3.org/2001/XMLSchema#anyURI" }, "title": "dct:title", "name": "foaf:name", "content": { "@id": "sioc:content", "@type": "http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral" } }, "@id": f"{PUBLIC_URL}/statuses/{yyyy_mm}", "@type": ["OrderedCollectionPage", "Thread"], "items": [], "partOf": f"{PUBLIC_URL}/statuses" } + months[yyyy_mm] = { "@context": { "@language": LANG, "activity": "https://www.w3.org/ns/activitystreams#", "dct": "http://purl.org/dc/terms/", "foaf": "http://xmlns.com/foaf/0.1/", "sioc": "http://rdfs.org/sioc/ns#", "sioct": "http://rdfs.org/sioc/types#", "OrderedCollectionPage": "activity:OrderedCollectionPage", "Thread": "sioc:Thread", "MicroblogPost": "sioct:MicroblogPost", "current": { "@id": "activity:current", "@type": "@id" }, "first": { "@id": "activity:first", "@type": "@id" }, "items": { "@id": "activity:items", "@type": "@id", "@container": "@list" }, "partOf": { "@id": "activity:partOf", "@type": "@id" }, "prev": { "@id": "activity:prev", "@type": "@id" }, "next": { "@id": "activity:next", "@type": "@id" }, "source": { "@id": "activity:source", "@type": "@id", "@context": { "content": { "@id": "activity:content", "@type": "http://www.w3.org/2001/XMLSchema#string" }, "mediaType": "activity:mediaType" } }, "created": { "@id": "dct:created", "@type": "http://www.w3.org/2001/XMLSchema#dateTime" }, "creator": { "@id": "dct:creator", "@type": "@id" }, "identifier": { "@id": "dct:identifier", "@type": "http://www.w3.org/2001/XMLSchema#anyURI" }, "title": "dct:title", "name": "foaf:name", "content": { "@id": "sioc:content", "@type": "http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral" } }, "@id": f"{PUBLIC_URL}/statuses/{yyyy_mm}", "@type": ["OrderedCollectionPage", "Thread"], "feed": f"{PUBLIC_URL}/statuses.atom", "items": [], "partOf": f"{PUBLIC_URL}/statuses" } months[yyyy_mm]["items"].append(status) # Set up the public directory.