#2 Update to latest upstream release 2.21
Merged 2 years ago by fab. Opened 2 years ago by onosek.
rpms/ onosek/urlwatch f32  into  f32

file modified
+1
@@ -6,3 +6,4 @@ 

  /urlwatch-1.18.tar.gz

  /urlwatch-2.6.tar.gz

  /urlwatch-2.17.tar.gz

+ /urlwatch-2.21.tar.gz

file modified
+1 -1
@@ -1,1 +1,1 @@ 

- SHA512 (urlwatch-2.17.tar.gz) = 264b72b1dafa73898d095e43a341d23fde9e29b0b54a4bc7d5094c8cecb94173792a077a4314b42765dfed376e19052808f4abda3227f3a62e1cd5a3854c101e

+ SHA512 (urlwatch-2.21.tar.gz) = e832ae0ed836739b85c9e71e0028fc475dcd2944af78c61391d7b3f155b1f22f52e5913b1dd4207f79c210383e6f187650a7e2ef109a59827881d825bfaee7c1

file modified
+11 -2
@@ -1,6 +1,6 @@ 

  Name:           urlwatch

- Version:        2.17

- Release:        5%{?dist}

+ Version:        2.21

+ Release:        1%{?dist}

  Summary:        A tool for monitoring webpages for updates

  

  License:        BSD
@@ -57,6 +57,15 @@ 

  %{python3_sitelib}/%{name}*.egg-info

  

  %changelog

+ * Thu Nov 26 2020 Ondřej Nosek <onosek@redhat.com> - 2.21-1

+ - Update to latest upstream release 2.21

+ 

+ * Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.17-7

+ - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild

+ 

+ * Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 2.17-6

+ - Rebuilt for Python 3.9

+ 

  * Fri Jan 31 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.17-5

  - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild

  

@@ -1,124 +0,0 @@ 

- --- urlwatch	2009-08-14 01:47:46.457960865 +0200

- +++ urlwatch_xmpp	2009-08-14 15:46:25.881464617 +0200

- @@ -55,6 +55,7 @@

-  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])))

- @@ -141,8 +142,10 @@

-      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)

-  

- @@ -176,6 +179,9 @@

-              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):

- @@ -201,6 +207,52 @@

-          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,

- @@ -277,18 +329,36 @@

-      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 '-- '