No description, website, or topics provided.
PHP ApacheConf
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.htaccess
README.md
TEIMarkupParser.php
config.json
data_annotation.json
data_markup.json
data_metadata.json
gpl.txt
model.php
router.php
view.php

README.md

apitext_api

http://apitext.github.io/

what is apitext?

Apitext is a student built prototype RESTful Application Programing Interface (API) for TEI-XML Transcriptions. Once uploaded to a TEI-XML folder on a website, it exposes a series of Uniform Resource Identifiers (URI). By using these identifier endpoints, a user can retrieve specific information from a TEI-XML file.

Currently, our prototype only manages one TEI-XML file and only supports URI requests from the same domain as the API itself. To find out about future development plans, please see our about the project" section.

how do I install apitext?

  1. You will need to have a website capable of running PHP scripts.
  2. In order for apitext to work, you will need to designate a folder on your website that will hold your TEI-XML file.
  3. You will need to upload apitext into that folder.
  • You can clone or download the apitext repository here.
  • Note: If you choose to download the apitext repository from Github:
  • You will need extract the base repository folder from the unzipped folder (when zipping files, Github creates a folder inside a folder).
  • You will need to remove the -master from the end of the base folder's name (when zipping files, Github adds "-master" to the end of the repository name).
  • You will then need to move the .htaccess file outside of the apitext_api folder.
  • You will then need to edit the config.json file located inside the apitext_api folder.
  • In the teiFolder entry put the name of your TEI-XML folder.
  • In the teiFile entry put the name of your TEI-XML file.
  • As an example, if your folder was named my-tei-folder and your file was named my-tei-xml-file.xml, then your config.json file would look like this:

	{
	 "teiFolder": "my-tei-folder",
	 "teiFile" : "my-tei-xml-file.xml"
	}
  1. That's it, the API should now be controlling your TEI-XML folder. Use a web browser to navigate to your file folder, you should see a welcome message.

how do I use apitext?

Right now, apitext supports the following URI endpoints. To utilize an endpoint, just place it at the end of the URL path of your TEI folder.

api/v1/resources
Returns a listing of all available endpoints for the API.
api/v1/xml
Returns the XML view of the TEI-XML file.
api/v1/text
Returns a text only view of the TEI-XML file.
api/v1/markup
Returns a markup only (HTML) view of the TEI-XML file.
api/v1/elements
Returns a listing of all elements contained within the TEI-XML file.
api/v1/elements/[specific element]
Returns a unique listing of all the textual content contained within the [specific element(s)].
api/v1/annotations
Returns a listing of all annotation elements contained within the TEI-XML file.
api/v1/teiheaders
Returns a listing of all teiheader elements contained within the TEI-XML file.

to find out more about the project

http://apitext.github.io/index.html#about