changeset 48:f2dd88b9964c

rm dead code
author drewp@bigasterisk.com
date Mon, 19 Aug 2024 11:28:04 -0700
parents f76f6368e2af
children 2991c1166852
files graphconvert.py
diffstat 1 files changed, 0 insertions(+), 39 deletions(-) [+]
line wrap: on
line diff
--- a/graphconvert.py	Wed Aug 14 15:35:00 2024 -0700
+++ b/graphconvert.py	Mon Aug 19 11:28:04 2024 -0700
@@ -40,42 +40,3 @@
             add(EV['htmlLink'], URIRef(ev['htmlLink']))
     return graph
 
-
-def asJsonLd(events) -> dict:
-    ret: dict = {'@graph': []}
-    for ev in events:
-        ev['startTime'] = ev['startTime'].astimezone(tzlocal()).isoformat()
-        ev['endTime'] = ev['endTime'].astimezone(tzlocal()).isoformat()
-        ev['@id'] = ev.pop('uri')
-        ret['@graph'].append(ev)
-
-    ret['@context'] = {
-        "xsd": "http://www.w3.org/2001/XMLSchema#",
-        "ev": "http://bigasterisk.com/event#",
-        "startTime": {
-            "@id": "ev:startTime",
-            "@type": "xsd:dateTime"
-        },
-        "endTime": {
-            "@id": "ev:endTime",
-            "@type": "xsd:dateTime"
-        },
-        "startDate": {
-            "@id": "ev:startDate",
-            "@type": "xsd:date"
-        },
-        "endDate": {
-            "@id": "ev:endDate",
-            "@type": "xsd:date"
-        },
-        "title": "ev:title",
-        "feed": {
-            "@id": "ev:feed",
-            "@type": "@id"
-        },
-        "htmlLink": {
-            "@id": "ev:htmlLink",
-            "@type": "@id"
-        },
-    }
-    return ret