Permalink
Browse files

Added exercise of some static pages to exercisesite script.

  • Loading branch information...
1 parent 8597127 commit 4e4f29f4cab95c4217a2f499c372bf78c62e8935 @RichardWallis RichardWallis committed Dec 7, 2016
Showing with 11 additions and 2 deletions.
  1. +11 −2 scripts/exercisesite.py
@@ -66,6 +66,8 @@
import sdoapp
from sdoapp import ENABLED_EXTENSIONS
+STATICPAGES = ["","docs/schemas.html","docs/full.html"]
+
class Exercise():
def __init__(self):
self.setSkips()
@@ -133,10 +135,12 @@ def loadGraphs(self):
if id not in self.skiplist:
print "%s: Processing: %s (%s) " % (sys.argv[0],id,len(g))
self.exercise(g)
+ self.exerciseStatics(g.identifier)
def exercise(self, graph):
types = {}
props = {}
+ exts = []
for (s,p,o) in graph.triples((None,RDF.type,RDFS.Class)):
if s.startswith("http://schema.org"):
types.update({s:graph.identifier})
@@ -150,9 +154,14 @@ def exercise(self, graph):
for p in sorted(props.keys()):
self.access(p,props[p])
-
+
+ def exerciseStatics(self, graph):
+ for s in STATICPAGES:
+ self.access(s,graph)
+
def access(self, id, ext):
- id = id[18:]
+ if id.startswith("http://schema.org"):
+ id = id[18:]
ext = getRevNss(str(ext))
if ext == "core":
ext = ""

0 comments on commit 4e4f29f

Please sign in to comment.