Skip to content
This repository has been archived by the owner on Jun 21, 2022. It is now read-only.

backports from rdflib #4

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
710 changes: 365 additions & 345 deletions pyMicrodata/__init__.py

Large diffs are not rendered by default.

1,050 changes: 536 additions & 514 deletions pyMicrodata/microdata.py

Large diffs are not rendered by default.

21 changes: 12 additions & 9 deletions pyMicrodata/registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"""

import sys

(py_v_major, py_v_minor, py_v_micro, py_v_final, py_v_serial) = sys.version_info

_registry = """
Expand All @@ -26,20 +27,22 @@
"additionalType": {"subPropertyOf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#type"}
}
},

"http://microformats.org/profile/hcard": {}
}
"""

vocab_names = {
"http://schema.org/" : "schema",
"http://microformats.org/profile/hcard#" : "hcard"
"http://schema.org/": "schema",
"http://microformats.org/profile/hcard#": "hcard"
}

registry = []
if py_v_major >= 3 or (py_v_major == 2 and py_v_minor >= 6) :
import json
registry = json.loads(_registry)
else :
import simplejson
registry = simplejson.loads(_registry)
if py_v_major >= 3 or (py_v_major == 2 and py_v_minor >= 6):
import json

registry = json.loads(_registry)
else:
import simplejson

registry = simplejson.loads(_registry)
Loading