.. -*- rst -*-

============
GetMediumURL
============

`GetMediumURL`_ is a simple Python package to get URLs of downloadable
media (usually audio or video) and their metadata knowing their main
URLs on websites using Flash-based players.

.. _`GetMediumURL`: http://savannah.nongnu.org/projects/getmediumurl/

License
=======

The following applies to all Python code in this package:

  This program is free software: you can redistribute it and/or modify
  it under the terms of the GNU Affero General Public License as
  published by the Free Software Foundation, either version 3 of the
  License, or (at your option) any later version.

  This program is distributed in the hope that it will be useful, but
  WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  Affero General Public License for more details.

  You should have received a copy of the GNU Affero General Public
  License along with this program.  If not, see
  <http://www.gnu.org/licenses/>.

For documentation:

  Permission is granted to copy, distribute and/or modify this
  document under the terms of the GNU Free Documentation License,
  Version 1.3 or any later version published by the Free Software
  Foundation; with no Invariant Sections, no Front-Cover Texts, and no
  Back-Cover Texts.  A copy of the license is included in the section
  entitled “GNU Free Documentation License”.

Docstrings and comments from the package source code included in the
documentation are dual-licensed under GNU Affero General Public
license version 3 or later and GNU Free Documentation License version
1.3 or later.

Requirements
============

- Python 2.5 or later (some plugins don’t support Python 3 currently)

- ``lxml``

- Distribute

Some plugins when used with Python 2.5 require the ``simplejson``
package (a derived one is included in newer Python releases).

Documentation is compiled using Sphinx.

For development these tools are recommended and called by the included
Makefile:

- pyflakes

- pylint

- pep8

- coverage (version 3.4b1 or newer)

Installing and updating using ``easy_install``
==============================================

Numbered releases of GetMediumURL can be installed or updated using
the following command::

  easy_install -U GetMediumURL

Optional dependencies should be installed separately, since they are
not required for every possible use of the package.

Obtaining newer source
======================

GetMediumURL uses the `Mercurial version control system`_ to store its
source code.  Mercurial is available in many GNU/Linux distributions
as a package named ``mercurial``.

To get the source of GetMediumURL, use the following command::

  hg clone http://hg.savannah.nongnu.org/hgweb/getmediumurl/

It will make a ``getmediumurl`` directory, a different name can be
specified as an additional argument to the ``hg clone`` command.

To update it, run ``hg pull -u`` in this directory.

.. _`Mercurial version control system`: http://mercurial.selenic.com/

Installing from source
======================

Just run the following command::

    python setup.py install

``setup.py`` has many options listed using the ``--help`` option.  To
install in non-default directory, use the ``--prefix`` option to the
install command.

Before installing it is encouraged to use the following command to
test parts of GetMediumURL which do not make HTTP requests to external
servers::

    python setup.py test

All tests should pass.

Building documentation
======================

Documentation is formatted by the following command::

   python setup.py build_sphinx

An optional argument of ``-b`` can be used to specify different format
than HTML.

Reporting bugs
==============

Report bugs on the `tracker`_ at Savannah.  If you are unsure if a
given behaviour of the package is a bug, please post it to the
`mailing list`_.

.. _`tracker`: https://savannah.nongnu.org/bugs/?group=getmediumurl

.. _`mailing list`: http://lists.nongnu.org/mailman/listinfo/getmediumurl-dev

Programs using it
=================

* `WatchVideo`_

.. _`WatchVideo`: http://www.nongnu.org/watchvideo/

..
  Copyright © 2010  Michał Masłowski  <mtjm@mtjm.eu>

  Copying and distribution of this file, with or without modification,
  are permitted in any medium without royalty provided the copyright
  notice and this notice are preserved.  This file is offered as-is,
  without any warranty.
