<commit_before>International Aid Transparency Initiative CSV Conversion tool
=============================================================

The scripts in this repository transform data from a CSV spreadsheet
into IATI-XML data. This requires two components:

* Data -- A flat CSV file
* Mapping -- A JSON mapping file, which describes how the CSV file should be related to the IATI Standard

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

Clone the repository:

::

    $ git clone git://github.com/markbrough/CSV-IATI-Converter.git


Change into the directory and create a virtual environment (``virtualenv``)

::

    $ cd CSV-IATI-Converter
    $ virtualenv --no-site-packages ./pyenv

Now activate the environment:

::

    $ source ./pyenv/bin/activate

Install dependencies:

::

    $ pip install -r requirements.txt


If you're running locally, you can stop here and jump to "Running the script". If you're deploying to an Apache server, keep reading...

Install mod_wsgi

::
    
    $ apt-get install libapache2-mod-wsgi

Copy csviati.wsgi from the main directory to the appropriate folder in your web server directory, e.g. ``/var/www/csviati``

::
    
    $ cp csviati.wsgi /var/www/csviati/csviati.wsgi

Edit the file to make sure the paths are correct for your web server


Create a symlink from this folder to the static files folder in your installation directory, so that they can be accessed by the web server:

::
    
    $ ln -s /PATH_TO_YOUR_CSVCONVERTER_FILES/CSV-IATI-Converter/csviati/static /var/www/csviati/static


Set up your Apache configuration files. You can do this easily by copying the default file:<commit_msg>Refer to the wsgi file correctly in README<commit_after>International Aid Transparency Initiative CSV Conversion tool
=============================================================

The scripts in this repository transform data from a CSV spreadsheet
into IATI-XML data. This requires two components:

* Data -- A flat CSV file
* Mapping -- A JSON mapping file, which describes how the CSV file should be related to the IATI Standard

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

Clone the repository:

::

    $ git clone git://github.com/markbrough/CSV-IATI-Converter.git


Change into the directory and create a virtual environment (``virtualenv``)

::

    $ cd CSV-IATI-Converter
    $ virtualenv --no-site-packages ./pyenv

Now activate the environment:

::

    $ source ./pyenv/bin/activate

Install dependencies:

::

    $ pip install -r requirements.txt


If you're running locally, you can stop here and jump to "Running the script". If you're deploying to an Apache server, keep reading...

Install mod_wsgi

::
    
    $ apt-get install libapache2-mod-wsgi

Copy wsgi.py from the main directory to the appropriate folder in your web server directory, e.g. ``/var/www/csviati``

::
    
    $ cp wsgi.py /var/www/csviati/wsgi.py

Edit the file to make sure the paths are correct for your web server


Create a symlink from this folder to the static files folder in your installation directory, so that they can be accessed by the web server:

::
    
    $ ln -s /PATH_TO_YOUR_CSVCONVERTER_FILES/CSV-IATI-Converter/csviati/static /var/www/csviati/static


Set up your Apache configuration files. You can do this easily by copying the default file:
{'fraction_non_alphanumeric': 0.11314984709480122, 'fraction_numerical': 0.0006116207951070336, 'mean_word_length': 3.5557103064066853, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 6, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1936326', 'n_tokens_mistral': 966, 'n_tokens_neox': 904, 'n_words': 384}