Skip to content

A Python module to convert text files to EpiDoc compatible XML.

License

Notifications You must be signed in to change notification settings

UoMResearchIT/eXegis

Repository files navigation

Hippocratic Aphorisms

https://travis-ci.org/gruel/eXegis.svg?branch=master https://ci.appveyor.com/api/projects/status/4t9ncyaqcm8g470i?svg=true

AphorismToXML

A Python module which provide a conversion from aphorisms annotated text files to TEI compatible XML (for the version 2).

The docs folder contains more information for usage and development.

  • Example input files can be found in the Example folder
  • the convenience script: main.py was used to run the module on these files to produce the corresponding output in the XML folder, xml_template.txt is optional.
  • The input and reference output for the unittests tests are in folder test_files

Installation

Required

  • Python ( v3.5 or higher)

Installation from Source

Clone the code from the github repository:

git clone https://github.com/UoMResearchIT/eXegis.git

go into the project directory:

cd eXegis

Install the package:

python setup.py install --user

The --user is optional but will install the package without the need to be administrator. It will install the package in a user accessible directory (plateforme dependant).

For development other python modules are needed and can be installed with:

pip install -U -r requirements-dev.txt --user

Usage

When the package is installed, it should be available in your PATH under the name eXegis.

To use it start a terminal and execute the command:

exegis <path or file>

where:

  • path is the name of the directory which contains the files to analyse and convert to XML..
  • file is the name of the individual file to analyse and convert to XML.

At the end of the treatment a log file called exegis.log will be found in the directory of the execution. It will contains information, errors and warning related to the process.

If everything is going well, an XML directory will be also created in the execution file. This directory will contains the two XML files. The main one which contains the aphorisms, the commentaries and the annotations. An additional one will also be present (called app) which will contains the footnotes present in the texts.