Giter VIP home page Giter VIP logo

apitext_api's Introduction

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.

apitext_api's People

Contributors

fridaysedge avatar

Watchers

James Cloos avatar  avatar

Forkers

mhandrea

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.