├── tests ├── __init__.py ├── common │ ├── __init__.py │ ├── test_metadata.py │ └── test_utils.py ├── resolvers │ ├── __init__.py │ └── cts │ │ └── __init__.py ├── resources │ ├── __init__.py │ ├── proto │ │ └── __init__.py │ ├── texts │ │ ├── __init__.py │ │ ├── api │ │ │ └── __init__.py │ │ └── locals │ │ │ └── __init__.py │ └── collections │ │ ├── __init__.py │ │ └── test_cts_collection_inheritance.py ├── retrievers │ └── __init__.py └── testing_data │ ├── texts │ └── License.txt │ ├── latinLit │ └── data │ │ ├── phi1017 │ │ ├── __cts__.xml │ │ ├── phi004 │ │ │ └── __cts__.xml │ │ ├── phi005 │ │ │ └── __cts__.xml │ │ ├── phi006 │ │ │ └── __cts__.xml │ │ ├── phi008 │ │ │ └── __cts__.xml │ │ ├── phi003 │ │ │ └── __cts__.xml │ │ ├── phi007 │ │ │ └── __cts__.xml │ │ ├── phi001 │ │ │ └── __cts__.xml │ │ ├── phi002 │ │ │ └── __cts__.xml │ │ ├── phi015 │ │ │ └── __cts__.xml │ │ ├── phi009 │ │ │ └── __cts__.xml │ │ ├── phi010 │ │ │ └── __cts__.xml │ │ ├── phi014 │ │ │ └── __cts__.xml │ │ ├── phi013 │ │ │ └── __cts__.xml │ │ └── phi011 │ │ │ └── __cts__.xml │ │ ├── stoa0255 │ │ ├── __cts__.xml │ │ ├── stoa010 │ │ │ └── __cts__.xml │ │ ├── stoa009 │ │ │ └── __cts__.xml │ │ ├── stoa012 │ │ │ └── __cts__.xml │ │ ├── stoa014 │ │ │ └── __cts__.xml │ │ ├── stoa011 │ │ │ └── __cts__.xml │ │ ├── stoa004 │ │ │ └── __cts__.xml │ │ ├── stoa013 │ │ │ └── __cts__.xml │ │ ├── stoa006 │ │ │ └── __cts__.xml │ │ ├── stoa007 │ │ │ └── __cts__.xml │ │ └── stoa008 │ │ │ └── __cts__.xml │ │ ├── phi0472 │ │ ├── __cts__.xml │ │ └── phi001 │ │ │ └── __cts__.xml │ │ ├── phi0550 │ │ ├── __cts__.xml │ │ └── phi001 │ │ │ └── __cts__.xml │ │ ├── phi0474 │ │ ├── __cts__.xml │ │ ├── phi013 │ │ │ └── __cts__.xml │ │ ├── phi024 │ │ │ └── __cts__.xml │ │ └── phi002 │ │ │ └── __cts__.xml │ │ ├── phi0917 │ │ ├── __cts__.xml │ │ └── phi001 │ │ │ └── __cts__.xml │ │ ├── phi1276 │ │ ├── __cts__.xml │ │ └── phi001 │ │ │ └── __cts__.xml │ │ ├── phi1294 │ │ ├── __cts__.xml │ │ └── phi002 │ │ │ └── __cts__.xml │ │ ├── phi0914 │ │ ├── __cts__.xml │ │ └── phi001 │ │ │ └── __cts__.xml │ │ ├── phi1348 │ │ ├── __cts__.xml │ │ └── abo012 │ │ │ └── __cts__.xml │ │ ├── phi1035 │ │ ├── __cts__.xml │ │ └── phi001 │ │ │ └── __cts__.xml │ │ ├── phi1345 │ │ ├── __cts__.xml │ │ └── phi001 │ │ │ └── __cts__.xml │ │ ├── phi1221 │ │ ├── __cts__.xml │ │ └── phi007 │ │ │ └── __cts__.xml │ │ ├── phi1020 │ │ ├── __cts__.xml │ │ ├── phi002 │ │ │ └── __cts__.xml │ │ ├── phi001 │ │ │ └── __cts__.xml │ │ └── phi003 │ │ │ └── __cts__.xml │ │ ├── phi0959 │ │ ├── __cts__.xml │ │ ├── phi007 │ │ │ └── __cts__.xml │ │ ├── phi010 │ │ │ └── __cts__.xml │ │ ├── phi008 │ │ │ └── __cts__.xml │ │ ├── phi009 │ │ │ └── __cts__.xml │ │ ├── phi002 │ │ │ └── __cts__.xml │ │ ├── phi003 │ │ │ └── __cts__.xml │ │ ├── phi005 │ │ │ └── __cts__.xml │ │ ├── phi004 │ │ │ └── __cts__.xml │ │ ├── phi006 │ │ │ └── __cts__.xml │ │ └── phi001 │ │ │ └── __cts__.xml │ │ ├── phi0690 │ │ ├── __cts__.xml │ │ ├── phi001 │ │ │ └── __cts__.xml │ │ ├── phi003 │ │ │ └── __cts__.xml │ │ └── phi002 │ │ │ └── __cts__.xml │ │ ├── phi1212 │ │ ├── __cts__.xml │ │ ├── phi003 │ │ │ └── __cts__.xml │ │ ├── phi001 │ │ │ └── __cts__.xml │ │ └── phi002 │ │ │ └── __cts__.xml │ │ ├── phi1002 │ │ ├── __cts__.xml │ │ └── phi001 │ │ │ └── __cts__.xml │ │ ├── phi1038 │ │ ├── __cts__.xml │ │ └── phi001 │ │ │ └── __cts__.xml │ │ ├── phi1056 │ │ ├── __cts__.xml │ │ └── phi001 │ │ │ └── __cts__.xml │ │ ├── phi1254 │ │ ├── __cts__.xml │ │ └── phi001 │ │ │ └── __cts__.xml │ │ ├── phi1318 │ │ ├── __cts__.xml │ │ └── phi001 │ │ │ └── __cts__.xml │ │ ├── phi1351 │ │ ├── __cts__.xml │ │ ├── phi004 │ │ │ └── __cts__.xml │ │ ├── phi001 │ │ │ └── __cts__.xml │ │ └── phi002 │ │ │ └── __cts__.xml │ │ ├── phi1242 │ │ ├── __cts__.xml │ │ └── phi001 │ │ │ └── __cts__.xml │ │ ├── stoa0023 │ │ ├── __cts__.xml │ │ └── stoa001 │ │ │ └── __cts__.xml │ │ ├── stoa0089 │ │ ├── __cts__.xml │ │ ├── stoa007 │ │ │ └── __cts__.xml │ │ ├── stoa009 │ │ │ └── __cts__.xml │ │ ├── stoa008 │ │ │ └── __cts__.xml │ │ ├── stoa003 │ │ │ └── __cts__.xml │ │ ├── stoa002 │ │ │ └── __cts__.xml │ │ ├── stoa005 │ │ │ └── __cts__.xml │ │ ├── stoa004 │ │ │ └── __cts__.xml │ │ ├── stoa001 │ │ │ └── __cts__.xml │ │ ├── stoa006 │ │ │ └── __cts__.xml │ │ ├── stoa013 │ │ │ └── __cts__.xml │ │ ├── stoa012 │ │ │ └── __cts__.xml │ │ ├── stoa010 │ │ │ └── __cts__.xml │ │ ├── stoa011 │ │ │ └── __cts__.xml │ │ └── stoa014 │ │ │ └── __cts__.xml │ │ ├── stoa0238 │ │ ├── __cts__.xml │ │ ├── stoa002 │ │ │ └── __cts__.xml │ │ ├── stoa003 │ │ │ └── __cts__.xml │ │ ├── stoa005 │ │ │ └── __cts__.xml │ │ ├── stoa009 │ │ │ └── __cts__.xml │ │ ├── stoa001 │ │ │ └── __cts__.xml │ │ ├── stoa004 │ │ │ └── __cts__.xml │ │ ├── stoa006 │ │ │ └── __cts__.xml │ │ ├── stoa008 │ │ │ └── __cts__.xml │ │ └── stoa007 │ │ │ └── __cts__.xml │ │ ├── stoa0045 │ │ ├── __cts__.xml │ │ ├── stoa019 │ │ │ └── __cts__.xml │ │ ├── stoa008 │ │ │ └── __cts__.xml │ │ ├── stoa011 │ │ │ └── __cts__.xml │ │ ├── stoa012 │ │ │ └── __cts__.xml │ │ ├── stoa022 │ │ │ └── __cts__.xml │ │ ├── stoa006 │ │ │ └── __cts__.xml │ │ ├── stoa026 │ │ │ └── __cts__.xml │ │ ├── stoa007 │ │ │ └── __cts__.xml │ │ ├── stoa014 │ │ │ └── __cts__.xml │ │ ├── stoa025 │ │ │ └── __cts__.xml │ │ ├── stoa028 │ │ │ └── __cts__.xml │ │ ├── stoa010 │ │ │ └── __cts__.xml │ │ ├── stoa009 │ │ │ └── __cts__.xml │ │ ├── stoa021 │ │ │ └── __cts__.xml │ │ ├── stoa015 │ │ │ └── __cts__.xml │ │ ├── stoa018 │ │ │ └── __cts__.xml │ │ ├── stoa027 │ │ │ └── __cts__.xml │ │ ├── stoa017 │ │ │ └── __cts__.xml │ │ ├── stoa020 │ │ │ └── __cts__.xml │ │ ├── stoa016 │ │ │ └── __cts__.xml │ │ ├── stoa013 │ │ │ └── __cts__.xml │ │ ├── stoa004 │ │ │ └── __cts__.xml │ │ ├── stoa001 │ │ │ └── __cts__.xml │ │ ├── stoa002 │ │ │ └── __cts__.xml │ │ ├── stoa003 │ │ │ └── __cts__.xml │ │ └── stoa005 │ │ │ └── __cts__.xml │ │ ├── stoa0162 │ │ ├── __cts__.xml │ │ └── stoa004 │ │ │ └── __cts__.xml │ │ ├── stoa0203 │ │ ├── __cts__.xml │ │ └── stoa001 │ │ │ └── __cts__.xml │ │ ├── stoa0275 │ │ ├── __cts__.xml │ │ ├── stoa010 │ │ │ └── __cts__.xml │ │ ├── stoa013 │ │ │ └── __cts__.xml │ │ ├── stoa022 │ │ │ └── __cts__.xml │ │ ├── stoa001 │ │ │ └── __cts__.xml │ │ ├── stoa003 │ │ │ └── __cts__.xml │ │ ├── stoa011 │ │ │ └── __cts__.xml │ │ ├── stoa017 │ │ │ └── __cts__.xml │ │ ├── stoa019 │ │ │ └── __cts__.xml │ │ ├── stoa020 │ │ │ └── __cts__.xml │ │ ├── stoa023 │ │ │ └── __cts__.xml │ │ ├── stoa025 │ │ │ └── __cts__.xml │ │ ├── stoa030 │ │ │ └── __cts__.xml │ │ ├── stoa021 │ │ │ └── __cts__.xml │ │ ├── stoa002 │ │ │ └── __cts__.xml │ │ ├── stoa007 │ │ │ └── __cts__.xml │ │ ├── stoa012 │ │ │ └── __cts__.xml │ │ ├── stoa004 │ │ │ └── __cts__.xml │ │ ├── stoa006 │ │ │ └── __cts__.xml │ │ ├── stoa014 │ │ │ └── __cts__.xml │ │ ├── stoa005 │ │ │ └── __cts__.xml │ │ ├── stoa008 │ │ │ └── __cts__.xml │ │ ├── stoa028 │ │ │ └── __cts__.xml │ │ ├── stoa029 │ │ │ └── __cts__.xml │ │ ├── stoa016 │ │ │ └── __cts__.xml │ │ ├── stoa026 │ │ │ └── __cts__.xml │ │ ├── stoa018 │ │ │ └── __cts__.xml │ │ ├── stoa015 │ │ │ └── __cts__.xml │ │ ├── stoa024 │ │ │ └── __cts__.xml │ │ ├── stoa009 │ │ │ └── __cts__.xml │ │ └── stoa027 │ │ │ └── __cts__.xml │ │ ├── stoa0276 │ │ ├── __cts__.xml │ │ └── stoa002 │ │ │ └── __cts__.xml │ │ ├── phi2331 │ │ ├── __cts__.xml │ │ └── phi001 │ │ │ └── __cts__.xml │ │ └── phi1014 │ │ ├── __cts__.xml │ │ ├── phi003 │ │ └── __cts__.xml │ │ ├── phi004 │ │ └── __cts__.xml │ │ ├── phi001 │ │ └── __cts__.xml │ │ └── phi002 │ │ └── __cts__.xml │ ├── farsiLit │ └── data │ │ ├── hafez │ │ ├── __cts__.xml │ │ └── divan │ │ │ └── __cts__.xml │ │ └── phi1294 │ │ ├── __cts__.xml │ │ └── phi002 │ │ └── __cts__.xml │ ├── latinLit2 │ └── data │ │ ├── phi1276 │ │ ├── __cts__.xml │ │ └── phi001 │ │ │ └── __cts__.xml │ │ ├── phi1294 │ │ ├── __cts__.xml │ │ └── phi002 │ │ │ └── __cts__.xml │ │ ├── phi0959 │ │ ├── __cts__.xml │ │ ├── phi007 │ │ │ └── __cts__.xml │ │ ├── phi010 │ │ │ └── __cts__.xml │ │ ├── phi008 │ │ │ └── __cts__.xml │ │ ├── phi009 │ │ │ └── __cts__.xml │ │ ├── phi002 │ │ │ └── __cts__.xml │ │ ├── phi003 │ │ │ └── __cts__.xml │ │ ├── phi005 │ │ │ └── __cts__.xml │ │ ├── phi004 │ │ │ └── __cts__.xml │ │ ├── phi006 │ │ │ └── __cts__.xml │ │ └── phi001 │ │ │ └── __cts__.xml │ │ └── tlg0003 │ │ └── __cts__.xml │ └── cts │ ├── getFirstUrnEmpty.xml │ ├── getFirstUrn.xml │ ├── getprevnexturn.nextonly.xml │ ├── getprevnexturn.prevonly.xml │ ├── getprevnexturn.xml │ ├── getPassageOtherTest.xml │ ├── getValidReff.1.1.xml │ ├── getlabel.xml │ └── getpassage.xml ├── MyCapytain ├── resources │ ├── texts │ │ ├── __init__.py │ │ ├── api │ │ │ └── __init__.py │ │ └── locals │ │ │ └── __init__.py │ ├── collections │ │ ├── __init__.py │ │ └── dts.py │ ├── prototypes │ │ ├── cts │ │ │ └── __init__.py │ │ └── __init__.py │ └── __init__.py ├── setup.cfg ├── resolvers │ ├── __init__.py │ ├── cts │ │ └── __init__.py │ └── prototypes.py ├── common │ └── __init__.py ├── retrievers │ └── __init__.py ├── __init__.py └── errors.py ├── MANIFEST.in ├── doc ├── _static │ ├── images │ │ ├── logo.png │ │ ├── Collections.dia │ │ ├── Collections.png │ │ ├── Resolvers.After.dia │ │ ├── Resolvers.After.png │ │ ├── Resolvers.Before.dia │ │ └── Resolvers.Before.png │ └── pyreverse │ │ ├── classes_MyCapytain.png │ │ ├── packages_MyCapytain.png │ │ ├── classes_MyCapytain_texts.png │ │ ├── packages_MyCapytain_texts.png │ │ └── classes_MyCapytain_texts.dot ├── MyCapytain.workarounds.rst ├── MyCapytain.local.rst ├── index.rst ├── MyCapytain.uses.rst ├── Resolver.py ├── Retriever.py ├── MyCapytain.benchmark.rst └── Collections.py ├── requirements.txt ├── .gitignore ├── .travis.yml ├── Makefile ├── benchmark ├── devnotes.md └── with_pickle.py ├── LICENSE.txt ├── example.py ├── setup.py ├── inv └── dts.py /tests/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/common/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/resolvers/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/resources/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/retrievers/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/resolvers/cts/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/resources/proto/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/resources/texts/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /MyCapytain/resources/texts/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/resources/texts/api/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /MyCapytain/resources/texts/api/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/resources/collections/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/resources/texts/locals/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /MANIFEST.in: -------------------------------------------------------------------------------- 1 | recursive-include MyCapytain *.py -------------------------------------------------------------------------------- /MyCapytain/resources/collections/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /MyCapytain/resources/prototypes/cts/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /MyCapytain/resources/texts/locals/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /MyCapytain/setup.cfg: -------------------------------------------------------------------------------- 1 | [metadata] 2 | description-file = README.md -------------------------------------------------------------------------------- /doc/_static/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/D-K-E/MyCapytain/master/doc/_static/images/logo.png -------------------------------------------------------------------------------- /doc/_static/images/Collections.dia: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/D-K-E/MyCapytain/master/doc/_static/images/Collections.dia -------------------------------------------------------------------------------- /doc/_static/images/Collections.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/D-K-E/MyCapytain/master/doc/_static/images/Collections.png -------------------------------------------------------------------------------- /doc/_static/images/Resolvers.After.dia: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/D-K-E/MyCapytain/master/doc/_static/images/Resolvers.After.dia -------------------------------------------------------------------------------- /doc/_static/images/Resolvers.After.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/D-K-E/MyCapytain/master/doc/_static/images/Resolvers.After.png -------------------------------------------------------------------------------- /doc/_static/images/Resolvers.Before.dia: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/D-K-E/MyCapytain/master/doc/_static/images/Resolvers.Before.dia -------------------------------------------------------------------------------- /doc/_static/images/Resolvers.Before.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/D-K-E/MyCapytain/master/doc/_static/images/Resolvers.Before.png -------------------------------------------------------------------------------- /tests/testing_data/texts/License.txt: -------------------------------------------------------------------------------- 1 | sample.xml : Courtesy of github.com/PerseusDL/canonical-latinLit. See license information there -------------------------------------------------------------------------------- /doc/_static/pyreverse/classes_MyCapytain.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/D-K-E/MyCapytain/master/doc/_static/pyreverse/classes_MyCapytain.png -------------------------------------------------------------------------------- /doc/_static/pyreverse/packages_MyCapytain.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/D-K-E/MyCapytain/master/doc/_static/pyreverse/packages_MyCapytain.png -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | requests>=2.8.1 2 | lxml>=3.6.4 3 | mock>=2.0.0 4 | future>=0.16.0 5 | six>=1.10.0 6 | xmlunittest>=0.3.2 7 | rdflib-jsonld>=0.4.0 -------------------------------------------------------------------------------- /doc/_static/pyreverse/classes_MyCapytain_texts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/D-K-E/MyCapytain/master/doc/_static/pyreverse/classes_MyCapytain_texts.png -------------------------------------------------------------------------------- /doc/_static/pyreverse/packages_MyCapytain_texts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/D-K-E/MyCapytain/master/doc/_static/pyreverse/packages_MyCapytain_texts.png -------------------------------------------------------------------------------- /MyCapytain/resolvers/__init__.py: -------------------------------------------------------------------------------- 1 | """ 2 | .. module:: MyCapytain.resolvers 3 | :synopsis: Resolver objects 4 | 5 | .. moduleauthor:: Thibault Clérice 6 | 7 | 8 | """ 9 | -------------------------------------------------------------------------------- /MyCapytain/resolvers/cts/__init__.py: -------------------------------------------------------------------------------- 1 | """ 2 | .. module:: MyCapytain.resolvers.cts 3 | :synopsis: Resolver objects for CTS environments 4 | 5 | .. moduleauthor:: Thibault Clérice 6 | 7 | 8 | """ 9 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/phi1017/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Seneca, Lucius Annaeus 3 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/stoa0255/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Seneca, Lucius Annaeus 3 | -------------------------------------------------------------------------------- /MyCapytain/common/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | .. module:: MyCapytain.common 4 | :synopsis: Set of tools for common uses of CTS objects 5 | 6 | .. moduleauthor:: Thibault Clérice 7 | 8 | 9 | """ -------------------------------------------------------------------------------- /tests/testing_data/farsiLit/data/hafez/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Hafez 3 | 4 | -------------------------------------------------------------------------------- /MyCapytain/resources/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | .. module:: MyCapytain.resources 4 | :synopsis: PrototypeText and repository related objects 5 | 6 | .. moduleauthor:: Thibault Clérice 7 | 8 | 9 | """ -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/phi0472/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Catullus 3 | 4 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/phi0550/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Lucretius 3 | 4 | -------------------------------------------------------------------------------- /MyCapytain/retrievers/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | .. module:: MyCapytain.retrievers 4 | :synopsis: Implementation and abstraction of CTS related retrievers 5 | 6 | .. moduleauthor:: Thibault Clérice 7 | 8 | 9 | """ -------------------------------------------------------------------------------- /tests/testing_data/farsiLit/data/phi1294/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Martial 3 | 4 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/phi0474/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Cicero 3 | 4 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/phi0917/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Lucan 3 | 4 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/phi1276/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Juvenal 3 | 4 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/phi1294/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Martial 3 | 4 | -------------------------------------------------------------------------------- /MyCapytain/resources/prototypes/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | .. module:: MyCapytain.resources.proto 4 | :synopsis: Prototypes for PrototypeText and repository 5 | 6 | .. moduleauthor:: Thibault Clérice 7 | 8 | 9 | """ -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/phi0914/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Titus Livius (Livy) 3 | 4 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/phi1348/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Suetonius 3 | 4 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit2/data/phi1276/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Juvenal 3 | 4 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit2/data/phi1294/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Martial 3 | 4 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/phi1035/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Valerius Flaccus, Gaius 3 | 4 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/phi1345/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Silius Italicus, Tiberius Catius 3 | 4 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/phi1221/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Augustus Emperor of Rome 63 B.C.-14 A.D. 3 | 4 | -------------------------------------------------------------------------------- /tests/common/test_metadata.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | 4 | import unittest 5 | import six 6 | from collections import defaultdict 7 | from MyCapytain.common.metadata import Metadata 8 | from MyCapytain.common.constants import NAMESPACES, Mimetypes 9 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/phi1020/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Statius, P. Papinius (Publius Papinius) 3 | 4 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/phi0959/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Ovid 3 | Ovid 4 | 5 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit2/data/phi0959/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Ovid 3 | Ovid 4 | 5 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/phi0690/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Virgil 3 | Virgil 4 | 5 | -------------------------------------------------------------------------------- /doc/MyCapytain.workarounds.rst: -------------------------------------------------------------------------------- 1 | Known issues and recommendations 2 | ################################ 3 | 4 | XPath Issues 5 | ************ 6 | 7 | `lxml`, which is the package powering xml support here, does not accept XPath notations such as `/div/(a or b)[@n]`. Solution for this edge case is `/div/*[self::a or self::b][@n]` -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/phi1212/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Apuleius 3 | 4 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/phi1002/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | [Quintilian] 3 | 4 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/phi1038/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Paris, Julius 3 | 4 | -------------------------------------------------------------------------------- /MyCapytain/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | .. module:: MyCapytain 4 | :platform: Unix, Windows 5 | :synopsis: Canonical PrototypeText Service and Canonical URN tool suite for Python 6 | 7 | .. moduleauthor:: Thibault Clérice 8 | 9 | 10 | """ 11 | 12 | __version__ = "2.0.0b18" 13 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/phi1056/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Vitruvius Pollio. 3 | 4 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/phi1254/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Gellius, Aulus. 3 | 4 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/phi1318/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Pliny, the Younger 3 | 4 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/phi1351/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Tacitus, Cornelius 3 | 4 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/phi1242/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Florus, Lucius Annaeus. 3 | 4 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/stoa0023/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Ammianus Marcellinus. 3 | 4 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/stoa0089/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Claudianus, Claudius. 3 | 4 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/stoa0238/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Prudentius b. 348 3 | 4 | -------------------------------------------------------------------------------- /tests/testing_data/cts/getFirstUrnEmpty.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | GetFirstUrn 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/stoa0045/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Ausonius, Decimus Magnus. 3 | 4 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/stoa0162/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Jerome Saint d. 419 or 20 3 | 4 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/stoa0203/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Minucius Felix, Marcus. 3 | 4 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/stoa0275/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Tertullian ca. 160-ca. 230 3 | 4 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/stoa0276/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Tertullian ca. 160-ca. 230 3 | 4 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/phi2331/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Vopiscus, Flavius fl. 3./4. Jh. 3 | 4 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/phi1014/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Seneca, Lucius Annaeus, 55 B.C.-ca. 39 A.D. 3 | 4 | -------------------------------------------------------------------------------- /tests/testing_data/cts/getFirstUrn.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | GetFirstUrn 4 | 5 | 6 | urn:cts:latinLit:phi1294.phi002.perseus-lat2:1.pr 7 | 8 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.pkl 2 | # Compiled python modules. 3 | *.pyc 4 | .idea 5 | build 6 | env 7 | src 8 | env2 9 | test.py 10 | 11 | # Setuptools distribution folder. 12 | /dist/ 13 | /doc/build/ 14 | # Python egg metadata, regenerated from source files by setuptools. 15 | /*.egg-info 16 | 17 | /venv/ 18 | /venv2.7/ 19 | __pycache__ 20 | .coverall 21 | .coverage 22 | lxml-3.4.4-py3.4-linux-x86_64.egg/ 23 | *.egg 24 | /.eggs/ 25 | /venv*/ 26 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit2/data/tlg0003/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Thucydides 5 | 6 | Thucydides 7 | 8 | Thucydides 9 | 10 | -------------------------------------------------------------------------------- /doc/MyCapytain.local.rst: -------------------------------------------------------------------------------- 1 | Working with Local CapiTainS XML File 2 | ===================================== 3 | 4 | Introduction 5 | ############ 6 | 7 | The class :class:`MyCapytain.resources.texts.locals.tei.Text` requires the \ 8 | `guidelines of Capitains `_ to be implemented in your file. 9 | 10 | Example 11 | ####### 12 | 13 | .. literalinclude:: Text.py 14 | :language: python 15 | :linenos: -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: python 2 | python: 3 | - "2.7" 4 | - "3.4.5" 5 | - "3.5" 6 | 7 | install: 8 | - pip install -r requirements.txt 9 | - pip install coveralls 10 | 11 | # command to run tests 12 | script: 13 | - coverage run --source=MyCapytain setup.py test 14 | 15 | matrix: 16 | allow_failures: 17 | - python: "2.7" 18 | 19 | after_success: 20 | - if [[ $TRAVIS_PYTHON_VERSION == 3* ]]; then coveralls; fi 21 | 22 | branches: 23 | only: 24 | - master 25 | - rdflib-shift 26 | - dts-dev 27 | -------------------------------------------------------------------------------- /tests/testing_data/farsiLit/data/phi1294/phi002/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Epigrammata 3 | 4 | Epigrammata 5 | 6 | Somehow modified ? 7 | 8 | 9 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit2/data/phi1294/phi002/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Epigrammata 3 | 4 | Epigrams 5 | M. Valerii Martialis Epigrammaton libri / recognovit W. Heraeus 6 | 7 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | svg: 2 | ( \ 3 | source ./env/bin/activate; \ 4 | pyreverse -o png -p MyCapytain MyCapytain; \ 5 | pyreverse -o svg -p MyCapytain MyCapytain; \ 6 | ) 7 | 8 | classes: 9 | ( \ 10 | source ./env/bin/activate; \ 11 | pyreverse -A -k -o svg -p MyCapytain_texts MyCapytain.resources.prototypes.text; \ 12 | pyreverse -A -k -o png -p MyCapytain_texts MyCapytain.resources.prototypes.text; 13 | ) 14 | 15 | move: 16 | ( \ 17 | mv classes_* doc/_static/pyreverse/;\ 18 | mv packages_* doc/_static/pyreverse/;\ 19 | ) 20 | 21 | all:svg classes move -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/phi1351/phi004/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Historiae 3 | 4 | Historiae 5 | 6 | Historiae, Cornelli Taciti Historiarvm libri 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/phi1294/phi002/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Epigrammata 3 | 4 | Epigrammata 5 | 6 | M. Valerii Martialis Epigrammaton libri / recognovit W. Heraeus 7 | 8 | 9 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/phi1318/phi001/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Epistulae 3 | 4 | Epistulae, Letters 5 | Pliny, the Younger, creator; 6 | 7 | 8 | -------------------------------------------------------------------------------- /doc/index.rst: -------------------------------------------------------------------------------- 1 | .. MyCapytains documentation master file, created by 2 | sphinx-quickstart on Thu Jul 9 13:35:49 2015. 3 | You can adapt this file completely to your liking, but it should at least 4 | contain the root `toctree` directive. 5 | 6 | Welcome to MyCapytains's documentation! 7 | ======================================= 8 | 9 | .. include:: ../README.rst 10 | 11 | 12 | Contents 13 | ######## 14 | 15 | .. toctree:: 16 | :maxdepth: 2 17 | 18 | MyCapytain.classes 19 | MyCapytain.uses 20 | MyCapytain.local 21 | MyCapytain.workarounds 22 | MyCapytain.api 23 | MyCapytain.benchmark 24 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/stoa0162/stoa004/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Epistolae 3 | 4 | Epistulae, Select letters of St. Jerome 5 | Jerome, Saint, d. 419 or 20, creator; Wright, F. A. (Frederick Adam), 1869-1946, editor 6 | 7 | 8 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/phi1017/phi004/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Medea 3 | 4 | Medea, Tragoediae 5 | Seneca, Lucius Annaeus, ca. 4 B.C.-65 A.D, creator; Peiper, Rudolf, 1834-1898, editor; Richter, Gustav, 1838-1904, editor 6 | 7 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/phi1017/phi005/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Phaedra 3 | 4 | Phaedra, Tragoediae 5 | Seneca, Lucius Annaeus, ca. 4 B.C.-65 A.D, creator; Peiper, Rudolf, 1834-1898, editor; Richter, Gustav, 1838-1904, editor 6 | 7 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/phi1017/phi006/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Oedipus 3 | 4 | Oedipus, Tragoediae 5 | Seneca, Lucius Annaeus, ca. 4 B.C.-65 A.D, creator; Peiper, Rudolf, 1834-1898, editor; Richter, Gustav, 1838-1904, editor 6 | 7 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/phi1017/phi008/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Thyestes 3 | 4 | Thyestes, Tragoediae 5 | Seneca, Lucius Annaeus, ca. 4 B.C.-65 A.D, creator; Peiper, Rudolf, 1834-1898, editor; Richter, Gustav, 1838-1904, editor 6 | 7 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/phi1212/phi003/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Florida 3 | 4 | Florida, Florida 5 | Apuleius, creator; Helm, Rudolf Wilhelm Oskar, 1872-1966, editor 6 | 7 | 8 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/phi1017/phi003/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Phoenissae 3 | 4 | Phoenissae, Tragoediae 5 | Seneca, Lucius Annaeus, ca. 4 B.C.-65 A.D, creator; Peiper, Rudolf, 1834-1898, editor; Richter, Gustav, 1838-1904, editor 6 | 7 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/phi1017/phi007/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Agamemnon 3 | 4 | Agamemnon, Tragoediae 5 | Seneca, Lucius Annaeus, ca. 4 B.C.-65 A.D, creator; Peiper, Rudolf, 1834-1898, editor; Richter, Gustav, 1838-1904, editor 6 | 7 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/phi1212/phi001/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Apologia 3 | 4 | Apologia, Apologia 5 | Apuleius, creator; Helm, Rudolf Wilhelm Oskar, 1872-1966, editor 6 | 7 | 8 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/phi1017/phi001/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Hercules Furens 3 | 4 | Hercules Furens, Tragoediae 5 | Seneca, Lucius Annaeus, ca. 4 B.C.-65 A.D, creator; Peiper, Rudolf, 1834-1898, editor; Richter, Gustav, 1838-1904, editor 6 | 7 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/phi1017/phi002/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Troades Furens 3 | 4 | Troades Furens, Tragoediae 5 | Seneca, Lucius Annaeus, ca. 4 B.C.-65 A.D, creator; Peiper, Rudolf, 1834-1898, editor; Richter, Gustav, 1838-1904, editor 6 | 7 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/phi1017/phi015/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Epistulae 3 | 4 | Epistulae, Ad Lucilium epistulae morales Volume I-III 5 | Seneca, Lucius Annaeus, ca. 4 B.C.-65 A.D, creator; Gummere, Richard M. (Richard Mott), 1883-, editor 6 | 7 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/phi1017/phi009/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Hercules Oetaeus 3 | 4 | Hercules Oetaeus, Tragoediae 5 | Seneca, Lucius Annaeus, ca. 4 B.C.-65 A.D, creator; Peiper, Rudolf, 1834-1898, editor; Richter, Gustav, 1838-1904, editor 6 | 7 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/phi1276/phi001/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Satires 3 | 4 | Satires 5 | 6 | Juvenal and Persius: With An English Translation, G. G. Ramsay, 1918, William Heinemann; G. P. Putnam's Son, London 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit2/data/phi1276/phi001/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Satires 3 | 4 | Satires 5 | 6 | Juvenal and Persius: With An English Translation, G. G. Ramsay, 1918, William Heinemann; G. P. Putnam's Son, London 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/phi1017/phi010/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Octavia 3 | 4 | Octavia, Tragoediae 5 | Pseudo-Seneca, creator; Seneca, Lucius Annaeus, ca. 4 B.C.-65 A.D, creator; Peiper, Rudolf, 1834-1898, editor; Richter, Gustav, 1838-1904, editor 6 | 7 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/phi1351/phi001/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Agricola 3 | 4 | Agricola, Cornelli Taciti opera minora 5 | Tacitus, Cornelius, creator; Furneaux, Henry, 1829-1900, editor 6 | 7 | 8 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/phi1351/phi002/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Germania 3 | 4 | Germania, Cornelli Taciti opera minora 5 | Tacitus, Cornelius, creator; Furneaux, Henry, 1829-1900, editor 6 | 7 | 8 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/stoa0089/stoa007/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Fescinnina de nuptiis Honorii Augusti 3 | 4 | Fescinnina de nuptiis Honorii Augusti 5 | Claudianus, Claudius, creator; Platnauer, Maurice, editor; Platnauer, Maurice, translator 6 | 7 | 8 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/stoa0238/stoa002/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Psychomachia 3 | 4 | Psychomachia, Prudentius Vol 1 5 | Prudentius, b. 348, creator; Thomson, H. J, editor; Thomson, H. J, editor, translator 6 | 7 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/stoa0238/stoa003/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Praefetio 3 | 4 | Praefetio, Prudentius Vol 1 5 | Prudentius, b. 348, creator; Thomson, H. J, editor; Thomson, H. J, editor, translator 6 | 7 | 8 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/stoa0238/stoa005/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Apotheosis 3 | 4 | Apotheosis, Prudentius Vol 1 5 | Prudentius, b. 348, creator; Thomson, H. J, editor; Thomson, H. J, editor, translator 6 | 7 | 8 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/stoa0238/stoa009/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Epilogus 3 | 4 | Epilogus, Prudentius Vol 2 5 | Prudentius, b. 348, creator; Thomson, H. J, editor; Thomson, H. J, editor, translator 6 | 7 | 8 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/stoa0089/stoa009/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | In Rufinum 3 | 4 | In Rufinum, Claudian Vol I 5 | Claudianus, Claudius, creator; Platnauer, Maurice, editor; Platnauer, Maurice, translator 6 | 7 | 8 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/stoa0238/stoa001/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Liber Peristephanon 3 | 4 | Liber Peristephanon, Prudentius Vol 1 5 | Prudentius, b. 348, creator; Thomson, H. J, editor; Thomson, H. J, editor, translator 6 | 7 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/stoa0238/stoa004/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Cathemerina 3 | 4 | Cathemerina, Prudentius Vol 1 5 | Prudentius, b. 348, creator; Thomson, H. J, editor; Thomson, H. J, editor, translator 6 | 7 | 8 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/stoa0238/stoa006/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Hamartigenia 3 | 4 | Hamartigenia, Prudentius Vol 1 5 | Prudentius, b. 348, creator; Thomson, H. J, editor; Thomson, H. J, editor, translator 6 | 7 | 8 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/stoa0238/stoa008/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Dittochaeon 3 | 4 | Dittochaeon, Prudentius Vol 2 5 | Prudentius, b. 348, creator; Thomson, H. J, editor; Thomson, H. J, editor, translator 6 | 7 | 8 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/phi1017/phi014/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | De Clementia 3 | 4 | de Clementia, Moral essays Vol 1 5 | Seneca, Lucius Annaeus, ca. 4 B.C.-65 A.D, creator; Basore, John W. (John William), b. 1870, editor; Basore, John W. (John William), b. 1870, editor, translator 6 | 7 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/stoa0089/stoa008/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | In Eutropium 3 | 4 | In Eutropium, Claudian Vol I 5 | Claudianus, Claudius, creator; Platnauer, Maurice, editor; Platnauer, Maurice, translator 6 | 7 | 8 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/stoa0255/stoa010/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | de Ira 3 | 4 | de Ira, Moral essays Vol 2 5 | Seneca, Lucius Annaeus, ca. 4 B.C.-65 A.D, creator; Basore, John W. (John William), b. 1870, editor; Basore, John W. (John William), b. 1870, editor, translator 6 | 7 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/phi1017/phi013/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | De Beneficiis 3 | 4 | de Beneficiis, Moral essays Vol 3 5 | Seneca, Lucius Annaeus, ca. 4 B.C.-65 A.D, creator; Basore, John W. (John William), b. 1870, editor; Basore, John W. (John William), b. 1870, editor, translator 6 | 7 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/stoa0089/stoa003/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | de Bello Gothico 3 | 4 | de Bello Gothico, Claudian Vol II 5 | Claudianus, Claudius, creator; Platnauer, Maurice, editor; Platnauer, Maurice, translator 6 | 7 | 8 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/phi1212/phi002/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Metamorphoses 3 | 4 | Metamorphoses. Latin., The golden ass being the Metamorphoses of Lucius Apuleius 5 | Apuleius, creator; Gaselee, S. (Stephen), 1882-1943, editor 6 | 7 | 8 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/stoa0089/stoa002/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | de bello Gildonico 3 | 4 | de bello Gildonico, Claudian Vol I 5 | Claudianus, Claudius, creator; Platnauer, Maurice, editor; Platnauer, Maurice, translator 6 | 7 | 8 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/stoa0275/stoa010/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | De Anima 3 | 4 | De Anima, Quinti Septimii Florentis Tertulliani Quae Supersunt Omnia Tomus II 5 | Tertullian, ca. 160-ca. 230, creator; Oehler, Franz, editor 6 | 7 | 8 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/stoa0275/stoa013/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | De Corona 3 | 4 | De Corona, Quinti Septimii Florentis Tertulliani Quae Supersunt Omnia Tomus I 5 | Tertullian, ca. 160-ca. 230, creator; Oehler, Franz, editor 6 | 7 | 8 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/stoa0275/stoa022/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | De Pallio 3 | 4 | De Pallio, Quinti Septimii Florentis Tertulliani Quae Supersunt Omnia Tomus I 5 | Tertullian, ca. 160-ca. 230, creator; Oehler, Franz, editor 6 | 7 | 8 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/stoa0045/stoa019/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Mosella 3 | 4 | Mosella, Ausonius, with an English translation Vol 1 5 | Ausonius, Decimus Magnus, creator; Evelyn-White, Hugh G. (Hugh Gerard), d. 1924, editor 6 | 7 | 8 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/stoa0089/stoa005/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | de raptu Proserpinae 3 | 4 | de raptu Proserpinae, Claudian Vol II 5 | Claudianus, Claudius, creator; Platnauer, Maurice, editor; Platnauer, Maurice, translator 6 | 7 | 8 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/stoa0255/stoa009/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | de Constantia 3 | 4 | de Constantia, Moral essays Vol 2 5 | Seneca, Lucius Annaeus, ca. 4 B.C.-65 A.D, creator; Basore, John W. (John William), b. 1870, editor; Basore, John W. (John William), b. 1870, editor, translator 6 | 7 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/stoa0255/stoa012/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | de Providentia 3 | 4 | de Providentia, Moral essays Vol 2 5 | Seneca, Lucius Annaeus, ca. 4 B.C.-65 A.D, creator; Basore, John W. (John William), b. 1870, editor; Basore, John W. (John William), b. 1870, editor, translator 6 | 7 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/stoa0255/stoa014/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | de Vita Beata 3 | 4 | de Vita Beata, Moral essays Vol 2 5 | Seneca, Lucius Annaeus, ca. 4 B.C.-65 A.D, creator; Basore, John W. (John William), b. 1870, editor; Basore, John W. (John William), b. 1870, editor, translator 6 | 7 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/stoa0275/stoa001/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Ad Martyras 3 | 4 | Ad Martyras, Quinti Septimii Florentis Tertulliani Quae Supersunt Omnia Tomus I 5 | Tertullian, ca. 160-ca. 230, creator; Oehler, Franz, editor 6 | 7 | 8 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/stoa0275/stoa003/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Ad Scapulam 3 | 4 | Ad Scapulam, Quinti Septimii Florentis Tertulliani Quae Supersunt Omnia Tomus I 5 | Tertullian, ca. 160-ca. 230, creator; Oehler, Franz, editor 6 | 7 | 8 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/stoa0275/stoa011/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | De Baptismo 3 | 4 | De Baptismo, Quinti Septimii Florentis Tertulliani Quae Supersunt Omnia Tomus I 5 | Tertullian, ca. 160-ca. 230, creator; Oehler, Franz, editor 6 | 7 | 8 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/stoa0275/stoa017/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | De idolatria 3 | 4 | De Idolotria, Quinti Septimii Florentis Tertulliani Quae Supersunt Omnia Tomus I 5 | Tertullian, ca. 160-ca. 230, creator; Oehler, Franz, editor 6 | 7 | 8 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/stoa0275/stoa019/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | De Monogamia 3 | 4 | De Monogamia, Quinti Septimii Florentis Tertulliani Quae Supersunt Omnia Tomus I 5 | Tertullian, ca. 160-ca. 230, creator; Oehler, Franz, editor 6 | 7 | 8 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/stoa0275/stoa020/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | De Oratione 3 | 4 | De Oratione, Quinti Septimii Florentis Tertulliani Quae Supersunt Omnia Tomus I 5 | Tertullian, ca. 160-ca. 230, creator; Oehler, Franz, editor 6 | 7 | 8 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/stoa0275/stoa023/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | De Patientia 3 | 4 | De Patientia, Quinti Septimii Florentis Tertulliani Quae Supersunt Omnia Tomus I 5 | Tertullian, ca. 160-ca. 230, creator; Oehler, Franz, editor 6 | 7 | 8 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/stoa0275/stoa025/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | De Pudicitia 3 | 4 | De Pudicitia, Quinti Septimii Florentis Tertulliani Quae Supersunt Omnia Tomus I 5 | Tertullian, ca. 160-ca. 230, creator; Oehler, Franz, editor 6 | 7 | 8 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/stoa0275/stoa030/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Scorpiace 3 | 4 | De Scorpiace, Quinti Septimii Florentis Tertulliani Quae Supersunt Omnia Tomus I 5 | Tertullian, ca. 160-ca. 230, creator; Oehler, Franz, editor 6 | 7 | 8 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/stoa0045/stoa008/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Ephemeris 3 | 4 | Ephemeris, Ausonius, with an English translation Vol 1 5 | Ausonius, Decimus Magnus, creator; Evelyn-White, Hugh G. (Hugh Gerard), d. 1924, editor 6 | 7 | 8 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/stoa0045/stoa011/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Epistulae 3 | 4 | Epistulae, Ausonius, with an English translation Vol 2 5 | Ausonius, Decimus Magnus, creator; Evelyn-White, Hugh G. (Hugh Gerard), d. 1924, editor 6 | 7 | 8 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/stoa0045/stoa012/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Epitaphia 3 | 4 | Epitaphia, Ausonius, with an English translation Vol 1 5 | Ausonius, Decimus Magnus, creator; Evelyn-White, Hugh G. (Hugh Gerard), d. 1924, editor 6 | 7 | 8 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/stoa0045/stoa022/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Parentalia 3 | 4 | Parentalia, Ausonius, with an English translation Vol 1 5 | Ausonius, Decimus Magnus, creator; Evelyn-White, Hugh G. (Hugh Gerard), d. 1924, editor 6 | 7 | 8 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/stoa0255/stoa011/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | de Otio Sapientis 3 | 4 | de Otio Sapientis, Moral essays Vol 2 5 | Seneca, Lucius Annaeus, ca. 4 B.C.-65 A.D, creator; Basore, John W. (John William), b. 1870, editor; Basore, John W. (John William), b. 1870, editor, translator 6 | 7 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/stoa0275/stoa021/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | De Paenitentia 3 | 4 | De Paenitentia, Quinti Septimii Florentis Tertulliani Quae Supersunt Omnia Tomus I 5 | Tertullian, ca. 160-ca. 230, creator; Oehler, Franz, editor 6 | 7 | 8 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/stoa0045/stoa006/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | De Herediolo 3 | 4 | De Herediolo, Ausonius, with an English translation Vol 1 5 | Ausonius, Decimus Magnus, creator; Evelyn-White, Hugh G. (Hugh Gerard), d. 1924, editor 6 | 7 | 8 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/stoa0045/stoa026/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Precationes 3 | 4 | Precationes, Ausonius, with an English translation Vol 1 5 | Ausonius, Decimus Magnus, creator; Evelyn-White, Hugh G. (Hugh Gerard), d. 1924, editor 6 | 7 | 8 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/stoa0089/stoa004/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | de consulatu Stilichonis 3 | 4 | de consulatu Stilichonis, Claudian Vol I-II 5 | Claudianus, Claudius, creator; Platnauer, Maurice, editor; Platnauer, Maurice, translator 6 | 7 | 8 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/stoa0238/stoa007/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Contra Orationem Symmachia 3 | 4 | Contra Orationem Symmachia, Prudentius Vol 1-2 5 | Prudentius, b. 348, creator; Thomson, H. J, editor; Thomson, H. J, editor, translator 6 | 7 | 8 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/stoa0255/stoa004/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | de Brevitate Vitae 3 | 4 | de Brevitate Vitae, Moral essays Vol 2 5 | Seneca, Lucius Annaeus, ca. 4 B.C.-65 A.D, creator; Basore, John W. (John William), b. 1870, editor; Basore, John W. (John William), b. 1870, editor, translator 6 | 7 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/stoa0275/stoa002/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Ad Nationes Libri Duo 3 | 4 | Ad Nationes, Quinti Septimii Florentis Tertulliani Quae Supersunt Omnia Tomus I 5 | Tertullian, ca. 160-ca. 230, creator; Oehler, Franz, editor 6 | 7 | 8 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/stoa0275/stoa007/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Adversus Praxean 3 | 4 | Adversus Praxeam, Quinti Septimii Florentis Tertulliani Quae Supersunt Omnia Tomus II 5 | Tertullian, ca. 160-ca. 230, creator; Oehler, Franz, editor 6 | 7 | 8 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/stoa0275/stoa012/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | De Carne Christi 3 | 4 | De Carne Christi, Quinti Septimii Florentis Tertulliani Quae Supersunt Omnia Tomus II 5 | Tertullian, ca. 160-ca. 230, creator; Oehler, Franz, editor 6 | 7 | 8 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/stoa0045/stoa007/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Eclogarum Liber 3 | 4 | Eclogarum Liber, Ausonius, with an English translation Vol 1 5 | Ausonius, Decimus Magnus, creator; Evelyn-White, Hugh G. (Hugh Gerard), d. 1924, editor 6 | 7 | 8 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/stoa0045/stoa014/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Gratiarum Actio 3 | 4 | Gratiarum Actio, Ausonius, with an English translation Vol 2 5 | Ausonius, Decimus Magnus, creator; Evelyn-White, Hugh G. (Hugh Gerard), d. 1924, editor 6 | 7 | 8 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/stoa0045/stoa025/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Praefatiunculae 3 | 4 | Praefatiunculae, Ausonius, with an English translation Vol 1 5 | Ausonius, Decimus Magnus, creator; Evelyn-White, Hugh G. (Hugh Gerard), d. 1924, editor 6 | 7 | 8 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/stoa0045/stoa028/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Technopaegnion 3 | 4 | Technopaegnion, Ausonius, with an English translation Vol 1 5 | Ausonius, Decimus Magnus, creator; Evelyn-White, Hugh G. (Hugh Gerard), d. 1924, editor 6 | 7 | 8 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/stoa0089/stoa001/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Carminum minorum corpusculum 3 | 4 | Carminum minorum corpusculum, Claudian Vol II 5 | Claudianus, Claudius, creator; Platnauer, Maurice, editor; Platnauer, Maurice, translator 6 | 7 | 8 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/stoa0255/stoa013/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | de Tranquilitate Animi 3 | 4 | de Tranquilitate Animi, Moral essays Vol 2 5 | Seneca, Lucius Annaeus, ca. 4 B.C.-65 A.D, creator; Basore, John W. (John William), b. 1870, editor; Basore, John W. (John William), b. 1870, editor, translator 6 | 7 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/stoa0275/stoa004/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Adversus Hermogenem 3 | 4 | Adversus Hermogenem, Quinti Septimii Florentis Tertulliani Quae Supersunt Omnia Tomus II 5 | Tertullian, ca. 160-ca. 230, creator; Oehler, Franz, editor 6 | 7 | 8 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/stoa0275/stoa006/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Adversus Marcionem 3 | 4 | Adversus Marcionem, Quinti Septimii Florentis Tertulliani Quae Supersunt Omnia Tomus II 5 | Tertullian, ca. 160-ca. 230, creator; Oehler, Franz, editor 6 | 7 | 8 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/stoa0275/stoa014/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | De Cultu Feminarum 3 | 4 | De Cultu Feminarum, Quinti Septimii Florentis Tertulliani Quae Supersunt Omnia Tomus I 5 | Tertullian, ca. 160-ca. 230, creator; Oehler, Franz, editor 6 | 7 | 8 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/stoa0045/stoa010/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Epigrammaton Liber 3 | 4 | Epigrammaton Liber, Ausonius, with an English translation Vol 2 5 | Ausonius, Decimus Magnus, creator; Evelyn-White, Hugh G. (Hugh Gerard), d. 1924, editor 6 | 7 | 8 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/stoa0275/stoa005/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Adversus Judaeos Liber 3 | 4 | Adversus Judaeos Liber, Quinti Septimii Florentis Tertulliani Quae Supersunt Omnia Tomus II 5 | Tertullian, ca. 160-ca. 230, creator; Oehler, Franz, editor 6 | 7 | 8 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/stoa0275/stoa008/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Adversus Valentinianos 3 | 4 | Adversus Valentinianos, Quinti Septimii Florentis Tertulliani Quae Supersunt Omnia Tomus II 5 | Tertullian, ca. 160-ca. 230, creator; Oehler, Franz, editor 6 | 7 | 8 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/stoa0275/stoa028/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | De Testimionio Animae 3 | 4 | De Testimionio Animae, Quinti Septimii Florentis Tertulliani Quae Supersunt Omnia Tomus I 5 | Tertullian, ca. 160-ca. 230, creator; Oehler, Franz, editor 6 | 7 | 8 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/stoa0275/stoa029/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | De Virginibus Velandis 3 | 4 | De Virginibus Velandis, Quinti Septimii Florentis Tertulliani Quae Supersunt Omnia Tomus I 5 | Tertullian, ca. 160-ca. 230, creator; Oehler, Franz, editor 6 | 7 | 8 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/phi1014/phi003/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Suasoriae 3 | 4 | Suasoriae, Annaei Senecae Oratorum et rhetorum sententiae divisiones colores 5 | Seneca, Lucius Annaeus, 55 B.C.-ca. 39 A.D, creator; Kiessling, Adolf Gottlieb, 1837-1892, editor 6 | 7 | 8 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/phi1014/phi004/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Fragmenta 3 | 4 | Fragmenta, Annaei Senecae Oratorum et rhetorum sententiae divisiones colores 5 | Seneca, Lucius Annaeus, 55 B.C.-ca. 39 A.D, creator; Kiessling, Adolf Gottlieb, 1837-1892, editor 6 | 7 | 8 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/stoa0045/stoa009/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Epicedion in Patrem 3 | 4 | Epicedion in Patrem, Ausonius, with an English translation Vol 1 5 | Ausonius, Decimus Magnus, creator; Evelyn-White, Hugh G. (Hugh Gerard), d. 1924, editor 6 | 7 | 8 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/stoa0045/stoa021/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Ordo Urbium Nobilium 3 | 4 | Ordo Urbium Nobilium, Ausonius, with an English translation Vol 1 5 | Ausonius, Decimus Magnus, creator; Evelyn-White, Hugh G. (Hugh Gerard), d. 1924, editor 6 | 7 | 8 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/stoa0255/stoa006/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | de consolatione ad Helviam 3 | 4 | de consolatione ad Helviam, Moral essays Vol 2 5 | Seneca, Lucius Annaeus, ca. 4 B.C.-65 A.D, creator; Basore, John W. (John William), b. 1870, editor; Basore, John W. (John William), b. 1870, editor, translator 6 | 7 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/stoa0255/stoa007/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | de consolatione ad Marciam 3 | 4 | de consolatione ad Marciam, Moral essays Vol 2 5 | Seneca, Lucius Annaeus, ca. 4 B.C.-65 A.D, creator; Basore, John W. (John William), b. 1870, editor; Basore, John W. (John William), b. 1870, editor, translator 6 | 7 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/stoa0255/stoa008/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | de consolatione ad Polybium 3 | 4 | de consolatione ad Polybium, Moral essays Vol 2 5 | Seneca, Lucius Annaeus, ca. 4 B.C.-65 A.D, creator; Basore, John W. (John William), b. 1870, editor; Basore, John W. (John William), b. 1870, editor, translator 6 | 7 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/stoa0275/stoa016/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | De Fuga in Persecutione 3 | 4 | De Fuga in Persecutione, Quinti Septimii Florentis Tertulliani Quae Supersunt Omnia Tomus I 5 | Tertullian, ca. 160-ca. 230, creator; Oehler, Franz, editor 6 | 7 | 8 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/stoa0275/stoa026/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | De Carnis Resurrectione 3 | 4 | De Resurrectione Carnis, Quinti Septimii Florentis Tertulliani Quae Supersunt Omnia Tomus II 5 | Tertullian, ca. 160-ca. 230, creator; Oehler, Franz, editor 6 | 7 | 8 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/stoa0276/stoa002/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Ad Uxorem 3 | 4 | Ad Uxorem, Quinti Septimii Florentis Tertulliani Quae Supersunt Omnia Tomus I 5 | Tertullian, ca. 160-ca. 230, creator; Pseudo-Tertullian, creator; Oehler, Franz, editor 6 | 7 | 8 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/stoa0045/stoa015/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Griphus Ternarii Numeri 3 | 4 | Griphus Ternarii Numeri, Ausonius, with an English translation Vol 1 5 | Ausonius, Decimus Magnus, creator; Evelyn-White, Hugh G. (Hugh Gerard), d. 1924, editor 6 | 7 | 8 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/stoa0045/stoa018/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Ludus Septem Sapientum 3 | 4 | Ludus Septem Sapientum, Ausonius, with an English translation Vol 1 5 | Ausonius, Decimus Magnus, creator; Evelyn-White, Hugh G. (Hugh Gerard), d. 1924, editor 6 | 7 | 8 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/phi1014/phi001/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Controversiae 3 | 4 | Controversiae, Annaei Senecae Oratorum et rhetorum sententiae divisiones colores 5 | Seneca, Lucius Annaeus, 55 B.C.-ca. 39 A.D, creator; Kiessling, Adolf Gottlieb, 1837-1892, editor 6 | 7 | 8 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/stoa0045/stoa027/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Versus Paschales Prosodic 3 | 4 | Versus Paschales Prosodic, Ausonius, with an English translation Vol 1 5 | Ausonius, Decimus Magnus, creator; Evelyn-White, Hugh G. (Hugh Gerard), d. 1924, editor 6 | 7 | 8 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/stoa0089/stoa006/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Epithalamium de nuptiis Honorii Augusti 3 | 4 | Epithalamium de nuptiis Honorii Augusti, Claudian Vol I 5 | Claudianus, Claudius, creator; Platnauer, Maurice, editor; Platnauer, Maurice, translator 6 | 7 | 8 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/stoa0275/stoa018/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | De ieiunio adversus psychicos 3 | 4 | De ieiunio adversus psychicos, Quinti Septimii Florentis Tertulliani Quae Supersunt Omnia Tomus I 5 | Tertullian, ca. 160-ca. 230, creator; Oehler, Franz, editor 6 | 7 | 8 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/stoa0045/stoa017/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | [Libri de Fastis] Conclusio 3 | 4 | [Libri de Fastis] Conclusio, Ausonius, with an English translation Vol 1 5 | Ausonius, Decimus Magnus, creator; Evelyn-White, Hugh G. (Hugh Gerard), d. 1924, editor 6 | 7 | 8 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/stoa0045/stoa020/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Oratio Versibus Rhopalicis 3 | 4 | Oratio Versibus Rhopalicis, Ausonius, with an English translation Vol 1 5 | Ausonius, Decimus Magnus, creator; Evelyn-White, Hugh G. (Hugh Gerard), d. 1924, editor 6 | 7 | 8 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/stoa0275/stoa015/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | De Exhortatione Castitatis Liber 3 | 4 | De Exhortatione Castitatis Liber, Quinti Septimii Florentis Tertulliani Quae Supersunt Omnia Tomus I 5 | Tertullian, ca. 160-ca. 230, creator; Oehler, Franz, editor 6 | 7 | 8 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/stoa0275/stoa024/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | De Praescriptionibus Hereticorum 3 | 4 | De Praescriptionibus Hereticorum, Quinti Septimii Florentis Tertulliani Quae Supersunt Omnia Tomus II 5 | Tertullian, ca. 160-ca. 230, creator; Oehler, Franz, editor 6 | 7 | 8 | -------------------------------------------------------------------------------- /benchmark/devnotes.md: -------------------------------------------------------------------------------- 1 | ## Unit testing requests : 2 | From [SO](http://stackoverflow.com/questions/16864851/unit-testing-python-requests) 3 | ```python 4 | import mock 5 | 6 | from mymodule import my_method_under_test 7 | 8 | class MyTest(TestCase): 9 | 10 | def test_request_get(self): 11 | with patch('requests.get') as patched_get: 12 | my_method_under_test() 13 | # Ensure patched get was called, called only once and with exactly these params. 14 | patched_get.assert_called_once_with("https://ec2.amazonaws.com/", params={'Action': 'GetConsoleOutput', 'InstanceId': 'i-123456'}) 15 | ``` 16 | 17 | ###Useful links 18 | 19 | Submitting : 20 | - http://peterdowns.com/posts/first-time-with-pypi.html -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/stoa0089/stoa013/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Panegyricus dictus Manlio Theodoro consuli 3 | 4 | Panegyricus dictus Manlio Theodoro consuli, Claudian Vol I 5 | Claudianus, Claudius, creator; Platnauer, Maurice, editor; Platnauer, Maurice, translator 6 | 7 | 8 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/stoa0089/stoa012/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Panegyricus de sexto consulatu Honorii Augusti 3 | 4 | Panegyricus de sexto consulatu Honorii Augusti, Claudian Vol II 5 | Claudianus, Claudius, creator; Platnauer, Maurice, editor; Platnauer, Maurice, translator 6 | 7 | 8 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/phi1014/phi002/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Excerpta Controversiae 3 | 4 | Excerpta Controversiae, Annaei Senecae Oratorum et rhetorum sententiae divisiones colores 5 | Seneca, Lucius Annaeus, 55 B.C.-ca. 39 A.D, creator; Kiessling, Adolf Gottlieb, 1837-1892, editor 6 | 7 | 8 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/phi1020/phi002/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Silvae 3 | 4 | Silvae 5 | Statius, P. Papinius. Statius, Vol I-II. John Henry 6 | Mozley. London: William Heinemann; New York: G.P. Putnam's Sons. 1928. 7 | OCR. 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/phi1038/phi001/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Facta et Dicta Memorabilia 3 | 4 | Facta et Dicta Memorabilia, Factorum et dictorum memorabilium libri novem cum Iulii Paridis et Ianuarii Nepotiani epitomis 5 | Valerius Maximus, creator; Kempf, Karl Friedrich, 1819-, editor 6 | 7 | 8 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/stoa0045/stoa016/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Liber Protrepticus ad Nepotem 3 | 4 | Liber Protrepticus ad Nepotem, Ausonius, with an English translation Vol 2 Epistularum 5 | Ausonius, Decimus Magnus, creator; Evelyn-White, Hugh G. (Hugh Gerard), d. 1924, editor 6 | 7 | 8 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/stoa0089/stoa010/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Panegyricus de tertio consulatu Honorii Augusti 3 | 4 | Panegyricus de tertio consulatu Honorii Augusti, Claudian Vol I 5 | Claudianus, Claudius, creator; Platnauer, Maurice, editor; Platnauer, Maurice, translator 6 | 7 | 8 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/stoa0089/stoa011/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Panegyricus de quarto consulatu Honorii Augusti 3 | 4 | Panegyricus de quarto consulatu Honorii Augusti, Claudian Vol I 5 | Claudianus, Claudius, creator; Platnauer, Maurice, editor; Platnauer, Maurice, translator 6 | 7 | 8 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/stoa0089/stoa014/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Panegyricus dictus Probino et Olybrio consulibus 3 | 4 | Panegyricus dictus Probino et Olybrio consulibus, Claudian Vol I 5 | Claudianus, Claudius, creator; Platnauer, Maurice, editor; Platnauer, Maurice, translator 6 | 7 | 8 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/phi0959/phi007/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Book of Days 3 | Fastes 4 | Fasti 5 | 6 | Book of Days 7 | Ovid, 43 B.C.-17 or 18 A.D, creator; Frazer, James George, Sir, 1854-1941, editor 8 | 9 | 10 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/stoa0045/stoa013/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Genethliacon ad Ausonium Nepotem 3 | 4 | Genethliacon ad Ausonium Nepotem, Ausonius, with an English translation Vol 2 Epistulae 5 | Ausonius, Decimus Magnus, creator; Evelyn-White, Hugh G. (Hugh Gerard), d. 1924, editor 6 | 7 | 8 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit2/data/phi0959/phi007/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Book of Days 3 | Fastes 4 | Fasti 5 | 6 | Book of Days 7 | Ovid, 43 B.C.-17 or 18 A.D, creator; Frazer, James George, Sir, 1854-1941, editor 8 | 9 | 10 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/phi0959/phi010/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Ibis 3 | Ibis 4 | Ibis 5 | 6 | Ibis 7 | Ovid, 43 B.C.-17 or 18 A.D, creator; Merkel, Rudolf, 1811-1885, editor; Ehwald, Rudolf, 1847-1927, editor 8 | 9 | 10 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/stoa0045/stoa004/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Commemoratio Professorum Burdigalensium 3 | 4 | Commemoratio Professorum Burdigalensium, Ausonius, with an English translation Vol 1 5 | Ausonius, Decimus Magnus, creator; Evelyn-White, Hugh G. (Hugh Gerard), d. 1924, editor 6 | 7 | 8 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/stoa0045/stoa001/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Bissula 3 | 4 | Bissula, Ausonius, with an English translation Vol 1 5 | Ausonius, Decimus Magnus, creator; Evelyn-White, Hugh G. (Hugh Gerard), d. 1924, translator, editor; Evelyn-White, Hugh G. (Hugh Gerard), d. 1924, translator 6 | 7 | 8 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/stoa0045/stoa002/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Caesares 3 | 4 | Caesares, Ausonius, with an English translation Vol 1 5 | Ausonius, Decimus Magnus, creator; Evelyn-White, Hugh G. (Hugh Gerard), d. 1924, translator, editor; Evelyn-White, Hugh G. (Hugh Gerard), d. 1924, editor 6 | 7 | 8 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit2/data/phi0959/phi010/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Ibis 3 | Ibis 4 | Ibis 5 | 6 | Ibis 7 | Ovid, 43 B.C.-17 or 18 A.D, creator; Merkel, Rudolf, 1811-1885, editor; Ehwald, Rudolf, 1847-1927, editor 8 | 9 | 10 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/stoa0045/stoa003/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Cento Nuptialis 3 | 4 | Cento Nuptialis, Ausonius, with an English translation Vol 1 5 | Ausonius, Decimus Magnus, creator; Evelyn-White, Hugh G. (Hugh Gerard), d. 1924, translator, editor; Evelyn-White, Hugh G. (Hugh Gerard), d. 1924, editor 6 | 7 | 8 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/stoa0045/stoa005/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Cupido Cruciatus 3 | 4 | Cupido Cruciatus, Ausonius, with an English translation Vol 1 5 | Ausonius, Decimus Magnus, creator; Evelyn-White, Hugh G. (Hugh Gerard), d. 1924, editor; Evelyn-White, Hugh G. (Hugh Gerard), d. 1924, translator, editor 6 | 7 | 8 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/phi1348/abo012/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Divus Augustus 3 | 4 | Divus Augustus 5 | Perseus:bib:oclc,38471332, 6 | Perseus:bib:isbn,3519018276 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/phi0959/phi008/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Sorrows 3 | Tristes 4 | Tristia 5 | 6 | Tristia 7 | Ovid, 43 B.C.-17 or 18 A.D, creator; Wheeler, Arthur Leslie, 1871-1932, editor; Wheeler, Arthur Leslie, 1871-1932, editor, translator 8 | 9 | 10 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit2/data/phi0959/phi008/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Sorrows 3 | Tristes 4 | Tristia 5 | 6 | Tristia 7 | Ovid, 43 B.C.-17 or 18 A.D, creator; Wheeler, Arthur Leslie, 1871-1932, editor; Wheeler, Arthur Leslie, 1871-1932, editor, translator 8 | 9 | 10 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/phi0917/phi001/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Civil War 3 | 4 | Pharsalia 5 | Pharsaliae Libri X. M. Annaeus Lucanus. Carolus 6 | Hermannus Weise. Leipzig. G. Bassus. 1835. 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/phi0959/phi009/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Letters from the Black Sea 3 | Pontiques 4 | Ex Ponto 5 | 6 | Ex Ponto 7 | Ovid, 43 B.C.-17 or 18 A.D, creator; Wheeler, Arthur Leslie, 1871-1932, editor; Wheeler, Arthur Leslie, 1871-1932, editor, translator 8 | 9 | 10 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit2/data/phi0959/phi009/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Letters from the Black Sea 3 | Pontiques 4 | Ex Ponto 5 | 6 | Ex Ponto 7 | Ovid, 43 B.C.-17 or 18 A.D, creator; Wheeler, Arthur Leslie, 1871-1932, editor; Wheeler, Arthur Leslie, 1871-1932, editor, translator 8 | 9 | 10 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/phi2331/phi001/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | De Vita Hadriani 3 | 4 | De Vita Hadriani, The Scriptores historiae augustae Volume I 5 | Spartianus, Aelius, fl.3./4. Jh.‏, attributed author; Magie, David, 1877-, translator; O'Brien-Moore, Ainsworth, 1897-1936, translator; Ballou, Susan Helen, 1868-, translator; Ballou, Susan Helen, b. 1868, editor 6 | 7 | 8 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/phi1035/phi001/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Argonautica 3 | 4 | Argonautica 5 | C. Valerius Flaccus. Otto Kramer. C. Valeri Flacci 6 | Setini Balbi Argonauticon Libri Octo. Leipzig. Teubner. 1913. 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/phi1242/phi001/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Epitome Rerum Romanorum 3 | 4 | Epitome Rerum Romanorum, Lucius Annaeus Florus, Epitome of Roman history Cornelius Nepos 5 | Florus, Lucius Annaeus, creator; Nepos, Cornelius, creator; Forster, E. S. (Edward Seymour), 1879-1950, editor; Forster, E. S. (Edward Seymour), 1879-1950, translator; Rolfe, John Carew, 1859-1943, translator 6 | 7 | 8 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/phi1221/phi007/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Res Gestae 3 | 4 | Res Gestae, Res Gestae Divi Augusti 5 | Augustus, Emperor of Rome, 63 B.C.-14 A.D, creator; 6 | Brunt, P. A, editor; Moore, J. M. (John Michael), editor 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/phi1020/phi001/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Thebais 3 | 4 | Thebais 5 | Statius, P. Papinius. Statius, Vol I-II. John Henry 6 | Mozley. London: William Heinemann; New York: G.P. Putnam's Sons. 1928. 7 | OCR. 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/phi1020/phi003/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Achilleis 3 | 4 | Achilleis 5 | Statius, P. Papinius. Statius, Vol II. John Henry 6 | Mozley. London: William Heinemann; New York: G.P. Putnam's Sons. 1928. 7 | Keyboarding. 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/stoa0275/stoa009/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Apologeticum 3 | 4 | Apologeticum, Tertullian, Apology, De spectaculis 5 | Tertullian, ca. 160-ca. 230, creator; Minucius Felix, Marcus, creator; Glover, T. R. (Terrot Reaveley), 1869-1943, editor; Glover, T. R. (Terrot Reaveley), 1869-1943, editor, translator; Rendall, Gerald Henry, 1851-, editor, translator; Kerr, Walter Charles Alan, 1853-1929, editor, translator 6 | 7 | 8 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/stoa0275/stoa027/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | De Spectaculis 3 | 4 | De Spectaculis, Tertullian, Apology, De spectaculis 5 | Tertullian, ca. 160-ca. 230, creator; Minucius Felix, Marcus, creator; Glover, T. R. (Terrot Reaveley), 1869-1943, editor; Glover, T. R. (Terrot Reaveley), 1869-1943, editor, translator; Rendall, Gerald Henry, 1851-, editor, translator; Kerr, Walter Charles Alan, 1853-1929, editor, translator 6 | 7 | 8 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/phi1345/phi001/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Punica 3 | 4 | Punica 5 | Silius Italicus. Corpus Poetarum Latinorum, Vol 2. 6 | Walter Coventry Summers. John Percival Postgate. London. Sumptibus G. Bell et 7 | Filiorum. 1905. Keyboarding. 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /tests/common/test_utils.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | from six import text_type as str 4 | 5 | import unittest 6 | from MyCapytain.common.utils import * 7 | from copy import copy as deepcopy 8 | 9 | 10 | class TestUtils(unittest.TestCase): 11 | 12 | def test_clean_xpath(self): 13 | """ Cleaning XPATH and normalizing them """ 14 | l = ['tei:text', 'tei:body', 'tei:div', "tei:div[@n='1']", "tei:div[@n='pr']", "tei:l[@n='2']"] 15 | self.assertEqual(normalizeXpath(l), l) 16 | 17 | l = ['tei:text', 'tei:body', 'tei:div', "tei:div[@n='1']", "", "tei:div[@n='pr']", "tei:l[@n='2']"] 18 | self.assertEqual( 19 | normalizeXpath(l), 20 | ['tei:text', 'tei:body', 'tei:div', "tei:div[@n='1']", "/tei:div[@n='pr']", "tei:l[@n='2']"], 21 | "Empty list element should be replaced with / in the next element" 22 | ) -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/phi1254/phi001/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Noctes Atticae 3 | 4 | Noctes Atticae, Attic nights 5 | Gellius, Aulus, creator; Rolfe, John Carew, 1859-1943, editor 6 | 7 | 8 | Noctes Atticae, Attic nights 9 | Gellius, Aulus, creator; Rolfe, John Carew, 1859-1943, translator 10 | 11 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/stoa0203/stoa001/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Octavius 3 | 4 | Octavius, Tertullian, Apology, De spectaculis 5 | Minucius Felix, Marcus, creator; Tertullian, ca. 160-ca. 230, creator; Rendall, Gerald Henry, 1851-, editor; Kerr, Walter Charles Alan, 1853-1929, editor; Glover, T. R. (Terrot Reaveley), 1869-1943, editor, translator; Rendall, Gerald Henry, 1851-, editor, translator; Kerr, Walter Charles Alan, 1853-1929, editor, translator 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/phi0690/phi001/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Eclogues 3 | 4 | 5 | Virgil, creator; Greenough, J. B. (James Bradstreet), 1833-1901, editor 6 | 7 | 8 | 9 | Virgil, creator; Greenough, J. B. (James Bradstreet), 1833-1901, editor 10 | 11 | -------------------------------------------------------------------------------- /tests/testing_data/cts/getprevnexturn.nextonly.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | GetPrevNextUrn 4 | urn:cts:latinLit:phi1294.phi002.perseus-lat2:1.1 5 | 1.1 6 | urn:cts:latinLit:phi1294.phi002 7 | Martial 8 | Epigrammata 9 | Epigrammata 10 | 11 | 12 | 13 | 14 | 15 | urn:cts:latinLit:phi1294.phi002.perseus-lat2:1.1 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /tests/testing_data/cts/getprevnexturn.prevonly.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | GetPrevNextUrn 4 | urn:cts:latinLit:phi1294.phi002.perseus-lat2:1.1 5 | 1.1 6 | urn:cts:latinLit:phi1294.phi002 7 | Martial 8 | Epigrammata 9 | Epigrammata 10 | 11 | 12 | 13 | 14 | urn:cts:latinLit:phi1294.phi002.perseus-lat2:1.1.5 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/phi0914/phi001/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | The History of Rome 3 | 4 | The History of Rome 5 | Perseus:bib:oclc,2311635, Livy. History of Rome. English 6 | Translation by. Rev. Canon Roberts. New York, New York. E. P. Dutton and Co. 1912. 1. 7 | Livy. History of Rome. English Translation. Rev. Canon Roberts. New York, New York. E. P. 8 | Dutton and Co. 1912. 2. 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/phi0959/phi002/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Epistulae 3 | 4 | Epistulae 5 | Ovid, 43 B.C.-17 or 18 A.D, creator; Ehwald, Rudolf, 1847-1927, editor; Merkel, Rudolf, 1811-1885, editor 6 | 7 | 8 | 9 | Epistulae, The Epistles of Ovid 10 | Ovid, 43 B.C.-17 or 18 A.D, creator; Various, translator 11 | 12 | 13 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit2/data/phi0959/phi002/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Epistulae 3 | 4 | Epistulae 5 | Ovid, 43 B.C.-17 or 18 A.D, creator; Ehwald, Rudolf, 1847-1927, editor; Merkel, Rudolf, 1811-1885, editor 6 | 7 | 8 | 9 | Epistulae, The Epistles of Ovid 10 | Ovid, 43 B.C.-17 or 18 A.D, creator; Various, translator 11 | 12 | 13 | -------------------------------------------------------------------------------- /tests/testing_data/cts/getprevnexturn.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | GetPrevNextUrn 4 | urn:cts:latinLit:phi1294.phi002.perseus-lat2:1.1 5 | 1.1 6 | urn:cts:latinLit:phi1294.phi002 7 | Martial 8 | Epigrammata 9 | Epigrammata 10 | 11 | 12 | 13 | 14 | urn:cts:latinLit:phi1294.phi002.perseus-lat2:1.pr 15 | 16 | 17 | urn:cts:latinLit:phi1294.phi002.perseus-lat2:1.2 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/phi1056/phi001/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | On Architecture 3 | 4 | On Architecture, De architectura libri decem 5 | Vitruvius Pollio, creator; Krohn, Fritz, editor, F. Krohn 6 | 7 | 8 | On Architecture, Virtruvius the ten books on architecture 9 | Vitruvius Pollio, creator; Morgan, M. H. (Morris Hicky), 1859-1910, translator 10 | 11 | -------------------------------------------------------------------------------- /tests/testing_data/cts/getPassageOtherTest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | GetPassage 4 | urn:cts:latinLit:phi1294.phi002.perseus-lat2:1.1 5 | 6 | 7 | urn:cts:latinLit:phi1294.phi002.perseus-lat2:1.1 8 | 9 |
IHic est quem legis ille, quem requiris, Toto notus in orbe Martialis Argutis epigrammaton libellis: 10 | Cui, lector studiose, quod dedisti Viventi decus atque sentienti, Rari post cineres habent poetae.
11 |
12 |
13 |
-------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/phi0550/phi001/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | De Rerum Natura 3 | 4 | De Rerum Natura 5 | Lucretius. De Rerum Natura. William Ellery Leonard. E. P. 6 | Dutton. 1916. 7 | 8 | 9 | 10 | De Rerum Natura 11 | - 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/stoa0023/stoa001/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Rerum Gestarum 3 | 4 | Rerum Gestarum, Ammianus Marcellinus Volume I-III 5 | Ammianus Marcellinus, creator; Rolfe, John Carew, 1859-1943, translator 6 | 7 | 8 | Rerum Gestarum, Ammianus Marcellinus Volume I-III 9 | Ammianus Marcellinus, creator; Rolfe, John Carew, 1859-1943, editor 10 | 11 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/phi0474/phi013/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Against Catiline 3 | 4 | Against Catiline 5 | Perseus:bib:oclc,26994431, M. Tullius Cicero. M. Tulli 6 | Ciceronis Orationes: Recognovit brevique adnotatione critica instruxit Albertus 7 | Curtis Clark Collegii Reginae Socius. Albert Curtis Clark. Oxonii. e Typographeo 8 | Clarendoniano. 1908. Scriptorum Classicorum Bibliotheca 9 | Oxoniensis. 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/phi0474/phi024/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | For Marcus Caelius 3 | 4 | For Marcus Caelius 5 | Perseus:bib:oclc,26994431, M. Tullius Cicero. M. Tulli 6 | Ciceronis Orationes: Recognovit brevique adnotatione critica instruxit Albertus 7 | Curtis Clark Collegii Reginae Socius. Albert Curtis Clark. Oxonii. e Typographeo 8 | Clarendoniano. 1908. Scriptorum Classicorum Bibliotheca 9 | Oxoniensis. 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/phi0474/phi002/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | For Sextus Roscius of Ameria 3 | 4 | For Sextus Roscius of Ameria 5 | Perseus:bib:oclc,26994431, M. Tullius Cicero. M. Tulli 6 | Ciceronis Orationes: Recognovit brevique adnotatione critica instruxit Albertus 7 | Curtis Clark Collegii Reginae Socius. Albert Curtis Clark. Oxonii. e Typographeo 8 | Clarendoniano. 1908. Scriptorum Classicorum Bibliotheca 9 | Oxoniensis. 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/phi0690/phi003/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Aeneid 3 | 4 | Aeneid 5 | Perseus:bib:oclc,22858571, Vergil. Bucolics, Aeneid, and 6 | Georgics Of Vergil. J. B. Greenough. Boston. Ginn & Co. 7 | 1900. 8 | 9 | 10 | 11 | Aeneid 12 | Vergil. Aeneid. John Dryden. trans. 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/phi0690/phi002/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Georgics 3 | 4 | Georgics 5 | Perseus:bib:oclc,22858571, Vergil. Bucolics, Aeneid, and 6 | Georgics Of Vergil. J. B. Greenough. Boston. Ginn & Co. 1900. 7 | 8 | 9 | 10 | Georgics 11 | Perseus:bib:oclc,22858571, Vergil. Bucolics, Aeneid, and 12 | Georgics Of Vergil. J. B. Greenough. Boston. Ginn & Co. 1900. 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/phi1002/phi001/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Institutio Oratoria 3 | 4 | Institutio Oratoria, The Institutio oratoria of Quintilian 5 | Quintilian, creator; Butler, Harold Edgeworth, 1878-1951, editor; Butler, Harold Edgeworth, 1878-1951, editor, translator 6 | 7 | 8 | Institutio Oratoria, The Institutio oratoria of Quintilian 9 | Quintilian, creator; Butler, Harold Edgeworth, 1878-1951, editor; Butler, Harold Edgeworth, 1878-1951, editor, translator 10 | 11 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 Perseus, Tufts & Humboldt Chair of Digital Humanities, Leipzig 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /benchmark/with_pickle.py: -------------------------------------------------------------------------------- 1 | """ Mini snippet built to evaluate speed changes in between Etree and Objectify._element 2 | 3 | """ 4 | import pickle 5 | 6 | import lxml.objectify 7 | from lxml.etree import XMLParser 8 | 9 | from MyCapytain.resources.texts.locals.tei import Text 10 | 11 | X = XMLParser() 12 | Z = lxml.objectify.makeparser() 13 | 14 | canonical = '../../canonicals/canonical-latinLit' 15 | 16 | f = open(canonical + '/data/phi1017/phi004/phi1017.phi004.perseus-lat2.xml') 17 | r = lxml.objectify.parse(f, Z ) 18 | t = Text(resource=r) 19 | with open("pickled.pkl", "wb") as p: 20 | pickle.dump(t, p) 21 | 22 | f = open(canonical + '/data/phi1294/phi002/phi1294.phi002.perseus-lat2.xml') 23 | r = lxml.objectify.parse(f, Z ) 24 | t = Text(resource=r) 25 | with open("pickled2.pkl", "wb") as p: 26 | pickle.dump(t, p) 27 | 28 | f = open(canonical + '/data/stoa0045/stoa001/stoa0045.stoa001.perseus-lat2.xml') 29 | r = lxml.objectify.parse(f, Z ) 30 | t = Text(resource=r) 31 | with open("pickled3.pkl", "wb") as p: 32 | pickle.dump(t, p) 33 | 34 | f = open(canonical + '/data/phi1294/phi002/phi1294.phi002.perseus-lat2.xml') 35 | r = lxml.objectify.parse(f, Z ) 36 | with open("pickled4.pkl", "wb") as p: 37 | pickle.dump(r, p) -------------------------------------------------------------------------------- /example.py: -------------------------------------------------------------------------------- 1 | from MyCapytain.resolvers.cts.api import HttpCTSResolver 2 | from MyCapytain.retrievers.cts5 import CTS 3 | from MyCapytain.common.constants import Mimetypes 4 | 5 | # We set up a resolver which communicates with an API available in Leipzig 6 | resolver = HttpCTSResolver(CTS("http://cts.dh.uni-leipzig.de/api/cts/")) 7 | # We require some metadata information 8 | textMetadata = resolver.getMetadata("urn:cts:latinLit:phi1294.phi002.perseus-lat2") 9 | # Texts in CTS Metadata have one interesting property : its citation scheme. 10 | # Citation are embedded objects that carries information about how a text can be quoted, what depth it has 11 | print(type(textMetadata), [citation.name for citation in textMetadata.citation]) 12 | # Now, we want to retrieve the first line of poem seventy two of the second book 13 | passage = resolver.getTextualNode("urn:cts:latinLit:phi1294.phi002.perseus-lat2", subreference="2.72.1") 14 | # And we want to have its content exported to plain text and have the siblings of this passage (previous and next line) 15 | print(passage.export(Mimetypes.PLAINTEXT), passage.siblingsId) 16 | poemsInBook3 = resolver.getReffs("urn:cts:latinLit:phi1294.phi002.perseus-lat2", subreference="3") 17 | print(poemsInBook3) 18 | -------------------------------------------------------------------------------- /doc/MyCapytain.uses.rst: -------------------------------------------------------------------------------- 1 | Project using MyCapytain 2 | ======================== 3 | 4 | If you are using MyCapytain and wish to appear here, please feel free to open an `issue `_ 5 | 6 | Extensions 7 | ########## 8 | 9 | Nautilus 10 | ******** 11 | `Nautilus `_ provides a local retriever to build inventory based on a set of folders available locally. 12 | 13 | Flask Capitains Nemo 14 | ******************** 15 | 16 | `Flask Capitains Nemo `_ is an extension for Flask to build a browsing interface 17 | using both retrievers and resources modules. You will find example of use in a web based environment. 18 | 19 | HookTest 20 | ******** 21 | 22 | `HookTest `_ is a library and command line tools for checking resources against the Capitains Guidelines 23 | You'll find uses mainly in `units.py `_ 24 | 25 | CLTK Corpora Converter 26 | ********************** 27 | 28 | `Capitains Corpora Converter `_ Converts CapiTainS-based Repository ( http://capitains.github.io ) to JSON for CLTK -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/phi0959/phi003/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Art of Beauty 3 | Les Fards ou Soins du visage 4 | Medicamina faciei femineae 5 | 6 | Art of Beauty 7 | Ovid, 43 B.C.-17 or 18 A.D, creator; Ehwald, Rudolf, 1847-1927, editor; Merkel, Rudolf, 1811-1885, editor 8 | 9 | 10 | Medicamina Faciei Femineae, The Art of Love in Three Books The remedy of love. The art of beauty. The court of love. The history of love amours. 11 | Ovid, 43 B.C.-17 or 18 A.D, creator; Anonymous, translator; , editor 12 | 13 | 14 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit2/data/phi0959/phi003/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Art of Beauty 3 | Les Fards ou Soins du visage 4 | Medicamina faciei femineae 5 | 6 | Art of Beauty 7 | Ovid, 43 B.C.-17 or 18 A.D, creator; Ehwald, Rudolf, 1847-1927, editor; Merkel, Rudolf, 1811-1885, editor 8 | 9 | 10 | Medicamina Faciei Femineae, The Art of Love in Three Books The remedy of love. The art of beauty. The court of love. The history of love amours. 11 | Ovid, 43 B.C.-17 or 18 A.D, creator; Anonymous, translator; , editor 12 | 13 | 14 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/phi0959/phi005/__cts__.xml: -------------------------------------------------------------------------------- 1 | 3 | Remedy of Love 4 | Remède à l'amour 5 | Remedia amoris 6 | 8 | Remedy of Love 9 | Ovid, 43 B.C.-17 or 18 A.D, creator; Ehwald, Rudolf, 1847-1927, editor; Merkel, Rudolf, 1811-1885, editor 10 | 11 | 13 | Remedia Amoris, The Art of Love in Three Books The remedy of love. The 14 | art of beauty. The court of love. The history of love amours. 15 | Ovid, 43 B.C.-17 or 18 A.D, creator; Tate, Nahum, 1652-1715, 16 | translator; , editor 17 | 18 | 19 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit2/data/phi0959/phi005/__cts__.xml: -------------------------------------------------------------------------------- 1 | 3 | Remedy of Love 4 | Remède à l'amour 5 | Remedia amoris 6 | 8 | Remedy of Love 9 | Ovid, 43 B.C.-17 or 18 A.D, creator; Ehwald, Rudolf, 1847-1927, editor; Merkel, Rudolf, 1811-1885, editor 10 | 11 | 13 | Remedia Amoris, The Art of Love in Three Books The remedy of love. The 14 | art of beauty. The court of love. The history of love amours. 15 | Ovid, 43 B.C.-17 or 18 A.D, creator; Tate, Nahum, 1652-1715, 16 | translator; , editor 17 | 18 | 19 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/phi0959/phi004/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Art of Love 3 | L'Art d'Aimer 4 | Ars Amatoria 5 | 6 | Art of Love 7 | Ovid, 43 B.C.-17 or 18 A.D, creator; Ehwald, Rudolf, 1847-1927, 8 | editor; Merkel, Rudolf, 1811-1885, editor 9 | 10 | 11 | Ars Amatoria, The Art of Love in Three Books The remedy of love. The 12 | art of beauty. The court of love. The history of love amours. 13 | Ovid, 43 B.C.-17 or 18 A.D, creator; Dryden, John, 1631-1700, 14 | translator; Congreve, William, 1670-1729, translator; , editor 15 | 16 | 17 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit2/data/phi0959/phi004/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Art of Love 3 | L'Art d'Aimer 4 | Ars Amatoria 5 | 6 | Art of Love 7 | Ovid, 43 B.C.-17 or 18 A.D, creator; Ehwald, Rudolf, 1847-1927, 8 | editor; Merkel, Rudolf, 1811-1885, editor 9 | 10 | 11 | Ars Amatoria, The Art of Love in Three Books The remedy of love. The 12 | art of beauty. The court of love. The history of love amours. 13 | Ovid, 43 B.C.-17 or 18 A.D, creator; Dryden, John, 1631-1700, 14 | translator; Congreve, William, 1670-1729, translator; , editor 15 | 16 | 17 | -------------------------------------------------------------------------------- /setup.py: -------------------------------------------------------------------------------- 1 | from setuptools import setup, find_packages 2 | 3 | import MyCapytain 4 | 5 | setup( 6 | name='MyCapytain', 7 | version=MyCapytain.__version__, 8 | description='Library for CTS APIs and CapiTainS guidelines in Python', 9 | url='http://github.com/Capitains/MyCapytain', 10 | author='Thibault Clerice', 11 | author_email='leponteineptique@gmail.com', 12 | license='MIT', 13 | packages=find_packages(exclude=["*.tests", "*.tests.*", "tests.*", "tests"]), 14 | install_requires=[ 15 | "requests>=2.8.1", 16 | "six>=1.10.0", 17 | "lxml>=3.6.4", 18 | "future>=0.16.0", 19 | "rdflib-jsonld>=0.4.0" 20 | ], 21 | tests_require=[ 22 | "mock>=2.0.0", 23 | "xmlunittest>=0.3.2" 24 | ], 25 | extras_require={ 26 | "DOC": ["Sphinx==1.3.1"] 27 | }, 28 | test_suite="tests", 29 | zip_safe=False, 30 | classifiers=[ 31 | "Development Status :: 5 - Production/Stable", 32 | "Intended Audience :: Developers", 33 | "Intended Audience :: Education", 34 | "Intended Audience :: Information Technology", 35 | "Intended Audience :: Science/Research", 36 | "License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)", 37 | "Topic :: Software Development :: Libraries", 38 | "Topic :: Text Processing :: Markup :: XML", 39 | "Topic :: Text Processing :: General" 40 | ] 41 | ) 42 | -------------------------------------------------------------------------------- /doc/Resolver.py: -------------------------------------------------------------------------------- 1 | from MyCapytain.resolvers.cts.api import HttpCTSResolver 2 | from MyCapytain.retrievers.cts5 import CTS 3 | from MyCapytain.common.constants import Mimetypes, NS 4 | 5 | # We set up a resolver which communicates with an API available in Leipzig 6 | resolver = HttpCTSResolver(CTS("http://cts.dh.uni-leipzig.de/api/cts/")) 7 | # We require a passage : passage is now a Passage object 8 | # This is an entry from the Smith Myth Dictionary 9 | # 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 10 | # And parse it into interactive objects 11 | passage = resolver.getTextualNode("urn:cts:pdlrefwk:viaf88890045.003.perseus-eng1", "A.abaeus_1") 12 | # We need an export as plaintext 13 | print(passage.export( 14 | output=Mimetypes.PLAINTEXT 15 | )) 16 | """ 17 | Abaeus ( Ἀβαῖος ), a surname of Apollo 18 | derived from the town of Abae in Phocis, where the god had a rich temple. (Hesych. s. v. 19 | Ἄβαι ; Hdt. 8.33 ; Paus. 10.35.1 , &c.) [ L.S ] 20 | """ 21 | # We want to find bibliographic information in the passage of this dictionary 22 | # We need an export as LXML ETREE object to perform XPath 23 | print( 24 | passage.export( 25 | output=Mimetypes.PYTHON.ETREE 26 | ).xpath(".//tei:bibl/text()", namespaces=NS, magic_string=False) 27 | ) 28 | ["Hdt. 8.33", "Paus. 10.35.1"] -------------------------------------------------------------------------------- /doc/Retriever.py: -------------------------------------------------------------------------------- 1 | from MyCapytain.retrievers.cts5 import CTS 2 | 3 | # We set up a retriever which communicates with an API available in Leipzig 4 | retriever = CTS("http://cts.dh.uni-leipzig.de/api/cts/") 5 | # We require a passage : passage is now a Passage object 6 | passage = retriever.getPassage("urn:cts:latinLit:phi1294.phi002.perseus-lat2:1.1") 7 | # Passage is now equal to the string content of http://cts.dh.uni-leipzig.de/api/cts/?request=GetPassage&urn=urn:cts:latinLit:phi1294.phi002.perseus-lat2:1.1 8 | print(passage) 9 | 10 | """ 11 | GetPassageurn:cts:latinLit:phi1294.phi002.perseus-lat2:1.1 12 | urn:cts:latinLit:phi1294.phi002.perseus-lat2:1.1 13 | 14 |
15 |
16 | I 17 | Hic est quem legis ille, quem requiris, 18 | Toto notus in orbe Martialis 19 | Argutis epigrammaton libellis: 20 | Cui, lector studiose, quod dedisti 21 | Viventi decus atque sentienti, 22 | Rari post cineres habent poetae. 23 |
24 | """ -------------------------------------------------------------------------------- /inv: -------------------------------------------------------------------------------- 1 | {"@graph": {"dts:size": 2, "dts:parents": [{"@id": "urn:cts:latinLit:phi0959", "dts:url": "urn:cts:latinLit:phi0959", "rdfs:label": {"@lang": "eng", "@value": "Ovid"}}, {"@id": "", "dts:url": "", "rdfs:label": ""}], "dts:members": [{"@id": "urn:cts:latinLit:phi0959.phi005.perseus-eng2", "dts:url": "urn:cts:latinLit:phi0959.phi005.perseus-eng2", "rdfs:label": {"@lang": "eng", "@value": "Remedia Amoris, The Art of Love in Three Books The remedy of love. The\n art of beauty. The court of love. The history of love amours."}}, {"@id": "urn:cts:latinLit:phi0959.phi005.perseus-lat2", "dts:url": "urn:cts:latinLit:phi0959.phi005.perseus-lat2", "rdfs:label": {"@lang": "eng", "@value": "Remedy of Love"}}], "@id": "urn:cts:latinLit:phi0959.phi005", "rdfs:label": {"@lang": "lat", "@value": "Remedia amoris"}, "dts:metadata": {"skos:prefLabel": [{"@lang": "eng", "@value": "Remedy of Love"}, {"@lang": "fre", "@value": "Rem\u0102\u00a8de \u0102\u00a0 l'amour"}, {"@lang": "lat", "@value": "Remedia amoris"}], "title": [{"@lang": "lat", "@value": "Remedia amoris"}, {"@lang": "eng", "@value": "Remedy of Love"}, {"@lang": "fre", "@value": "Rem\u0102\u00a8de \u0102\u00a0 l'amour"}]}}, "@context": {"dts": "http://w3id.org/dts-ontology/", "": "http://chs.harvard.edu/xmlns/cts/", "rdfs": "http://www.w3.org/2000/01/rdf-schema#", "ns1": "http://purl.org/dc/elements/1.1/", "rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#", "skos": "http://www.w3.org/2004/02/skos/core#"}} -------------------------------------------------------------------------------- /doc/_static/pyreverse/classes_MyCapytain_texts.dot: -------------------------------------------------------------------------------- 1 | digraph "classes_MyCapytain_texts" { 2 | charset="utf-8" 3 | rankdir=BT 4 | "0" [label="CTSNode", shape="record"]; 5 | "1" [label="CitableText", shape="record"]; 6 | "2" [label="Collection", shape="record"]; 7 | "3" [label="InteractiveTextualNode", shape="record"]; 8 | "4" [label="Metadata", shape="record"]; 9 | "5" [label="Passage", shape="record"]; 10 | "6" [label="TextualElement", shape="record"]; 11 | "7" [label="TextualGraph", shape="record"]; 12 | "8" [label="TextualNode", shape="record"]; 13 | "9" [label="URN", shape="record"]; 14 | "10" [label="defaultdict", shape="record"]; 15 | "0" -> "3" [arrowhead="empty", arrowtail="none"]; 16 | "1" -> "0" [arrowhead="empty", arrowtail="none"]; 17 | "3" -> "7" [arrowhead="empty", arrowtail="none"]; 18 | "5" -> "0" [arrowhead="empty", arrowtail="none"]; 19 | "7" -> "8" [arrowhead="empty", arrowtail="none"]; 20 | "8" -> "6" [arrowhead="empty", arrowtail="none"]; 21 | "2" -> "6" [arrowhead="diamond", arrowtail="none", fontcolor="green", label="__about__", style="solid"]; 22 | "4" -> "2" [arrowhead="diamond", arrowtail="none", fontcolor="green", label="metadata", style="solid"]; 23 | "9" -> "0" [arrowhead="diamond", arrowtail="none", fontcolor="green", label="__urn__", style="solid"]; 24 | "10" -> "4" [arrowhead="diamond", arrowtail="none", fontcolor="green", label="metadata", style="solid"]; 25 | "10" -> "4" [arrowhead="diamond", arrowtail="none", fontcolor="green", label="metadata", style="solid"]; 26 | } 27 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/phi1017/phi011/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Apocolocyntosis 3 | 4 | Apocolocyntosis, Petronius, with an English translation by Michael Heseltine Seneca. Apocolocyntosis, with an English translation by W.H.D. Rouse 5 | Seneca, Lucius Annaeus, ca. 4 B.C.-65 A.D, creator; Petronius Arbiter, creator; Rouse, W. H. D. (William Henry Denham), 1863-1950, editor; Heseltine, Michael, translator; Rouse, W. H. D. (William Henry Denham), 1863-1950, translator 6 | 7 | 8 | Apocolocyntosis, Petronius, with an English translation by Michael Heseltine Seneca. Apocolocyntosis, with an English translation by W.H.D. Rouse 9 | Seneca, Lucius Annaeus, ca. 4 B.C.-65 A.D, creator; Petronius Arbiter, creator; Rouse, W. H. D. (William Henry Denham), 1863-1950, editor; Heseltine, Michael, translator; Rouse, W. H. D. (William Henry Denham), 1863-1950, translator 10 | 11 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/phi0472/phi001/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Carmina 3 | 4 | Carmina 5 | Perseus:bib:oclc,878062, Catullus. Carmina. Sir Richard Francis 6 | Burton. trans. London. For translator for private use. 1894. 7 | 8 | 9 | Carmina of Caius Valerius Catullus, The Carmina of Caius Valerius CatullusCatullus, Gaius Valerius, creator; Smithers, Leonard C. (Leonard Charles), 1861-1907, translator, Prose translator 10 | Poems, CatullusCatullus, Gaius Valerius, creator; Merrill, Elmer Truesdell, 1860-1936, editor 11 | 12 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/phi0959/phi006/__cts__.xml: -------------------------------------------------------------------------------- 1 | 3 | Metamorphoses 4 | 6 | Metamorphoses 7 | Perseus:bib:oclc,32116154, Ovid. Metamorphoses. Hugo Magnus. 8 | Gotha (Germany). Friedr. Andr. Perthes. 1892. 9 | 10 | 11 | 13 | Metamorphoses (English Translation by Brooks More) 14 | Perseus:bib:oclc,24965574, Ovid. Metamorphoses. Brookes More. 15 | Boston. Cornhill Publishing Co. 1922. 16 | 17 | 18 | 20 | Metamorphoses (English Translation by Golding Arthur) 21 | Ovid, 43 B.C.-17 or 18 A.D, creator; Golding, Arthur, 1536-1606, 22 | translator. 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit2/data/phi0959/phi006/__cts__.xml: -------------------------------------------------------------------------------- 1 | 3 | Metamorphoses 4 | 6 | Metamorphoses 7 | Perseus:bib:oclc,32116154, Ovid. Metamorphoses. Hugo Magnus. 8 | Gotha (Germany). Friedr. Andr. Perthes. 1892. 9 | 10 | 11 | 13 | Metamorphoses (English Translation by Brooks More) 14 | Perseus:bib:oclc,24965574, Ovid. Metamorphoses. Brookes More. 15 | Boston. Cornhill Publishing Co. 1922. 16 | 17 | 18 | 20 | Metamorphoses (English Translation by Golding Arthur) 21 | Ovid, 43 B.C.-17 or 18 A.D, creator; Golding, Arthur, 1536-1606, 22 | translator. 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit/data/phi0959/phi001/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Amores 3 | 4 | Amores 5 | 6 | Amores, Epistulae, Medicamina faciei femineae, Ars amatoria, Remedia 7 | amoris, R. Ehwald, edidit ex Rudolphi Merkelii recognitione, Leipzig, B. G. Teubner, 1907 8 | 9 | 10 | 11 | 12 | Amores, The Art of Love in Three Books The remedy of love. The art of beauty. The court of love. The history of love amours. 13 | Ovid, 43 B.C.-17 or 18 A.D, creator; Dryden, John, 1631-1700, translator; Creech, Thomas, 1659-1700, translator; Hopkins, Charles, 1664?-1700?, translator; Duke, Richard, 1659?-1711, translator; Cromwell, Henry, 1659-1728, translator; Sedley, Charles, Sir, 1639-1701, translator; Eusden, Laurence, 1688-1730, translator; Rochester, John Wilmot, Earl of, 1647-1680, translator; Rymer, Thomas, 1641-1713, translator; Stepney, George, 1663-1707, translator; , editor 14 | 15 | -------------------------------------------------------------------------------- /tests/testing_data/latinLit2/data/phi0959/phi001/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Amores 3 | 4 | Amores 5 | 6 | Amores, Epistulae, Medicamina faciei femineae, Ars amatoria, Remedia 7 | amoris, R. Ehwald, edidit ex Rudolphi Merkelii recognitione, Leipzig, B. G. Teubner, 1907 8 | 9 | 10 | 11 | 12 | Amores, The Art of Love in Three Books The remedy of love. The art of beauty. The court of love. The history of love amours. 13 | Ovid, 43 B.C.-17 or 18 A.D, creator; Dryden, John, 1631-1700, translator; Creech, Thomas, 1659-1700, translator; Hopkins, Charles, 1664?-1700?, translator; Duke, Richard, 1659?-1711, translator; Cromwell, Henry, 1659-1728, translator; Sedley, Charles, Sir, 1639-1701, translator; Eusden, Laurence, 1688-1730, translator; Rochester, John Wilmot, Earl of, 1647-1680, translator; Rymer, Thomas, 1641-1713, translator; Stepney, George, 1663-1707, translator; , editor 14 | 15 | -------------------------------------------------------------------------------- /tests/testing_data/cts/getValidReff.1.1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | GetValidReff 4 | urn:cts:latinLit:phi1294.phi002.perseus-lat2 5 | 6 | urn:cts:latinLit:phi1294.phi002 7 | Martial 8 | Epigrammata 9 | Epigrammata 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | urn:cts:latinLit:phi1294.phi002.perseus-lat2:1.1.1 19 | urn:cts:latinLit:phi1294.phi002.perseus-lat2:1.1.2 20 | urn:cts:latinLit:phi1294.phi002.perseus-lat2:1.1.3 21 | urn:cts:latinLit:phi1294.phi002.perseus-lat2:1.1.4 22 | urn:cts:latinLit:phi1294.phi002.perseus-lat2:1.1.5 23 | urn:cts:latinLit:phi1294.phi002.perseus-lat2:1.1.6 24 | 25 | 26 | -------------------------------------------------------------------------------- /doc/MyCapytain.benchmark.rst: -------------------------------------------------------------------------------- 1 | Benchmarks 2 | ========== 3 | 4 | In the recent attempt to boost our system, we had a look on the performance of MyCapytain with different parser. Even if as 1.0.1 \ 5 | xmlparser() is the recommended tool, we highly recommend to switch to lxml.objectify.parse() parser for performance. In the following benchmark \ 6 | run with timeit.sh on the main repo (You need PerseusDL/canonical-latinLit somewhere ), the first line is run with lxml.etree, the second \ 7 | with objectify and the third with a pickled object. 8 | 9 | **Testing on Seneca, Single Simple Passage** 10 | 11 | - 100 loops, best of 3: 4.45 msec per loop 12 | - 100 loops, best of 3: 4.15 msec per loop 13 | - 100 loops, best of 3: 3.75 msec per loop 14 | 15 | **Testing range** 16 | 17 | - 100 loops, best of 3: 7.63 msec per loop 18 | - 100 loops, best of 3: 7.72 msec per loop 19 | - 100 loops, best of 3: 6.66 msec per loop 20 | 21 | **Testing with a deeper architecture** 22 | 23 | - 100 loops, best of 3: 18.2 msec per loop 24 | - 100 loops, best of 3: 14.3 msec per loop 25 | - 100 loops, best of 3: 9.31 msec per loop 26 | 27 | **Testing with a deeper architecture at the end** 28 | 29 | - 100 loops, best of 3: 18.2 msec per loop 30 | - 100 loops, best of 3: 14.2 msec per loop 31 | - 100 loops, best of 3: 9.34 msec per loop 32 | 33 | **Testing with a deeper architecture with range** 34 | 35 | - 100 loops, best of 3: 19.3 msec per loop 36 | - 100 loops, best of 3: 14.3 msec per loop 37 | - 100 loops, best of 3: 9.9 msec per loop 38 | 39 | **Testing with complicated XPATH** 40 | 41 | - 100 loops, best of 3: 751 usec per loop 42 | - 100 loops, best of 3: 770 usec per loop 43 | - 100 loops, best of 3: 617 usec per loop 44 | -------------------------------------------------------------------------------- /tests/testing_data/cts/getlabel.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | GetPassagePlus 4 | urn:cts:latinLit:phi1294.phi002.perseus-lat2:1.1 5 | 1.1 6 | urn:cts:latinLit:phi1294.phi002 7 | Martial 8 | Epigrammata 9 | Epigrammata 10 | 11 | 12 | urn:cts:latinLit:phi1294.phi002.perseus-lat2:1.1 13 | 14 | Martial 15 | Epigrammata 16 | Epigrammata 17 | urn:cts:latinLit:phi1294.phi002 18 | 19 | M. Valerii Martialis Epigrammaton libri / recognovit W. Heraeus 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /MyCapytain/errors.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | .. module:: MyCapytain.errors 4 | :synopsis: MyCapytain errors 5 | 6 | .. moduleauthor:: Thibault Clérice 7 | 8 | 9 | """ 10 | 11 | 12 | class MyCapytainException(BaseException): 13 | """ Namespacing errors 14 | """ 15 | 16 | 17 | class DuplicateReference(SyntaxWarning, MyCapytainException): 18 | """ Error generated when a duplicate is found in Reference 19 | """ 20 | 21 | 22 | class RefsDeclError(Exception, MyCapytainException): 23 | """ Error issued when an the refsDecl does not succeed in xpath (no results) 24 | """ 25 | pass 26 | 27 | 28 | class InvalidSiblingRequest(Exception, MyCapytainException): 29 | """ This error is thrown when one attempts to get previous or next passage on a passage with a range of different 30 | depth, ex. : 1-2.25 31 | """ 32 | pass 33 | 34 | 35 | class InvalidURN(Exception, MyCapytainException): 36 | """ This error is thrown when URN are not valid 37 | """ 38 | 39 | 40 | class MissingAttribute(Exception, MyCapytainException): 41 | """ This error is thrown when an attribute is not present in the Object (missing at startup) 42 | """ 43 | 44 | 45 | class UnknownObjectError(ValueError, MyCapytainException): 46 | """ This error is thrown when an object does not exist in an inventory or in an API 47 | """ 48 | 49 | 50 | class UnknownNamespace(ValueError, MyCapytainException): 51 | """ This error is thrown when a namespace is unknown 52 | """ 53 | 54 | 55 | class UndispatchedTextError(Exception, MyCapytainException): 56 | """ This error is thrown when a text has not been dispatched by a dispatcher 57 | """ 58 | 59 | 60 | class UnknownCollection(KeyError, MyCapytainException): 61 | """ A collection is unknown to its ancestor 62 | """ 63 | -------------------------------------------------------------------------------- /tests/testing_data/farsiLit/data/hafez/divan/__cts__.xml: -------------------------------------------------------------------------------- 1 | 2 | Divān 3 | 4 | Divān 5 | Perseus:bib:oclc, 254557372. Diwan-i Hwaga Sams-ad-Din 6 | Muhammad Hafiz Sirazi qaddas sarra-yi al-aziz ba tamam. edited by Muhammad 7 | Qazwini and Qasim Gani as available on ganjoor.net. Tehran, Caphana-i Maglis. 8 | 1941. 9 | 10 | 11 | Divān (English) 12 | Perseus:bib:oclc, 559481156. The Dīvān .Translated for 13 | the first time out of the Persian into English prose, with critical and 14 | explanatory remarks, with an introductory preface, with a note on Ṣūfīism, and 15 | with a life of the author, by H. Wilberforce Clarke. Calcutta, India. 1891. 16 | 17 | 18 | Divān (German) 19 | Perseus:bib:oclc, 6773200. Mohammed Schemsed-din Hafis, 20 | Der Diwan, Aus dem Persischen zum erstenmal ganz übersetzt von Joseph von 21 | Hammer-Purgstall. Stuttgart and Tübingen, 1812. 22 | 23 | 24 | -------------------------------------------------------------------------------- /dts.py: -------------------------------------------------------------------------------- 1 | from MyCapytain.resources.collections.dts import DTSCollection 2 | from MyCapytain.common.constants import Mimetypes 3 | 4 | x = { 5 | "@id": "urn:cts:latinLit:phi0959.phi005", 6 | "type": "http://homermultitext.org/rdfvocab/work", 7 | "license": "https://creativecommons.org/licenses/by-sa/3.0/", 8 | "size": 1, 9 | "label": [ 10 | { 11 | "lang": "lat", 12 | "value": "Remedia amoris" 13 | } 14 | ], 15 | "@context": { 16 | "dc": "http://purl.org/dc/elements/1.1/" 17 | }, 18 | "capabilities": { 19 | "isOrdered": True, 20 | "hasRoles": True 21 | }, 22 | "metadata": { 23 | "http://purl.org/dc/elements/1.1/labels": [ 24 | { 25 | "@lang": "lat", 26 | "@value": "Remedia amoris" 27 | } 28 | ] 29 | }, 30 | "members": { 31 | "contents": [ 32 | { 33 | "@id": "urn:cts:latinLit:phi0959.phi005.perseus-lat2", 34 | "type": "http://homermultitext.org/rdfvocab/edition", 35 | "model": "http://dts.org/model" 36 | } 37 | ], 38 | "next_cursor": "21-30", 39 | "prev_cursor": "1-20" 40 | }, 41 | "version": "a555194", 42 | "parents": [ 43 | { 44 | "@id": "urn:cts:latinLit:phi0959.phi005", 45 | "type": "http://homermultitext.org/rdfvocab/work", 46 | "labels": [ 47 | { 48 | "lang": "lat", 49 | "value": "Remedia amoris" 50 | } 51 | ] 52 | } 53 | ], 54 | "next": { 55 | "@id": "urn:cts:latinLit:phi0959.phi005", 56 | "type": "http://homermultitext.org/rdfvocab/work", 57 | "labels": [ 58 | { 59 | "lang": "lat", 60 | "value": "Remedia amoris" 61 | } 62 | ] 63 | }, 64 | "prev": { 65 | "@id": "urn:cts:latinLit:phi0959.phi005", 66 | "type": "http://homermultitext.org/rdfvocab/work", 67 | "labels": [ 68 | { 69 | "lang": "lat", 70 | "value": "Remedia amoris" 71 | } 72 | ] 73 | } 74 | } 75 | 76 | Collection = DTSCollection.parse(x) 77 | from pprint import pprint 78 | pprint(Collection.export(Mimetypes.JSON.DTS.Std)) -------------------------------------------------------------------------------- /MyCapytain/resolvers/prototypes.py: -------------------------------------------------------------------------------- 1 | """ 2 | .. module:: MyCapytain.resolvers.prototypes 3 | :synopsis: Resolver Prototype 4 | 5 | .. moduleauthor:: Thibault Clérice 6 | 7 | 8 | """ 9 | 10 | 11 | class Resolver(object): 12 | """ Resolver provide a native python API which returns python objects. 13 | 14 | Initiation of resolvers are dependent on the implementation of the prototype 15 | 16 | """ 17 | def getMetadata(self, objectId=None, **filters): 18 | """ Request metadata about a text or a collection 19 | 20 | :param objectId: Object Identifier to filter on 21 | :type objectId: str 22 | :param filters: Kwargs parameters. 23 | :type filters: dict 24 | :return: Collection 25 | """ 26 | raise NotImplementedError() 27 | 28 | def getTextualNode(self, textId, subreference=None, prevnext=False, metadata=False): 29 | """ Retrieve a text node from the API 30 | 31 | :param textId: PrototypeText Identifier 32 | :type textId: str 33 | :param subreference: Passage Reference 34 | :type subreference: str 35 | :param prevnext: Retrieve graph representing previous and next passage 36 | :type prevnext: boolean 37 | :param metadata: Retrieve metadata about the passage and the text 38 | :type metadata: boolean 39 | :return: Passage 40 | :rtype: Passage 41 | """ 42 | raise NotImplementedError() 43 | 44 | def getSiblings(self, textId, subreference): 45 | """ Retrieve the siblings of a textual node 46 | 47 | :param textId: PrototypeText Identifier 48 | :type textId: str 49 | :param subreference: Passage Reference 50 | :type subreference: str 51 | :return: Tuple of references 52 | :rtype: (str, str) 53 | """ 54 | raise NotImplementedError() 55 | 56 | def getReffs(self, textId, level=1, subreference=None): 57 | """ Retrieve the siblings of a textual node 58 | 59 | :param textId: PrototypeText Identifier 60 | :type textId: str 61 | :param level: Depth for retrieval 62 | :type level: int 63 | :param subreference: Passage Reference 64 | :type subreference: str 65 | :return: List of references 66 | :rtype: [str] 67 | """ 68 | raise NotImplementedError() 69 | -------------------------------------------------------------------------------- /tests/resources/collections/test_cts_collection_inheritance.py: -------------------------------------------------------------------------------- 1 | from unittest import TestCase 2 | from MyCapytain.resources.collections.cts import TextInventory, TextGroup, Work, Edition, Translation 3 | from MyCapytain.resources.prototypes.cts.inventory import PrototypeTextGroup 4 | 5 | with open("tests/testing_data/examples/getcapabilities.seneca.xml") as f: 6 | SENECA = f.read() 7 | 8 | 9 | class TestCollectionCTSInheritance(TestCase): 10 | def test_types(self): 11 | TI = TextInventory.parse(resource=SENECA) 12 | self.assertCountEqual( 13 | [type(descendant) for descendant in TI.descendants], 14 | [TextGroup] + [Work]*10 + [Edition]*10, 15 | "Descendant should be correctly parsed into correct types" 16 | ) 17 | self.assertCountEqual( 18 | [type(descendant) for descendant in TI.readableDescendants], 19 | [Work]*0 + [Edition]*10, 20 | "Descendant should be correctly parsed into correct types and filtered when readable" 21 | ) 22 | 23 | def test_title(self): 24 | TI = TextInventory.parse(resource=SENECA) 25 | self.assertCountEqual( 26 | [str(descendant.get_label()) for descendant in TI.descendants], 27 | ["Seneca, Lucius Annaeus", "de Ira", "de Vita Beata", "de consolatione ad Helviam", "de Constantia", 28 | "de Tranquilitate Animi", "de Brevitate Vitae", "de consolatione ad Polybium", 29 | "de consolatione ad Marciam", "de Providentia", "de Otio Sapientis", "de Ira, Moral essays Vol 2", 30 | "de Vita Beata, Moral essays Vol 2", "de consolatione ad Helviam, Moral essays Vol 2", 31 | "de Constantia, Moral essays Vol 2", "de Tranquilitate Animi, Moral essays Vol 2", 32 | "de Brevitate Vitae, Moral essays Vol 2", "de consolatione ad Polybium, Moral essays Vol 2", 33 | "de consolatione ad Marciam, Moral essays Vol 2", "de Providentia, Moral essays Vol 2", 34 | "de Otio Sapientis, Moral essays Vol 2"], 35 | "Title should be computed correctly : default should be set" 36 | ) 37 | 38 | def test_new_object(self): 39 | """ When creating an object with same urn, we should retrieve the same metadata""" 40 | TI = TextInventory.parse(resource=SENECA) 41 | a = TI["urn:cts:latinLit:stoa0255.stoa012.perseus-lat2"].metadata 42 | b = (PrototypeTextGroup("urn:cts:latinLit:stoa0255")).metadata -------------------------------------------------------------------------------- /doc/Collections.py: -------------------------------------------------------------------------------- 1 | from MyCapytain.retrievers.cts5 import CTS 2 | from MyCapytain.resources.collections.cts import TextInventory, Work 3 | from MyCapytain.common.constants import Mimetypes 4 | from pprint import pprint 5 | 6 | """ 7 | In order to have a real life example, 8 | we are gonna query for data in the Leipzig CTS API 9 | We are gonna query for metadata about Seneca who 10 | is represented by urn:cts:latinLit:stoa0255 11 | 12 | To retrieve data, we are gonna make a GetMetadata query 13 | to the CTS Retriever. 14 | """ 15 | retriever = CTS("http://cts.dh.uni-leipzig.de/api/cts/") 16 | # We store the response (Pure XML String) 17 | response = retriever.getMetadata(objectId="urn:cts:latinLit:stoa0255") 18 | 19 | """ 20 | From here, we actually have the necessary data, we can now 21 | play with collections. TextInventory is the main collection type that is needed to 22 | parse the whole response. 23 | """ 24 | inventory = TextInventory.parse(resource=response) 25 | # What we are gonna do is print the title of each descendant : 26 | for descendant in inventory.descendants: 27 | # Metadatum resolve any non-existing language ("eng", "lat") to a default one 28 | # Putting default is just making that clear 29 | print(descendant.get_label()) 30 | 31 | """ 32 | You should see in there things such as 33 | - "Seneca, Lucius Annaeus" (The TextGroup or main object) 34 | - "de Ira" (The Work object) 35 | - "de Ira, Moral essays Vol 2" (The Edition specific Title) 36 | 37 | We can now see other functions, such as the export to JSON DTS. 38 | Collections have a unique feature built in : they allow for 39 | accessing an item using its key as if it were a dictionary : 40 | The identifier of a De Ira is urn:cts:latinLit:stoa0255.stoa0110 41 | """ 42 | deIra = inventory["urn:cts:latinLit:stoa0255.stoa010"] 43 | assert isinstance(deIra, Work) 44 | pprint(deIra.export(output=Mimetypes.JSON.DTS.Std)) 45 | # you should see a DTS representation of the work 46 | 47 | """ 48 | What we might want to do is to browse metadata about seneca's De Ira 49 | Remember that CTSCollections have a parents attribute ! 50 | """ 51 | for descAsc in deIra.descendants + [deIra] + deIra.parents: 52 | # We filter out Textgroup which has an empty Metadata value 53 | if not isinstance(descAsc, TextInventory): 54 | print( 55 | descAsc.metadata.export(output=Mimetypes.JSON.Std) 56 | ) 57 | """ 58 | And of course, we can simply export deIra to CTS XML format 59 | """ 60 | print(deIra.export(Mimetypes.XML.CTS)) -------------------------------------------------------------------------------- /MyCapytain/resources/collections/dts.py: -------------------------------------------------------------------------------- 1 | from MyCapytain.resources.prototypes.metadata import Collection 2 | from rdflib import URIRef 3 | 4 | 5 | class DTSCollection(Collection): 6 | @staticmethod 7 | def parse(resource, mimetype="application/json+ld"): 8 | """ Given a dict representation of a json object, generate a DTS Collection 9 | 10 | :param resource: 11 | :param mimetype: 12 | :return: 13 | """ 14 | obj = DTSCollection(identifier=resource["@id"]) 15 | obj.type = resource["type"] 16 | obj.version = resource["version"] 17 | for label in resource["label"]: 18 | obj.set_label(label["value"], label["lang"]) 19 | for key, value in resource["metadata"].items(): 20 | term = URIRef(key) 21 | if isinstance(value, list): 22 | if isinstance(value[0], dict): 23 | for subvalue in value: 24 | obj.metadata.add(term, subvalue["@value"], subvalue["@lang"]) 25 | else: 26 | for subvalue in value: 27 | if subvalue.startswith("http") or subvalue.startswith("urn"): 28 | obj.metadata.add(term, URIRef(subvalue)) 29 | else: 30 | obj.metadata.add(term, subvalue) 31 | else: 32 | if value.startswith("http") or value.startswith("urn"): 33 | obj.metadata.add(term, URIRef(value)) 34 | else: 35 | obj.metadata.add(term, value) 36 | 37 | for member in resource["members"]["contents"]: 38 | subobj = DTSCollectionShort.parse(member) 39 | subobj.parent = member 40 | 41 | last = obj 42 | for member in resource["parents"]: 43 | subobj = DTSCollectionShort.parse(member) 44 | last.parent = subobj 45 | 46 | return obj 47 | 48 | 49 | class DTSCollectionShort(DTSCollection): 50 | @staticmethod 51 | def parse(resource): 52 | """ Given a dict representation of a json object, generate a DTS Collection 53 | 54 | :param resource: 55 | :param mimetype: 56 | :return: 57 | """ 58 | obj = DTSCollectionShort(identifier=resource["@id"]) 59 | obj.type = resource["type"] 60 | obj.model = resource["model"] 61 | for label in resource["label"]: 62 | obj.set_label(label["value"], label["lang"]) 63 | return obj -------------------------------------------------------------------------------- /tests/testing_data/cts/getpassage.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | GetPassage 4 | urn:cts:latinLit:phi1294.phi002.perseus-lat2:1.1 5 | 1.1 6 | urn:cts:latinLit:phi1294.phi002 7 | Martial 8 | Epigrammata 9 | Epigrammata 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | urn:cts:latinLit:phi1294.phi002.perseus-lat2:1.1 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | I 26 | Hic est quem legis ille, quem requiris, 27 | Toto notus in orbe Martialis 28 | Argutis epigrammaton libellis: 29 | 30 | Cui, lector studiose, quod dedisti 31 | لا یا ایها الساقی ادر کاسا و ناولها ### 32 | Rari post cineres habent poetae. 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | --------------------------------------------------------------------------------