diff options
author | Tim Harder <radhermit@gentoo.org> | 2014-10-08 01:20:23 +0000 |
---|---|---|
committer | Tim Harder <radhermit@gentoo.org> | 2014-10-08 01:20:23 +0000 |
commit | 5bf06ca8650e2b90d3b5dba766a657e54e948ded (patch) | |
tree | 257506630a1cb13ae57d40501f43996739c9ce0e /www-misc | |
parent | Version bump. (diff) | |
download | gentoo-2-5bf06ca8650e2b90d3b5dba766a657e54e948ded.tar.gz gentoo-2-5bf06ca8650e2b90d3b5dba766a657e54e948ded.tar.bz2 gentoo-2-5bf06ca8650e2b90d3b5dba766a657e54e948ded.zip |
Remove old.
(Portage version: 2.2.12/cvs/Linux x86_64, signed Manifest commit with key 4AB3E85B4F064CA3)
Diffstat (limited to 'www-misc')
-rw-r--r-- | www-misc/urlwatch/ChangeLog | 6 | ||||
-rw-r--r-- | www-misc/urlwatch/files/urlwatch-xmpp.patch | 138 | ||||
-rw-r--r-- | www-misc/urlwatch/urlwatch-1.14.ebuild | 37 | ||||
-rw-r--r-- | www-misc/urlwatch/urlwatch-1.15.ebuild | 38 |
4 files changed, 5 insertions, 214 deletions
diff --git a/www-misc/urlwatch/ChangeLog b/www-misc/urlwatch/ChangeLog index 6f60ad28d5ae..e54234c83cc1 100644 --- a/www-misc/urlwatch/ChangeLog +++ b/www-misc/urlwatch/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for www-misc/urlwatch # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/www-misc/urlwatch/ChangeLog,v 1.7 2014/10/08 01:19:46 radhermit Exp $ +# $Header: /var/cvsroot/gentoo-x86/www-misc/urlwatch/ChangeLog,v 1.8 2014/10/08 01:20:23 radhermit Exp $ + + 08 Oct 2014; Tim Harder <radhermit@gentoo.org> -urlwatch-1.14.ebuild, + -urlwatch-1.15.ebuild, -files/urlwatch-xmpp.patch: + Remove old. *urlwatch-1.17 (08 Oct 2014) diff --git a/www-misc/urlwatch/files/urlwatch-xmpp.patch b/www-misc/urlwatch/files/urlwatch-xmpp.patch deleted file mode 100644 index 6de100c06893..000000000000 --- a/www-misc/urlwatch/files/urlwatch-xmpp.patch +++ /dev/null @@ -1,138 +0,0 @@ -From 96024c866daeeb9e6bdbde27cbed7f9f65f1bf24 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Michael=20D=C3=BCll=20(akurei)?= <akurei@furdev.org> -Date: Sat, 20 Feb 2010 00:15:58 +0100 -Subject: [PATCH] Added xmpp functionality to v1.9 - ---- - urlwatch | 76 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-- - 1 files changed, 73 insertions(+), 3 deletions(-) - -diff --git a/urlwatch b/urlwatch -index a59aeea..cffc5a7 100755 ---- a/urlwatch -+++ b/urlwatch -@@ -55,6 +55,7 @@ urls_txt = os.path.join(urlwatch_dir, 'urls.txt') - cache_dir = os.path.join(urlwatch_dir, 'cache') - scripts_dir = os.path.join(urlwatch_dir, 'lib') - hooks_py = os.path.join(scripts_dir, 'hooks.py') -+xmpp_txt = os.path.join(urlwatch_dir, 'xmpp.txt') - - # Check if we are installed in the system already - (prefix, bindir) = os.path.split(os.path.dirname(os.path.abspath(sys.argv[0]))) -@@ -136,8 +137,10 @@ if __name__ == '__main__': - parser.add_option('', '--urls', dest='urls', metavar='FILE', help='Read URLs from the specified file') - parser.add_option('', '--hooks', dest='hooks', metavar='FILE', help='Use specified file as hooks.py module') - parser.add_option('-e', '--display-errors', action='store_true', dest='display_errors', help='Include HTTP errors (404, etc..) in the output') -+ parser.add_option('-x', '--xmpp', action='store_true', dest='xmpp', help='Send a message to XMPP clients') -+ parser.add_option('', '--xmpp-file', dest='xmpp_file', metavar='FILE', help='Read XMPP login data and recipients from [FILE] instead') - -- parser.set_defaults(verbose=False, display_errors=False) -+ parser.set_defaults(verbose=False, display_errors=False, xmpp=False) - - (options, args) = parser.parse_args(sys.argv) - -@@ -171,6 +174,9 @@ if __name__ == '__main__': - log.error('%s is not a file' % options.hooks) - print 'Error: %s is not a file' % options.hooks - sys.exit(1) -+ -+ if options.xmpp_file: -+ options.xmpp = True - - # Created all needed folders - for needed_dir in (urlwatch_dir, cache_dir, scripts_dir): -@@ -196,6 +202,52 @@ if __name__ == '__main__': - if not options.hooks and os.path.exists(hooks_py_example) and not os.path.exists(hooks_py_fn): - shutil.copy(hooks_py_example, hooks_py_fn) - sys.exit(1) -+ -+ if options.xmpp: -+ try: -+ import xmpp -+ except ImportError: -+ log.error('python-xmpp not installed') -+ print 'Error: You need python-xmpp installed to use the -x switch' -+ sys.exit(1) -+ -+ if options.xmpp_file: -+ if os.path.isfile(options.xmpp_file): -+ xmpp_txt = options.xmpp_file -+ log.info('using %s as xmpp.txt' % xmpp_txt) -+ else: -+ log.error('no such file: %s' % options.xmpp_file) -+ print 'Error: There is no such file: %s' % options.xmpp_file -+ sys.exit(1) -+ -+ try: -+ xmpp_filehandle = open(xmpp_txt, 'r') -+ except IOError: -+ log.error('No xmpp.txt file') -+ print 'Error: You need to create a xmpp.txt file first.' -+ print '' -+ print 'Place it in %s' % os.path.dirname(xmpp_txt) -+ print '' -+ print '' -+ print 'Syntax is:' -+ print '' -+ print '\tsender-username@server.tld senderpassword' -+ print '\tfirst-recipient@jabberserver1.tld' -+ print '\tsecond-recipient@jabberserver2.tld' -+ print '\tthird-recipient@foobarserver.tld' -+ print '\t...' -+ print '' -+ sys.exit(1) -+ -+ xmpp_lines = xmpp_filehandle.readlines() -+ xmpp_filehandle.close() -+ for i in xrange(len(xmpp_lines)): -+ xmpp_lines[i] = xmpp_lines[i].strip("\n") -+ (xmpp_from, xmpp_pass) = xmpp_lines[0].split(' ') -+ xmpp_to = [] -+ for i in xrange(1, len(xmpp_lines)): -+ xmpp_to.append(xmpp_lines[i]) -+ log.info('using %s to send status messages to %s' % (xmpp_from, xmpp_to)) - - headers = { - 'User-agent': user_agent, -@@ -285,18 +337,36 @@ if __name__ == '__main__': - end = datetime.datetime.now() - - # Output everything -- if len(summary) > 1: -+ if len(summary) > 0: - log.info('printing summary with %d items' % len(summary)) - print '-'*line_length - print 'summary: %d changes' % (len(summary),) - print '' -+ msg = '' - for id, line in enumerate(summary): - print '%02d. %s' % (id+1, line) -+ msg += "\n" + '%02d. %s' % (id+1, line) - print '-'*line_length - print '\n\n\n' -+ -+ if (options.xmpp): -+ try: -+ (xmpp_user, xmpp_server) = xmpp_from.split('@') -+ client = xmpp.Client(xmpp_server) -+ client.connect(server=(xmpp_server,5223)) -+ client.auth(xmpp_user, xmpp_pass, 'urlwatch') -+ client.sendInitPresence() -+ for to in xmpp_to: -+ message = xmpp.Message(to, msg) -+ message.setAttr('type', 'chat') -+ client.send(message) -+ except: -+ log.error('Could not send message to %s' % xmpp_to) -+ print 'Error: Could not send message to %s' % xmpp_to -+ - else: - log.info('summary is too short - not printing') -- if len(details) > 1: -+ if len(details) > 1 and not options.xmpp: - log.info('printing details with %d items' % len(details)) - print '\n'.join(details) - print '-- ' --- -1.7.0 - diff --git a/www-misc/urlwatch/urlwatch-1.14.ebuild b/www-misc/urlwatch/urlwatch-1.14.ebuild deleted file mode 100644 index 5dacbd7fcbfd..000000000000 --- a/www-misc/urlwatch/urlwatch-1.14.ebuild +++ /dev/null @@ -1,37 +0,0 @@ -# Copyright 1999-2013 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/www-misc/urlwatch/urlwatch-1.14.ebuild,v 1.3 2013/09/13 21:34:32 mgorny Exp $ - -EAPI="4" -PYTHON_DEPEND="2:2.5 3:3.2" -SUPPORT_PYTHON_ABIS="1" -DISTUTILS_USE_SEPARATE_SOURCE_DIRECTORIES="1" - -inherit distutils eutils - -DESCRIPTION="A tool for monitoring webpages for updates" -HOMEPAGE="http://thp.io/2008/urlwatch/ http://pypi.python.org/pypi/urlwatch" -SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" - -LICENSE="BSD" -SLOT="0" -KEYWORDS="~amd64 ~x86" -IUSE="xmpp" - -RDEPEND="xmpp? ( dev-python/xmpppy ) - virtual/python-futures" -DEPEND="${RDEPEND}" - -src_prepare() { - use xmpp && epatch "${FILESDIR}"/${PN}-xmpp.patch - sed -i -e "s/^os.unlink/#\0/" setup.py || die - - distutils_src_prepare - - 2to3_conversion() { - [[ "${PYTHON_ABI}" == 2.* ]] && return - 2to3-${PYTHON_ABI} -nw --no-diffs urlwatch lib/urlwatch/*.py \ - examples/hooks.py.example setup.py || die "2to3 failed" - } - python_execute_function -s 2to3_conversion -} diff --git a/www-misc/urlwatch/urlwatch-1.15.ebuild b/www-misc/urlwatch/urlwatch-1.15.ebuild deleted file mode 100644 index cc752cc065ff..000000000000 --- a/www-misc/urlwatch/urlwatch-1.15.ebuild +++ /dev/null @@ -1,38 +0,0 @@ -# Copyright 1999-2013 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/www-misc/urlwatch/urlwatch-1.15.ebuild,v 1.2 2013/09/13 21:34:32 mgorny Exp $ - -EAPI="4" -PYTHON_DEPEND="2:2.5 3:3.2" -SUPPORT_PYTHON_ABIS="1" -DISTUTILS_USE_SEPARATE_SOURCE_DIRECTORIES="1" - -inherit distutils eutils - -DESCRIPTION="A tool for monitoring webpages for updates" -HOMEPAGE="http://thp.io/2008/urlwatch/ http://pypi.python.org/pypi/urlwatch" -SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" - -LICENSE="BSD" -SLOT="0" -KEYWORDS="~amd64 ~x86" -IUSE="xmpp" - -DEPEND="virtual/python-futures" -RDEPEND="${DEPEND} - xmpp? ( dev-python/xmpppy ) - || ( www-client/lynx app-text/html2text )" - -src_prepare() { - use xmpp && epatch "${FILESDIR}"/${PN}-xmpp.patch - sed -i "s/^os.unlink/#\0/" setup.py || die - - distutils_src_prepare - - 2to3_conversion() { - [[ "${PYTHON_ABI}" == 2.* ]] && return - 2to3-${PYTHON_ABI} -nw --no-diffs urlwatch lib/urlwatch/*.py \ - examples/hooks.py.example setup.py || die "2to3 failed" - } - python_execute_function -s 2to3_conversion -} |