diff --git a/src/sparqlunicorn_ontdoc/export/api/carddavexporter.py b/src/sparqlunicorn_ontdoc/export/api/carddavexporter.py index 42b5b4f7..1adcf449 100644 --- a/src/sparqlunicorn_ontdoc/export/api/carddavexporter.py +++ b/src/sparqlunicorn_ontdoc/export/api/carddavexporter.py @@ -14,7 +14,6 @@ def vcardJSONToFile(self,vcard,path): f.close() - def generateCardDAVCollection(self, outpath, deploypath, graph,subject,license="",version="3"): if not os.path.exists(outpath + "/addressbook/"): os.makedirs(outpath + "/addressbook/") diff --git a/src/sparqlunicorn_ontdoc/export/pages/personpage.py b/src/sparqlunicorn_ontdoc/export/pages/personpage.py index b5115600..751239f8 100644 --- a/src/sparqlunicorn_ontdoc/export/pages/personpage.py +++ b/src/sparqlunicorn_ontdoc/export/pages/personpage.py @@ -140,28 +140,39 @@ def createNameProperty(self,vcard): def extractPersonMetadata(self,subject,graph): thevcard={} + thehcard={} for pprop in graph.predicate_objects(subject, True): + if str(pprop[0]) in self.vcardTohCard: + thehcard[str(self.vcardTohCard[str(pprop[0])])]={"value":str(pprop[1]),"prop":str(pprop[0])} if str(pprop[0]) in self.vcardprops: if self.vcardprops[str(pprop[0])] in thevcard: thevcard[self.vcardprops[str(pprop[0])]]["value"]+=" "+str(pprop[1]) else: thevcard[self.vcardprops[str(pprop[0])]]={"value":str(pprop[1]),"prop":str(pprop[0])} - return thevcard + return {"vcard":thevcard,"hcard":thehcard} - def vcardToHTML(self,vcard): + def hcardToHTML(self,vcard,hcard): result="
Property | Value |
---|---|
"+str(DocUtils.shortenURI(prop))+" | " - if "http" in vcard[prop]: - result+=""+str(DocUtils.shortenURI(vcard[prop]["value"]))+" |
"+str(DocUtils.shortenURI(hcard[prop]["prop"]))+" | " + if "http" in hcard[prop]: + result+=""+str(DocUtils.shortenURI(hcard[prop]["value"]))+" | " + str(vcard[prop]["value"]) + " | " + if hcard[prop]["prop"] in self.vcardTohCard: + result += "" + str(hcard[prop]["value"]) + " | " else: - result += "" + str(vcard[prop]["value"]) + " | " - result+="