Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add Debian package building support.

  • Loading branch information...
commit ca0a7c733b88f9b344930cf45664c7f91e5d59e2 2 parents 538ec74 + 5deafa3
@jeremyvisser jeremyvisser authored
View
9 README
@@ -21,6 +21,8 @@ Requirements
(Some Windows users report better compatibility with Python 2.5.)
* BeautifulSoup <http://www.crummy.com/software/BeautifulSoup/>
* rtmpdump <http://lkcl.net/rtmp/>
+* simplejson <http://pypi.python.org/pypi/simplejson/>
+ (Only for Python 2.5 users -- same functionality is built-in to Python 2.6.)
Installation
============
@@ -29,7 +31,8 @@ Installation
2. Make sure BeautifulSoup is installed in Python and working.
3. Install rtmpdump. If building from source, copy rtmpdump_x86 to
somewhere within your $PATH (e.g. /usr/local/bin).
-4. Either run ./iview-cli or ./iview-gtk.
+4. If you are running Python 2.5, install simplejson.
+5. Either run ./iview-cli or ./iview-gtk.
Usage
=====
@@ -61,8 +64,8 @@ To actually download the program, use something like the following:
If rtmpdump is all set up correctly, hopefully that will download
an .flv file into your current directory, appropriately named. If it
-didn't work, type "rtmpdump_x86" and see if it does anything. If
-not, install it, or put it somewhere on your $PATH.
+didn't work, type "rtmpdump" or "rtmpdump_x86" and see if it does anything.
+If not, install it, or put it somewhere on your $PATH.
Hacking
=======
View
5 debian/changelog
@@ -0,0 +1,5 @@
+python-iview (0.2-1) unstable; urgency=low
+
+ * Initial release
+
+ -- Jeremy Visser <jeremy@visser.name> Sat, 20 Feb 2010 23:25:31 +1100
View
1  debian/compat
@@ -0,0 +1 @@
+7
View
21 debian/control
@@ -0,0 +1,21 @@
+Source: python-iview
+Section: main
+Priority: extra
+Maintainer: Jeremy Visser <jeremy@visser.name>
+Build-Depends: debhelper (>= 7), cdbs
+Standards-Version: 3.8.1
+Homepage: http://jeremy.visser.name/python-iview/
+
+Package: python-iview
+Architecture: all
+Depends: ${shlibs:Depends}, ${misc:Depends}, python2.6 | python2.5, python-beautifulsoup
+Recommends: rtmpdump
+Suggests: python-simplejson
+Description: GTK+–based frontend to ABC iView
+ The ABC iView service is a video-on-demand streaming service
+ by the Australian Broadcasting Corporation based on Adobe Flash.
+ .
+ Unfortunately, Adobe Flash is non-free software that also runs
+ slowly or not at all on certain platforms. Python-iView offers
+ an alternative interface to the iView service for users that
+ are inconvenienced or restricted by the Flash interface.
View
2  debian/dirs
@@ -0,0 +1,2 @@
+usr/bin
+usr/share/applications
View
1  debian/docs
@@ -0,0 +1 @@
+README
View
1  debian/pycompat
@@ -0,0 +1 @@
+2
View
14 debian/rules
@@ -0,0 +1,14 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+
+DEB_PYTHON_SYSTEM := pysupport
+
+include /usr/share/cdbs/1/rules/debhelper.mk
+include /usr/share/cdbs/1/class/python-distutils.mk
+
+clean::
+ rm -rf build build-stamp configure-stamp build/ MANIFEST
+ dh_clean
+
+.PHONY: build clean binary-indep binary-arch binary install configure
+
View
14 iview-gtk
@@ -63,13 +63,27 @@ class DownloadWorker(threading.Thread):
if progress_search is None and size_search is None:
print 'Backend debug:\t' + r
+ gtk.gdk.threads_enter()
self.parent.progress.set_fraction(1.)
self.parent.progress.set_text('Download complete')
self.parent.close_btn.set_label(gtk.STOCK_CLOSE)
+ gtk.gdk.threads_leave()
class Downloader(gtk.Window):
def __init__(self, url, title=None, dest_file=None):
self.job = iview.fetch_program(url, dest_file=dest_file)
+
+ if not self.job:
+ message = gtk.MessageDialog(
+ parent=None,
+ type=gtk.MESSAGE_ERROR,
+ buttons=gtk.BUTTONS_CLOSE)
+ message.set_markup('<big><b>Download backend failed</b></big>\n\n' \
+ 'Either the download backend in question failed for some reason, or one could not be found with which to download iView programmes. Please check the README file for instructions on setting this up.')
+ message.run()
+ message.destroy()
+ return
+
self.download_worker = DownloadWorker(self).start()
gtk.Window.__init__(self)
View
7 iview-gtk.desktop
@@ -0,0 +1,7 @@
+[Desktop Entry]
+Name=Python-iView
+Comment=Use ABC iView
+Exec=iview-gtk %U
+Terminal=false
+Type=Application
+Categories=GTK;Network;
View
5 iview/fetch.py
@@ -40,7 +40,10 @@ def rtmpdump(rtmp_url, rtmp_host, rtmp_app, rtmp_playpath, output_filename, resu
except OSError:
print 'Could not load %s, trying another...' % exec_attempt
continue
- return
+
+ print "It looks like you don't have a compatible downloader backend installed."
+ print "See the README file for more information about setting this up properly."
+ return False
def fetch_program(url, execvp=False, dest_file=None):
if dest_file is None:
View
11 setup.py
@@ -0,0 +1,11 @@
+from distutils.core import setup
+import iview.config
+setup(
+ name='iview',
+ version=iview.config.version,
+ packages=['iview'],
+ data_files=[
+ ('/usr/bin', ['iview-cli', 'iview-gtk']),
+ ('/usr/share/applications', ['iview-gtk.desktop']),
+ ],
+ )
Please sign in to comment.
Something went wrong with that request. Please try again.