<commit_before>Python Audiotools
=================

This package contains a Python 3 wrapper around the `libav
<https://libav.org/>`_ library. This is work in progress. The only things which
are currently supported are reading and setting (not writing) metadata. The
project website can be found at `GitHub
<https://github.com/RemcoHaszing/python-audiotools>`_.


Requirements
------------

- python3.x (Tested using python3.3)
- libavcodec
- libavformat
- libavutil


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

Using pip: (Not yet implemented)::

    pip install audiotools

From GitHub: ::

    git clone https://github.com/RemcoHaszing/python-audiotools.git
    cd python-audiotools
    ./setup.py install


Usage
-----

Reading song metadata:

>>> from audiotools import Song
>>> filename = 'Finntroll - Trollhammaren.flac'
>>> song = Song(filename)
>>> song['artist']
Finntroll
>>> song['album']
Trollhammaren
>>> song['title']
Trollhammaren

Saving song metadata (not implemented):

>>> song['album'] = 'Nattfödd'
>>> song['album']
'Nattfödd'
>>> song.save()

Converting the song (not implemented):

>>> converted = song.convert('Finntroll - Trollhammaren.ogg',
...                          format='opus', q=4)
>>> converted.filename
Finntroll - Trollhammaren.ogg

Playback (not implemented):

>>> song.play()
0.00
>>> song.pause()
4.29
>>> song.play_or_pause()
4.29
>>> song.playing_time
12.53


Testing
-------

::

    ./setup.py test


Coding style
------------

All Python code must be in compliance with pep8_. C code must be in compliance
with pep7_. All code must be covered by unittests.


License
-------

This project is licensed under the BSD 3-Clause License.


.. _libav: https://github.com/genesi/libav
.. _pep7: http://www.python.org/dev/peps/pep-0007/
.. _pep8: http://www.python.org/dev/peps/pep-0008/<commit_msg>Updated README.<commit_after>Python Audiotools
=================

This package contains a Python 3 wrapper around the `libav
<https://libav.org/>`_ library. This is work in progress. The only things which
are currently supported are reading and setting (not writing) metadata. The
project website can be found at `GitHub
<https://github.com/RemcoHaszing/python-audiotools>`_.


Requirements
------------

- python3.x (Tested using python3.3)
- libavcodec
- libavformat
- libavutil


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

Using pip: (Not yet implemented)::

    pip install audiotools

From GitHub: ::

    git clone https://github.com/RemcoHaszing/python-audiotools.git
    cd python-audiotools
    python3 setup.py install


Usage
-----

Reading song metadata:

>>> from audiotools import Song
>>> filename = 'Finntroll - Trollhammaren.flac'
>>> song = Song(filename)
>>> song['artist']
Finntroll
>>> song['album']
Trollhammaren
>>> song['title']
Trollhammaren

Saving song metadata (not implemented):

>>> song['album'] = 'Nattfödd'
>>> song['album']
'Nattfödd'
>>> song.save()

Converting the song (not implemented):

>>> converted = song.convert('Finntroll - Trollhammaren.ogg',
...                          format='opus', q=4)
>>> converted.filename
Finntroll - Trollhammaren.ogg

Playback (not implemented):

>>> song.play()
0.00
>>> song.pause()
4.29
>>> song.play_or_pause()
4.29
>>> song.playing_time
12.53


Testing
-------

Go to the project root directory and run: ::

    python3 setup.py test


Coding style
------------

- C code must be in compliance with pep7_.
- Python code must be in compliance with pep8_.
- All code must be covered by unittests.


License
-------

This project is licensed under the BSD 3-Clause License.


.. _libav: https://github.com/genesi/libav
.. _pep7: http://www.python.org/dev/peps/pep-0007/
.. _pep8: http://www.python.org/dev/peps/pep-0008/
{'fraction_non_alphanumeric': 0.1618918918918919, 'fraction_numerical': 0.017297297297297298, 'mean_word_length': 3.293503480278422, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 97, 'https://': 8, 'lorem ipsum': 0, 'www.': 4, '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': '5159784', 'n_tokens_mistral': 1247, 'n_tokens_neox': 1188, 'n_words': 341}