.. role:: shell(code)
   :language: shell

cmif
====

Synopsis
--------

This is a simple Python package (under development) to handle data in `CMI format <https://github.com/TEI-Correspondence-SIG/CMIF>`_.

Installation
------------

You can install this package via `PyPI <https://pypi.org/project/cmif/>`_:

.. code-block:: shell

    pip install cmif

... or by cloning the repository:

.. code-block:: shell

    git clone https://github.com/herreio/cmif.git --recurse-submodules
    cd cmif
    # create and activate virutalenv
    utils/setup
    source env/bin/activate

Documentation
-------------

A minimal documentation can be found on `Read the Docs <https://cmif.readthedocs.io/>`_.

To build the documentation from the files found at docs:

.. code-block:: shell

    cd docs
    make html


Usage
-----

Launch the Python interpreter and start by importing the necessary modules:

.. code-block:: python

    from cmif import *


Test
----

In case you cloned the repository, you can run a unittest:

.. code-block:: shell

    python -m unittest test.creation


See Also
--------

The Python command line interface `csv2cmi <https://github.com/saw-leipzig/csv2cmi>`_, written by `K. Rettinghaus <https://github.com/rettinghaus>`_, allows to create files in CMI format from CSV input.
