Craig's Generator
=================
Read listings Pythonically.

Examples
---------
Generate listings.

.. code-block:: python

    from craigsgenerator import Section
    for listing in Section('austin','sub'):
        print(listing)

Additional arguments get passed to :code:`requests.get`.

.. code-block:: python

    from craigsgenerator import Section
    proxies = {'https':'example.com'}
    for listing in Section('austin','sub', proxies = proxies):
        print(listing)

Downloaded files are cached by default and refreshed
if they're older than a day. Change the directory by
specifying the :code:`cachedir`.

.. code-block:: python

    from craigsgenerator import Section
    for listing in Section('austin','sub', cachedir = 'downloads'):
        print(listing)

Disable caching by setting the :code:`cachedir` to :code:`None`.

.. code-block:: python

    from craigsgenerator import Section, fulltext
    for listing in Section('austin','sub', cachedir = None):
        print(listing)

Get the full text of the listing with the :code:`fulltext` function.

.. code-block:: python

    from craigsgenerator import Section
    for listing in Section('austin','sub'):
        print(listing)
        print(fulltext(listing))
