<commit_before>=====
Shiva
=====

Dinosaurs will slowly die.


Installation
============


* Get the source:

::

    $ git clone https://github.com/tooxie/python-shiva.git
    $ cd python-shiva

* Install dependencies:

::

    $ pip install -r requirements.pip

* Rename shiva/settings/local.py.example to local.py:

::

    $ cp shiva/settings/local.py.example shiva/settings/local.py

* Edit it and configure the directories to scan for music.

  + See `Scanning directories`_ for more info.

* Add shiva to the PYTHONPATH:

::

  $ export PYTHONPATH=$PYTHONPATH:`pwd`

* Run the indexer:

::

  $ python shiva/indexer.py

* Run the server:

::

  $ python shiva/api.py

* Go to http://127.0.0.1:5000/<resource>


--------------------
Scanning directories
--------------------

To tell Shiva which directories to scan for music, you will have to configure
your `shiva/settings/local.py` file. There you will find a MEDIA_DIRS option
where you need to supply `MediaDir` objects.

This object allows for media configuration. By instantiating a MediaDir class<commit_msg>Internal link to Resources<commit_after>=====
Shiva
=====

Dinosaurs will slowly die.


Installation
============


* Get the source:

::

    $ git clone https://github.com/tooxie/python-shiva.git
    $ cd python-shiva

* Install dependencies:

::

    $ pip install -r requirements.pip

* Rename shiva/settings/local.py.example to local.py:

::

    $ cp shiva/settings/local.py.example shiva/settings/local.py

* Edit it and configure the directories to scan for music.

  + See `Scanning directories`_ for more info.

* Add shiva to the PYTHONPATH:

::

  $ export PYTHONPATH=$PYTHONPATH:`pwd`

* Run the indexer:

::

  $ python shiva/indexer.py

* Run the server:

::

  $ python shiva/api.py

* Go to http://127.0.0.1:5000/<resource> (See `Resources`_)


--------------------
Scanning directories
--------------------

To tell Shiva which directories to scan for music, you will have to configure
your `shiva/settings/local.py` file. There you will find a MEDIA_DIRS option
where you need to supply `MediaDir` objects.

This object allows for media configuration. By instantiating a MediaDir class
{'fraction_non_alphanumeric': 0.14613970588235295, 'fraction_numerical': 0.009191176470588236, 'mean_word_length': 3.0314814814814817, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, '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': '4752914', 'n_tokens_mistral': 734, 'n_tokens_neox': 683, 'n_words': 220}