<commit_before>About
-----

python-tvrage is a python based object oriented client interface for tvrage.com's XML based api `feeds`_.

.. _feeds: http://www.tvrage.com/xmlfeeds.php

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

Install from sources::

    $ python setup.py install

The easiest way to get started with python-tvrage is to use `easy_install` or `pip`::
    
    $ easy_install -U python-tvrage

For `pip` you have to replace **'easy_install'** with **'pip install'**. Also your platform may require the use of `sudo`

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

The `tvrage` package consists of two modules

- the tvrage.feeds module provides a wrapper function for each of tvrage's XML-feeds
- the tvrage.api module provides an clean and object oriented interface on top of those services

Fetching XML data
+++++++++++++++++

The `tvrage.feeds` module provides very basic and low level access to the tvrage.com data feeds. For more complex use cases it is recomended to use the object oriented module `tvrage.api`.
Note: All functions in the `tvrage.feeds` module return XML data as ElementTree objects.

searching for TV shows using the general `search` feed (returns fuzzy search results)::

    $ python
    >>> from tvrage import feeds
    >>> from xml.etree.ElementTree import tostring
    >>>
    >>> doctor_who = feeds.search('doctorwho2005')
    >>> for node in doctor_who:
    ...     print(tostring(node))
    ... 
    <show>
    <showid>3332</showid>
    <name>Doctor Who (2005)</name>
    <link>http://www.tvrage.com/DoctorWho_2005</link>
    <country>UK</country>
    <started>2005</started>
    <ended>0</ended>
    <seasons>5</seasons>
    <status>Returning Series</status>
    <classification>Scripted</classification>
    <genres>
    <genre01>Action</genre01><genre02>Adventure</genre02><genre03>Sci-Fi</genre03><commit_msg>added tvrage.quickinfo to the intro of the documentation<commit_after>About
-----

python-tvrage is a python based object oriented client interface for tvrage.com's XML based api `feeds`_.

.. _feeds: http://www.tvrage.com/xmlfeeds.php

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

Install from sources::

    $ python setup.py install

The easiest way to get started with python-tvrage is to use `easy_install` or `pip`::
    
    $ easy_install -U python-tvrage

For `pip` you have to replace **'easy_install'** with **'pip install'**. Also your platform may require the use of `sudo`

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

The `tvrage` package consists of two modules

- the tvrage.feeds module provides a wrapper function for each of tvrage's XML-feeds
- the tvrage.api module provides an clean and object oriented interface on top of those services
- the tvrage.quickinfo module is a simple pythonic wrapper for tvrage's quickinfo api. Values are returned as python dictionaries rather than dedicated objects for tv shows and episodes 

Fetching XML data
+++++++++++++++++

The `tvrage.feeds` module provides very basic and low level access to the tvrage.com data feeds. For more complex use cases it is recomended to use the object oriented module `tvrage.api`.
Note: All functions in the `tvrage.feeds` module return XML data as ElementTree objects.

searching for TV shows using the general `search` feed (returns fuzzy search results)::

    $ python
    >>> from tvrage import feeds
    >>> from xml.etree.ElementTree import tostring
    >>>
    >>> doctor_who = feeds.search('doctorwho2005')
    >>> for node in doctor_who:
    ...     print(tostring(node))
    ... 
    <show>
    <showid>3332</showid>
    <name>Doctor Who (2005)</name>
    <link>http://www.tvrage.com/DoctorWho_2005</link>
    <country>UK</country>
    <started>2005</started>
    <ended>0</ended>
    <seasons>5</seasons>
    <status>Returning Series</status>
    <classification>Scripted</classification>
    <genres>
    <genre01>Action</genre01><genre02>Adventure</genre02><genre03>Sci-Fi</genre03>
{'fraction_non_alphanumeric': 0.1213292117465224, 'fraction_numerical': 0.01751674394641937, 'mean_word_length': 3.6171224732461353, 'pattern_counts': {'":': 0, '<': 55, '<?xml version=': 0, '>': 85, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, 'xml': 4}, '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': '2908678', 'n_tokens_mistral': 1234, 'n_tokens_neox': 1134, 'n_words': 405}