<commit_before>LEDITA
======

[![Build Status](https://travis-ci.org/arpetti/LEDITA.png?branch=master)](https://travis-ci.org/arpetti/LEDITA)

Ledita is a web app that supports the learning design practice among teachers of Italian as a second / foreign language.

Project Website: http://www.professoreitaliano.com


## <a name="setupInstructions" />Setup Instructions

* Install [MySQL 5.5.24](http://downloads.mysql.com/archives.php?p=mysql-5.5&v=5.5.24)
* Connect to mysql as root and run the following scripts to create the database, user, and populate sample data

    ```
    source %PROJECT_ROOT%\LEDITA\database\local\ledita-web-app.sql
    source %PROJECT_ROOT%\LEDITA\database\local\demo-data.sql
    source %PROJECT_ROOT%\LEDITA\database\local\user.sql
    ```    

* If you don't already have it, install [Node.js](http://nodejs.org/)
* Install Karma, you will need this to run the Angular unit and e2e (end to end) tests

    ```
    npm install -g karma
    ```

    For Mac, use ```sudo```

    For Windows 64 bit, the default Karma Chrome launcher configuration points to the wrong location for Chrome.
    Fix it by modifying the following file (check your environment variable for value of PATH)

    ```
    %PATH%\node_modules\karma\lib\launchers\Chrome.js
    ```

    Original line

    ```
    win32: process.env.LOCALAPPDATA + '\\Google\\Chrome\\Application\\chrome.exe'
    ```

    Change it to

    ```
    win32: process.env.ProgramFiles + ' (x86)\\Google\\Chrome\\Application\\chrome.exe'
    ```
* Clone this repo and cd to project directory, then run

    ```
    npm install
    ```
    
* From project root directory, run

    ```
    node server.js
    ```

* Browse to [http://localhost:8000](http://localhost:8000)

* Login using one of the predefined users

    ```
    user<EMAIL>/123
    <EMAIL>/456
    ```

* Logout from dropdown menu under avatar image

* Register a new user

    * Name can be anything (not used yet)
    * Surname can be anything (not used yet)
    * Email is used as the username, enter a valid format (eg: <EMAIL>)
    * Password must be at least 5 characters
    * Retype password can be anything (not used yet)<commit_msg>update db setup instructions and add link to batarang<commit_after>LEDITA
======

[![Build Status](https://travis-ci.org/arpetti/LEDITA.png?branch=master)](https://travis-ci.org/arpetti/LEDITA)

Ledita is a web app that supports the learning design practice among teachers of Italian as a second / foreign language.

Project Website: http://www.professoreitaliano.com


## <a name="setupInstructions" />Setup Instructions

* Install [MySQL 5.5.24](http://downloads.mysql.com/archives.php?p=mysql-5.5&v=5.5.24)
* Connect to mysql as root and run the following scripts to create the database, user, and populate sample data

    ```
    mysql -u root
    source database\local\ledita-web-app.sql
    source database\local\demo-data.sql
    source database\local\user.sql
    ```    

    For Mac or Linux, switch the ```\``` to ```/```

* If you don't already have it, install [Node.js](http://nodejs.org/)
* Install Karma, you will need this to run the Angular unit and e2e (end to end) tests

    ```
    npm install -g karma
    ```

    For Mac, use ```sudo```

    For Windows 64 bit, the default Karma Chrome launcher configuration points to the wrong location for Chrome.
    Fix it by modifying the following file (check your environment variable for value of PATH)

    ```
    %PATH%\node_modules\karma\lib\launchers\Chrome.js
    ```

    Original line

    ```
    win32: process.env.LOCALAPPDATA + '\\Google\\Chrome\\Application\\chrome.exe'
    ```

    Change it to

    ```
    win32: process.env.ProgramFiles + ' (x86)\\Google\\Chrome\\Application\\chrome.exe'
    ```

* Optionally, install Chrome Extension [AngularJS Batarang](https://chrome.google.com/webstore/detail/angularjs-batarang/ighdmehidhipcmcojjgiloacoafjmpfk/related?hl=en)

* Clone this repo and cd to project directory, then run

    ```
    npm install
    ```
    
* From project root directory, run

    ```
    node server.js
    ```

* Browse to [http://localhost:8000](http://localhost:8000)

* Login using one of the predefined users

    ```
    <EMAIL>/123
    <EMAIL>/456
    ```

* Logout from dropdown menu under avatar image

* Register a new user

    * Name can be anything (not used yet)
    * Surname can be anything (not used yet)
    * Email is used as the username, enter a valid format (eg: <EMAIL>)
    * Password must be at least <PASSWORD>
    * Retype password can be anything (not used yet)
{'fraction_non_alphanumeric': 0.11927605756650676, 'fraction_numerical': 0.014609681639773223, 'mean_word_length': 3.173794358507734, 'pattern_counts': {'":': 0, '<': 12, '<?xml version=': 0, '>': 12, 'https://': 5, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '995253', 'n_tokens_mistral': 1486, 'n_tokens_neox': 1386, 'n_words': 458}