# HG changeset patch # User drewp@bigasterisk.com # Date 1724092084 25200 # Node ID f2dd88b9964c30f8a38121e12d67acfc7a82b1ee # Parent f76f6368e2afba1f1ae5e48264b45a032b1bc3b8 rm dead code diff -r f76f6368e2af -r f2dd88b9964c graphconvert.py --- 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