--- gpodder-0.10.2.orig/debian/compat +++ gpodder-0.10.2/debian/compat @@ -0,0 +1 @@ +4 --- gpodder-0.10.2.orig/debian/copyright +++ gpodder-0.10.2/debian/copyright @@ -0,0 +1,52 @@ +This package was debianized by Thomas Perl on +Fri, 07 Apr 2006 21:48:47 +0200. + +Upstream Website: + http://gpodder.berlios.de/ + +Upstream Author: + Thomas Perl + +Copyright: + Copyright (C) 2005-2007 Thomas Perl + + +gPodder 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 3 of the License, or +(at your option) any later version. + +gPodder 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 + +On Debian GNU/Linux systems, the complete text of the GNU General +Public License can be found in `/usr/share/common-licenses/GPL'. + +======== + +License for src/gpodder/SimpleGladeApp.py: + +Copyright (c) 2004 Sandino Flores Moreno + +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation; either +version 2.1 of the License, or (at your option) any later version. + +This library 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 +Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public +License along with this library; if not, write to the Free Software +Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + +On Debian GNU/Linux systems, the complete text of the GNU Lesser General +Public License can be found in `/usr/share/common-licenses/LGPL'. + --- gpodder-0.10.2.orig/debian/pycompat +++ gpodder-0.10.2/debian/pycompat @@ -0,0 +1 @@ +2 --- gpodder-0.10.2.orig/debian/gpodder.menu +++ gpodder-0.10.2/debian/gpodder.menu @@ -0,0 +1,5 @@ +?package(gpodder):\ + needs="X11"\ + section="Applications/Network"\ + title="gPodder Podcast Client"\ + command="gpodder" --- gpodder-0.10.2.orig/debian/control +++ gpodder-0.10.2/debian/control @@ -0,0 +1,23 @@ +Source: gpodder +Maintainer: Thomas Perl +Section: x11 +Priority: optional +Standards-Version: 3.7.2 +Build-Depends: debhelper (>= 5.0.37.2), python-dev, python-support (>= 0.3), help2man, intltool, imagemagick +XS-Python-Version: >= 2.4 +XB-Python-Version: ${python:Versions} + +Package: gpodder +Architecture: all +Depends: ${python:Depends}, python-gtk2, python-glade2, python-feedparser +Recommends: python-gpod +Suggests: python-eyed3, python-pymad, mplayer +Description: A GTK+ Media aggregator and Podcast catcher + gPodder is a podcast receiver/catcher. You can subscribe to RSS + feeds (Podcasts) and download audio/video content from different + channels. You can then playback content on your desktop or + synchronize to your iPod or portable MP3 player. Simultaneous + downloads and automatic downloads of new episodes are also supported. + . + Homepage: http://gpodder.berlios.de/ + --- gpodder-0.10.2.orig/debian/changelog +++ gpodder-0.10.2/debian/changelog @@ -0,0 +1,206 @@ +gpodder (0.10.2-2ubuntu1) gutsy; urgency=low + + * Convert channels.xml to channels.opml when upgrading from + gPodder 0.9.4 (in Ubuntu Gutsy) to this version (LP: #179256) + + -- Thomas Perl Wed, 02 Jan 2008 15:36:31 +0100 + +gpodder (0.10.2-2) unstable; urgency=low + + * Fix bug that prevents the channel list from being saved when no + channels.opml file exists in gPodder's config directory (first run) + + -- Thomas Perl Sat, 01 Dec 2007 15:05:39 +0100 + +gpodder (0.10.2-1) unstable; urgency=low + + * The "Ein schweineschnauzen Sandwich, bitte!" release + * Check for free disk space before saving channel list (Closes: #452490) + + -- Thomas Perl Mon, 26 Nov 2007 18:52:14 +0100 + +gpodder (0.10.1-1) unstable; urgency=low + + * The "Nukular, das Wort heißt Nukular" release + + -- Thomas Perl Mon, 29 Oct 2007 13:18:08 +0100 + +gpodder (0.10.0-3) unstable; urgency=low + + * Only support Python versions >= 2.4 + + -- Thomas Perl Fri, 05 Oct 2007 09:37:04 +0200 + +gpodder (0.10.0-2) unstable; urgency=low + + * Set XS-Python-Version to "all" (Closes: #445278) + * Update copyright file to reflect GPLv3 change + + -- Thomas Perl Fri, 21 Sep 2007 02:16:59 +0200 + +gpodder (0.10.0-1) unstable; urgency=low + + * The "Hier spricht Frank Drebin" release + * New dependency: python-feedparser + * Removed dependencies: wget, python-xml + * Support for Atom feeds through feedparser (Closes: #430844) + * Deleting not-downloaded episodes enabled (Closes: 441285) + + -- Thomas Perl Fri, 21 Sep 2007 02:13:35 +0200 + +gpodder (0.9.5-2) unstable; urgency=low + + * Fix problem with invalid file sizes in RSS feeds (Closes: #441284) + + -- Thomas Perl Sat, 08 Sep 2007 17:09:48 +0200 + +gpodder (0.9.5-1) unstable; urgency=low + + * The "we can do funky release titles, too" release + * Change rules file to keep gui.py.orig + * Remove Recommends on python-id3 and mplayer + + -- Thomas Perl Sun, 26 Aug 2007 20:23:30 +0200 + +gpodder (0.9.4-1) unstable; urgency=low + + * New upstream release (Closes: #432805, #433029) + * Added gpodder.menu file + * Remove locally-changed files (included upstream) + + -- Thomas Perl Sat, 21 Jul 2007 13:53:55 +0200 + +gpodder (0.9.3-2) unstable; urgency=low + + * The "oh so many small bugs" release + * Workaround buggy RSS feeds with no titles, thanks to Holger Leskien + (Closes: #430843) + * Applied patch from Mykola Nikishov to fix a wget bug (Closes: #431446) + + -- Thomas Perl Mon, 25 Jun 2007 23:16:12 +0200 + +gpodder (0.9.3-1) unstable; urgency=low + + * New upstream release + * Recommend mplayer, python-id3 and python-gpod and + suggest python-eyed3 and python-pymad as dependencies + + -- Thomas Perl Mon, 25 Jun 2007 23:14:00 +0200 + +gpodder (0.9.2-1) unstable; urgency=low + + * New upstream release + + -- Thomas Perl Wed, 23 May 2007 15:05:21 +0200 + +gpodder (0.9.1-3) unstable; urgency=low + + * Fixed FSF address from old GPL/LGPL license stanzas, metioned the + location of the full licenses on Debian systems for GPL/LGPL + + -- Thomas Perl Sun, 22 Apr 2007 23:33:12 +0200 + +gpodder (0.9.1-2) unstable; urgency=low + + * Updated copyright file to state copyright of tepache and SimpleGladeApp + + -- Thomas Perl Sun, 22 Apr 2007 23:32:03 +0200 + +gpodder (0.9.1-1) unstable; urgency=low + + * New upstream release + * Added postinst script (run gtk-update-icon-cache) + + -- Thomas Perl Thu, 05 Apr 2007 09:54:54 +0200 + +gpodder (0.9.0+svn200703221-1) unstable; urgency=low + + * New upstream release (Closes: #415059) + + -- Thomas Perl Thu, 22 Mar 2007 13:16:46 +0100 + +gpodder (0.9.0+svn200703141-1) unstable; urgency=low + + * New upstream release + + -- Thomas Perl Wed, 14 Mar 2007 20:59:20 +0100 + +gpodder (0.9.0+svn200703101-2) unstable; urgency=low + + * Removed some unneeded dh_* commands from rules file + + -- Thomas Perl Mon, 12 Mar 2007 21:58:55 +0100 + +gpodder (0.9.0+svn200703101-1) unstable; urgency=low + + * New upstream release + + -- Thomas Perl Sat, 10 Mar 2007 18:42:19 +0100 + +gpodder (0.9.0+svn200703081-1) unstable; urgency=low + + * New upstream release + + -- Thomas Perl Fri, 9 Mar 2007 18:36:35 +0100 + +gpodder (0.9.0+svn200703072-1) unstable; urgency=low + + * New upstream release + + -- Thomas Perl Wed, 7 Mar 2007 16:36:28 +0100 + +gpodder (0.9.0+svn20070307-1) unstable; urgency=low + + * New upstream release + + -- Thomas Perl Wed, 7 Mar 2007 11:48:58 +0100 + +gpodder (0.9.0-3) unstable; urgency=low + + * Add build-dependency on imagemagick (for convert call) + * Fix broken artwork installation in setup.py + + -- Thomas Perl Wed, 7 Mar 2007 11:09:54 +0100 + +gpodder (0.9.0-2) unstable; urgency=low + + * Package for python-support and mentors.debian.net + * Cleanup of package structure, removed unneeded stuff from rules + + -- Thomas Perl Wed, 7 Mar 2007 00:13:40 +0100 + +gpodder (0.9.0-1etch0) unstable; urgency=low + + * New upstream release + + -- Thomas Perl Tue, 6 Mar 2007 20:58:22 +0100 + +gpodder (0.8.9-1etch0) unstable; urgency=low + + * New upstream release + + -- Thomas Perl Sat, 3 Feb 2007 12:04:19 +0100 + +gpodder (0.8.0-1sarge0) unstable; urgency=low + + * New upstream release + + -- Thomas Perl Fri, 28 Jul 2006 14:58:26 +0200 + +gpodder (0.7.9-1sarge0) unstable; urgency=low + + * New upstream release + + -- Thomas Perl Mon, 17 Jul 2006 17:36:33 +0200 + +gpodder (0.7-2) unstable; urgency=low + + * Fixed problem with buggy RSS feeds (wrong "size") + + -- Thomas Perl Sat, 8 Apr 2006 19:40:20 +0200 + +gpodder (0.7-1) unstable; urgency=low + + * Initial release + + -- Thomas Perl Sat, 8 Apr 2006 11:17:28 +0200 --- gpodder-0.10.2.orig/debian/postinst +++ gpodder-0.10.2/debian/postinst @@ -0,0 +1,9 @@ +#! /bin/sh + +if [ -x /usr/bin/gtk-update-icon-cache ] +then + /usr/bin/gtk-update-icon-cache -f /usr/share/icons/hicolor +fi + +#DEBHELPER# + --- gpodder-0.10.2.orig/debian/rules +++ gpodder-0.10.2/debian/rules @@ -0,0 +1,71 @@ +#!/usr/bin/make -f +# -*- makefile -*- +# Sample debian/rules that uses debhelper. +# This file was originally written by Joey Hess and Craig Small. +# As a special exception, when this file is copied by dh-make into a +# dh-make output file, you may use that output file without restriction. +# This special exception was added by Craig Small in version 0.37 of dh-make. + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +CHANGELOG = ChangeLog +DOCS = AUTHORS README TODO + +PYTHON = /usr/bin/python +SETUP = ${PYTHON} setup.py + +DEBPACKAGE = gpodder +DESTDIR = debian/${DEBPACKAGE} +PREFIX = usr + +configure: configure-stamp +configure-stamp: + dh_testdir + # Add here commands to configure the package. + touch configure-stamp + +build: build-stamp +build-stamp: configure-stamp + dh_testdir + ${SETUP} build + touch build-stamp + +clean: + dh_testdir + dh_testroot + rm -f build-stamp configure-stamp + ${SETUP} clean --all + rm -rf build dist + dh_clean --exclude 'gui.py.orig' + make clean + +install: build + dh_testdir + dh_testroot + dh_clean -k --exclude 'gui.py.orig' + dh_installdirs + make generators + ${SETUP} install --no-compile --root='$(DESTDIR)' --install-lib=$(PREFIX)/share/python-support/$(DEBPACKAGE) + +binary-arch: + +binary-indep: build install + dh_testdir + dh_testroot + dh_installchangelogs $(CHANGELOG) + dh_installdocs $(DOCS) + dh_installmenu + dh_installman + dh_compress + dh_fixperms + dh_pysupport + dh_installdeb + dh_gencontrol + dh_md5sums + dh_builddeb + +binary: binary-indep + +.PHONY: build clean binary-indep binary-arch binary install configure + --- gpodder-0.10.2.orig/src/gpodder/libgpodder.py +++ gpodder-0.10.2/src/gpodder/libgpodder.py @@ -30,6 +30,7 @@ import threading import urllib import shutil +import xml.dom.minidom from gpodder import util from gpodder import opml @@ -62,13 +63,54 @@ self.feed_cache_file = os.path.join( gpodder_dir, 'feedcache.db') self.channel_settings_file = os.path.join( gpodder_dir, 'channelsettings.db') - self.channel_opml_file = os.path.join( gpodder_dir, 'channels.opml') + + self.channel_opml_file = os.path.join(gpodder_dir, 'channels.opml') + self.channel_xml_file = os.path.join(gpodder_dir, 'channels.xml') + + if os.path.exists(self.channel_xml_file) and not os.path.exists(self.channel_opml_file): + log('Trying to migrate channel list (channels.xml=>channels.opml)', sender=self) + self.migrate_channels_xml() self.config = config.Config( os.path.join( gpodder_dir, 'gpodder.conf')) self.__download_history = HistoryStore( os.path.join( gpodder_dir, 'download-history.txt')) self.__playback_history = HistoryStore( os.path.join( gpodder_dir, 'playback-history.txt')) - + + def migrate_channels_xml(self): + """Migrate old (gPodder < 0.9.5) channels.xml to channels.opml + + This function does a one-time conversion of the old + channels.xml file format to the new (supported by + 0.9.5, the default on 0.10.0) channels.opml format. + """ + def channels_xml_iter(filename='channels.xml'): + for e in xml.dom.minidom.parse(filename).getElementsByTagName('url'): + yield ''.join(n.data for n in e.childNodes if n.nodeType==n.TEXT_NODE) + + def create_outline(doc, url): + outline = doc.createElement('outline') + for w in (('title', ''), ('text', ''), ('xmlUrl', url), ('type', 'rss')): + outline.setAttribute(*w) + return outline + + def export_opml(urls, filename='channels.opml'): + doc = xml.dom.minidom.Document() + opml = doc.createElement('opml') + opml.setAttribute('version', '1.1') + doc.appendChild(opml) + body = doc.createElement('body') + for url in urls: + body.appendChild(create_outline(doc, url)) + opml.appendChild(body) + open(filename,'w').write(doc.toxml(encoding='utf-8')) + + try: + export_opml(channels_xml_iter(self.channel_xml_file), self.channel_opml_file) + shutil.move(self.channel_xml_file, self.channel_xml_file+'.converted') + log('Successfully converted channels.xml to channels.opml', sender=self) + except: + log('Cannot convert old channels.xml to channels.opml', traceback=True, sender=self) + def get_device_name( self): if self.config.device_type == 'ipod': return _('iPod') --- gpodder-0.10.2.orig/src/gpodder/util.py +++ gpodder-0.10.2/src/gpodder/util.py @@ -70,6 +70,8 @@ Converts any URL to http:// or ftp:// so that it can be used with "wget". If the URL cannot be converted (invalid or unknown scheme), "None" is returned. + + This will also normalize feed:// and itpc:// to http:// """ if not url or len( url) < 8: return None @@ -77,7 +79,7 @@ if url.startswith( 'http://') or url.startswith( 'https://') or url.startswith( 'ftp://'): return url - if url.startswith( 'feed://'): + if url.startswith('feed://') or url.startswith('itpc://'): return 'http://' + url[7:] return None @@ -140,7 +142,15 @@ """ Calculates the free disk space available to the current user on the file system that contains the given path. + + If the path (or its parent folder) does not yet exist, this + function returns zero. """ + + path = os.path.dirname(path) + if not os.path.exists(path): + return 0 + s = os.statvfs(path) return s.f_bavail * s.f_bsize