[Python-modules-commits] r21109 - in packages/tvdb-api/trunk (10 files)

morph at users.alioth.debian.org morph at users.alioth.debian.org
Sun Apr 8 18:12:49 UTC 2012


    Date: Sunday, April 8, 2012 @ 18:12:45
  Author: morph
Revision: 21109

[svn-inject] Applying Debian modifications (1.6.3-1) to trunk

Added:
  packages/tvdb-api/trunk/debian/
  packages/tvdb-api/trunk/debian/changelog
  packages/tvdb-api/trunk/debian/compat
  packages/tvdb-api/trunk/debian/control
  packages/tvdb-api/trunk/debian/copyright
  packages/tvdb-api/trunk/debian/readme.md
  packages/tvdb-api/trunk/debian/rules
  packages/tvdb-api/trunk/debian/source/
  packages/tvdb-api/trunk/debian/source/format
  packages/tvdb-api/trunk/debian/watch


Property changes on: packages/tvdb-api/trunk/debian
___________________________________________________________________
Added: mergeWithUpstream
   + 1

Added: packages/tvdb-api/trunk/debian/changelog
===================================================================
--- packages/tvdb-api/trunk/debian/changelog	                        (rev 0)
+++ packages/tvdb-api/trunk/debian/changelog	2012-04-08 18:12:45 UTC (rev 21109)
@@ -0,0 +1,5 @@
+tvdb-api (1.6.3-1) unstable; urgency=low
+
+  * Initial release (Closes: #nnnn)  <nnnn is the bug number of your ITP>
+
+ -- Sandro Tosi <morph at debian.org>  Tue, 06 Mar 2012 22:55:18 +0100

Added: packages/tvdb-api/trunk/debian/compat
===================================================================
--- packages/tvdb-api/trunk/debian/compat	                        (rev 0)
+++ packages/tvdb-api/trunk/debian/compat	2012-04-08 18:12:45 UTC (rev 21109)
@@ -0,0 +1 @@
+8

Added: packages/tvdb-api/trunk/debian/control
===================================================================
--- packages/tvdb-api/trunk/debian/control	                        (rev 0)
+++ packages/tvdb-api/trunk/debian/control	2012-04-08 18:12:45 UTC (rev 21109)
@@ -0,0 +1,15 @@
+Source: tvdb-api
+Section: python
+Priority: optional
+Maintainer: Debian Python Modules Team <python-modules-team at lists.alioth.debian.org>
+Uploaders: Sandro Tosi <morph at debian.org>
+Build-Depends: debhelper (>= 8), python-all, python-support
+XS-Python-Version: all
+Standards-Version: 3.9.3
+Homepage: https://github.com/dbr/tvdb_api
+
+Package: python-tvdb-api
+Architecture: all
+Depends: ${python:Depends}, ${misc:Depends}
+Description: API interface to TheTVDB.com
+ An easy to use API interface to TheTVDB.com .

Added: packages/tvdb-api/trunk/debian/copyright
===================================================================
--- packages/tvdb-api/trunk/debian/copyright	                        (rev 0)
+++ packages/tvdb-api/trunk/debian/copyright	2012-04-08 18:12:45 UTC (rev 21109)
@@ -0,0 +1,50 @@
+Format: http://dep.debian.net/deps/dep5
+Upstream-Name: tvdb-api
+Source: https://github.com/dbr/tvdb_api
+
+Files: *
+Copyright: Copyright 2011-2012 Ben Dickson (dbr)
+License: Unlicense
+ This is free and unencumbered software released into the public domain.
+ .
+ Anyone is free to copy, modify, publish, use, compile, sell, or
+ distribute this software, either in source code form or as a compiled
+ binary, for any purpose, commercial or non-commercial, and by any
+ means.
+ .
+ In jurisdictions that recognize copyright laws, the author or authors
+ of this software dedicate any and all copyright interest in the
+ software to the public domain. We make this dedication for the benefit
+ of the public at large and to the detriment of our heirs and
+ successors. We intend this dedication to be an overt act of
+ relinquishment in perpetuity of all present and future rights to this
+ software under copyright law.
+ .
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ OTHER DEALINGS IN THE SOFTWARE.
+ .
+ For more information, please refer to <http://unlicense.org/>
+
+Files: debian/*
+Copyright: 2012 Sandro Tosi <morph at debian.org>
+License: GPL-2+
+ This package is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+ .
+ This package 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 General Public License for more details.
+ .
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>
+ .
+ On Debian systems, the complete text of the GNU General
+ Public License version 2 can be found in "/usr/share/common-licenses/GPL-2".

Added: packages/tvdb-api/trunk/debian/readme.md
===================================================================
--- packages/tvdb-api/trunk/debian/readme.md	                        (rev 0)
+++ packages/tvdb-api/trunk/debian/readme.md	2012-04-08 18:12:45 UTC (rev 21109)
@@ -0,0 +1,109 @@
+# `tvdb_api`
+
+`tvdb_api` is an easy to use interface to [thetvdb.com][tvdb]
+
+`tvnamer` has moved to a separate repository: [github.com/dbr/tvnamer][tvnamer] - it is a utility which uses `tvdb_api` to rename files from `some.show.s01e03.blah.abc.avi` to `Some Show - [01x03] - The Episode Name.avi` (which works by getting the episode name from `tvdb_api`)
+
+[![Build Status](https://secure.travis-ci.org/dbr/tvdb_api.png?branch=master)](http://travis-ci.org/dbr/tvdb_api)
+
+## To install
+
+You can easily install `tvdb_api` via `easy_install`
+
+    easy_install tvdb_api
+
+You may need to use sudo, depending on your setup:
+
+    sudo easy_install tvdb_api
+
+The [`tvnamer`][tvnamer] command-line tool can also be installed via `easy_install`, this installs `tvdb_api` as a dependancy:
+
+    easy_install tvnamer
+
+
+## Basic usage
+
+    import tvdb_api
+    t = tvdb_api.Tvdb()
+    episode = t['My Name Is Earl'][1][3] # get season 1, episode 3 of show
+    print episode['episodename'] # Print episode name
+
+## Advanced usage
+
+Most of the documentation is in docstrings. The examples are tested (using doctest) so will always be up to date and working.
+
+The docstring for `Tvdb.__init__` lists all initialisation arguments, including support for non-English searches, custom "Select Series" interfaces and enabling the retrieval of banners and extended actor information. You can also override the default API key using `apikey`, recommended if you're using `tvdb_api` in a larger script or application
+
+### Exceptions
+
+There are several exceptions you may catch, these can be imported from `tvdb_api`:
+
+- `tvdb_error` - this is raised when there is an error communicating with [www.thetvdb.com][tvdb] (a network error most commonly)
+- `tvdb_userabort` - raised when a user aborts the Select Series dialog (by `ctrl+c`, or entering `q`)
+- `tvdb_shownotfound` - raised when `t['show name']` cannot find anything
+- `tvdb_seasonnotfound` - raised when the requested series (`t['show name][99]`) does not exist
+- `tvdb_episodenotfound` - raised when the requested episode (`t['show name][1][99]`) does not exist.
+- `tvdb_attributenotfound` - raised when the requested attribute is not found (`t['show name']['an attribute']`, `t['show name'][1]['an attribute']`, or ``t['show name'][1][1]['an attribute']``)
+
+### Series data
+
+All data exposed by [thetvdb.com][tvdb] is accessible via the `Show` class. A Show is retrieved by doing..
+
+    >>> import tvdb_api
+    >>> t = tvdb_api.Tvdb()
+    >>> show = t['scrubs']
+    >>> type(show)
+    <class 'tvdb_api.Show'>
+
+For example, to find out what network Scrubs is aired:
+
+    >>> t['scrubs']['network']
+    u'ABC'
+
+The data is stored in an attribute named `data`, within the Show instance:
+
+    >>> t['scrubs'].data.keys()
+    ['networkid', 'rating', 'airs_dayofweek', 'contentrating', 'seriesname', 'id', 'airs_time', 'network', 'fanart', 'lastupdated', 'actors', 'ratingcount', 'status', 'added', 'poster', 'imdb_id', 'genre', 'banner', 'seriesid', 'language', 'zap2it_id', 'addedby', 'firstaired', 'runtime', 'overview']
+
+Although each element is also accessible via `t['scrubs']` for ease-of-use:
+
+    >>> t['scrubs']['rating']
+    u'9.0'
+
+This is the recommended way of retrieving "one-off" data (for example, if you are only interested in "seriesname"). If you wish to iterate over all data, or check if a particular show has a specific piece of data, use the `data` attribute,
+
+    >>> 'rating' in t['scrubs'].data
+    True
+
+### Banners and actors
+
+Since banners and actors are separate XML files, retrieving them by default is undesirable. If you wish to retrieve banners (and other fanart), use the `banners` Tvdb initialisation argument:
+
+    >>> from tvdb_api import Tvdb
+    >>> t = Tvdb(banners = True)
+
+Then access the data using a `Show`'s `_banner` key:
+
+    >>> t['scrubs']['_banners'].keys()
+    ['fanart', 'poster', 'series', 'season']
+
+The banner data structure will be improved in future versions.
+
+Extended actor data is accessible similarly:
+
+    >>> t = Tvdb(actors = True)
+    >>> actors = t['scrubs']['_actors']
+    >>> actors[0]
+    <Actor "Zach Braff">
+    >>> actors[0].keys()
+    ['sortorder', 'image', 'role', 'id', 'name']
+    >>> actors[0]['role']
+    u'Dr. John Michael "J.D." Dorian'
+
+Remember a simple list of actors is accessible via the default Show data:
+
+    >>> t['scrubs']['actors']
+    u'|Zach Braff|Donald Faison|Sarah Chalke|Christa Miller|Aloma Wright|Robert Maschio|Sam Lloyd|Neil Flynn|Ken Jenkins|Judy Reyes|John C. McGinley|Travis Schuldt|Johnny Kastl|Heather Graham|Michael Mosley|Kerry Bish\xe9|Dave Franco|Eliza Coupe|'
+
+[tvdb]: http://www.thetvdb.com
+[tvnamer]: http://github.com/dbr/tvnamer

Added: packages/tvdb-api/trunk/debian/rules
===================================================================
--- packages/tvdb-api/trunk/debian/rules	                        (rev 0)
+++ packages/tvdb-api/trunk/debian/rules	2012-04-08 18:12:45 UTC (rev 21109)
@@ -0,0 +1,15 @@
+#!/usr/bin/make -f
+
+%:
+	dh $@
+
+override_dh_clean:
+	dh_clean
+	rm -rf tvdb_api.egg-info
+
+override_dh_auto_install:
+	dh_auto_install
+	rm -rf debian/*/usr/lib/python*/*-packages/tvdb_api*.egg-info
+
+override_dh_installdocs:
+	dh_installdocs readme.md


Property changes on: packages/tvdb-api/trunk/debian/rules
___________________________________________________________________
Added: svn:executable
   + *

Added: packages/tvdb-api/trunk/debian/source/format
===================================================================
--- packages/tvdb-api/trunk/debian/source/format	                        (rev 0)
+++ packages/tvdb-api/trunk/debian/source/format	2012-04-08 18:12:45 UTC (rev 21109)
@@ -0,0 +1 @@
+3.0 (quilt)

Added: packages/tvdb-api/trunk/debian/watch
===================================================================
--- packages/tvdb-api/trunk/debian/watch	                        (rev 0)
+++ packages/tvdb-api/trunk/debian/watch	2012-04-08 18:12:45 UTC (rev 21109)
@@ -0,0 +1,2 @@
+version=3
+http://pypi.python.org/packages/source/t/tvdb_api/tvdb_api-(.*)\.tar.gz




More information about the Python-modules-commits mailing list