]> Lady’s Gitweb - x_status_git/blobdiff - post-receive
Fix ⁊ improve creator display
[x_status_git] / post-receive
index 9698ba44dab7d6aa30c0bd5d86847fb612596ab8..948734d1122ca79cdc22db16a34c95761ccc635d 100755 (executable)
@@ -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["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:
                        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:
                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"))
                                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 = 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 = 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"))
                        else:
                                nameElt = authorElt.appendChild(doc.createElement("name"))
                                nameElt.appendChild(doc.createTextNode("Anonymous"))
This page took 0.023904 seconds and 4 git commands to generate.