Skip to content

Commit

Permalink
Update Resolver URI example
Browse files Browse the repository at this point in the history
  • Loading branch information
PonteIneptique committed May 2, 2017
1 parent 1629f6b commit 6eeb135
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions doc/Resolver.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
from MyCapytain.common.constants import Mimetypes, XPATH_NAMESPACES

# We set up a resolver which communicates with an API available in Leipzig
resolver = HttpCtsResolver(HttpCtsRetriever("http://cts.dh.uni-leipzig.de/api/cts/"))
resolver = HttpCtsResolver(HttpCtsRetriever("http://cts.dh.uni-leipzig.de/api/cts"))
# We require a passage : passage is now a Passage object
# This is an entry from the Smith Myth Dictionary
# The inner methods will resolve to the URI http://cts.dh.uni-leipzig.de/api/cts/?request=GetPassage&urn=urn:cts:pdlrefwk:viaf88890045.003.perseus-eng1:A.abaeus_1
# The inner methods will resolve to the URI http://cts.dh.uni-leipzig.de/api/cts?request=GetPassage&urn=urn:cts:pdlrefwk:viaf88890045.003.perseus-eng1:A.abaeus_1
# And parse it into interactive objects
passage = resolver.getTextualNode("urn:cts:pdlrefwk:viaf88890045.003.perseus-eng1", "A.abaeus_1")
# We need an export as plaintext
Expand All @@ -25,4 +25,4 @@
output=Mimetypes.PYTHON.ETREE
).xpath(".//tei:bibl/text()", namespaces=XPATH_NAMESPACES, magic_string=False)
)
["Hdt. 8.33", "Paus. 10.35.1"]
["Hdt. 8.33", "Paus. 10.35.1"]

0 comments on commit 6eeb135

Please sign in to comment.