Hello community,

here is the log from the commit of package googler for openSUSE:Factory checked 
in at 2019-03-18 10:42:08
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/googler (Old)
 and      /work/SRC/openSUSE:Factory/.googler.new.28833 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "googler"

Mon Mar 18 10:42:08 2019 rev:2 rq:685588 version:3.7.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/googler/googler.changes  2018-04-20 
17:27:47.242200248 +0200
+++ /work/SRC/openSUSE:Factory/.googler.new.28833/googler.changes       
2019-03-18 10:42:11.507211919 +0100
@@ -1,0 +2,20 @@
+Sat Mar 16 08:47:43 UTC 2019 - [email protected]
+
+- Update to version 3.7.1
+    * Custom user agent
+    * Fix to unescape auto-completions
+
+- Update to version 3.7
+    * Support xclip as a clipboard utility on *nix
+    * Support GNU Screen and tmux as clipboard fallback
+    * Support Termux clipboard on Android
+
+- Update to version 3.6 
+    * Decode auto-completion info as per charset in response header
+    * Ignore trailing / in proxy
+    * Some heath sites added to googler @t
+    * User agent updated to Firefox 60
+    * Availability on Fedora and openSUSE
+    * More auto-generated packages
+
+-------------------------------------------------------------------

Old:
----
  v3.5.tar.gz

New:
----
  v3.7.1.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ googler.spec ++++++
--- /var/tmp/diff_new_pack.tC4bWc/_old  2019-03-18 10:42:13.391209617 +0100
+++ /var/tmp/diff_new_pack.tC4bWc/_new  2019-03-18 10:42:13.395209612 +0100
@@ -17,14 +17,14 @@
 
 
 Name:           googler
-Version:        3.5
+Version:        3.7.1
 Release:        0
 Summary:        Google Search, Google Site Search, Google News from the 
terminal
 License:        GPL-3.0+
 Group:          Productivity/Networking/Web/Utilities
 Url:            https://github.com/jarun/googler
 Source:         https://github.com/jarun/googler/archive/v%{version}.tar.gz
-BuildRequires:  python3-devel >= 3.3
+BuildRequires:  python3-devel >= 3.4
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 BuildArch:      noarch
 
@@ -43,6 +43,9 @@
 
 %install
 make PREFIX=%{buildroot}%{_prefix} install
+# Fix the googler.noarch: E: env-script-interpreter (Badness: 9) error by
+# rpmlint.
+sed -i 's|/usr/bin/env\ python|/usr/bin/python|1' 
%{buildroot}/%{_bindir}/%{name}
 
 # wrong location
 rm -rf %{buildroot}%{_datadir}/doc/googler

++++++ v3.5.tar.gz -> v3.7.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/googler-3.5/CHANGELOG new/googler-3.7.1/CHANGELOG
--- old/googler-3.5/CHANGELOG   2018-02-16 03:07:19.000000000 +0100
+++ new/googler-3.7.1/CHANGELOG 2018-10-09 22:24:00.000000000 +0200
@@ -1,3 +1,35 @@
+googler 3.7.1
+2018-10-10
+
+What's in?
+- Custom user agent
+- Fix to unescape auto-completions
+
+-------------------------------------------------------------------------------
+
+googler 3.7
+2018-09-16
+
+What's in?
+- Support xclip as a clipboard utility on *nix
+- Support GNU Screen and tmux as clipboard fallback
+- Support Termux clipboard on Android
+
+-------------------------------------------------------------------------------
+
+googler 3.6
+2018-05-23
+
+What's in?
+- Decode auto-completion info as per charset in response header
+- Ignore trailing `/` in proxy
+- Some heath sites added to googler @t
+- User agent updated to Firefox 60
+- Availability on Fedora and openSUSE
+- More auto-generated packages
+
+-------------------------------------------------------------------------------
+
 googler 3.5
 2018-02-16
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/googler-3.5/README.md new/googler-3.7.1/README.md
--- old/googler-3.5/README.md   2018-02-16 03:07:19.000000000 +0100
+++ new/googler-3.7.1/README.md 2018-10-09 22:24:00.000000000 +0200
@@ -5,14 +5,18 @@
 <a href="https://aur.archlinux.org/packages/googler";><img 
src="https://img.shields.io/aur/version/googler.svg?maxAge=600"; alt="AUR" /></a>
 <a href="http://formulae.brew.sh/formula/googler";><img 
src="https://img.shields.io/homebrew/v/googler.svg?maxAge=600"; alt="Homebrew" 
/></a>
 <a 
href="https://packages.debian.org/search?keywords=googler&searchon=names";><img 
src="https://img.shields.io/badge/debian-9+-blue.svg?maxAge=2592000"; 
alt="Debian Stretch+" /></a>
+<a href="https://apps.fedoraproject.org/packages/googler";><img 
src="https://img.shields.io/badge/fedora-27+-blue.svg?maxAge=2592000"; 
alt="Fedora 27+" /></a>
+<a href="https://software.opensuse.org/search?q=googler";><img 
src="https://img.shields.io/badge/opensuse%20leap-15.0+-blue.svg?maxAge=2592000";
 alt="openSUSE Leap 15.0+" /></a>
 <a 
href="https://packages.ubuntu.com/search?keywords=googler&searchon=names";><img 
src="https://img.shields.io/badge/ubuntu-16.10+-blue.svg?maxAge=2592000"; 
alt="Ubuntu Yakkety+" /></a>
-<a href="https://launchpad.net/~twodopeshaggy/+archive/ubuntu/jarun/";><img 
src="https://img.shields.io/badge/ubuntu-PPA-blue.svg?maxAge=2592000"; 
alt="Ubuntu PPA" /></a>
+</p>
+
+<p align="center">
 <a href="https://github.com/jarun/googler/blob/master/LICENSE";><img 
src="https://img.shields.io/badge/license-GPLv3-yellow.svg?maxAge=2592000"; 
alt="License" /></a>
 <a href="https://travis-ci.org/jarun/googler";><img 
src="https://travis-ci.org/jarun/googler.svg?branch=master"; alt="Build Status" 
/></a>
 </p>
 
 <p align="center">
-<a href="https://asciinema.org/a/85019";><img 
src="https://s1.postimg.org/1hg2x1dqrj/googler.png"; alt="Asciicast" 
width="734"/></a>
+<a href="https://asciinema.org/a/85019";><img 
src="https://i.imgur.com/EbZof9q.png"; alt="Asciicast" width="734"/></a>
 </p>
 
 `googler` is a power tool to Google (Web & News) and Google Site Search from 
the command-line. It shows the title, URL and abstract for each result, which 
can be directly opened in a browser from the terminal. Results are fetched in 
pages (with page navigation). Supports sequential searches in a single 
`googler` instance.
@@ -21,13 +25,11 @@
 
 `googler` isn't affiliated to Google in any way.
 
-*Looking for a similar utility for privacy-aware DuckDuckGo?* Check out 
[`ddgr`](https://github.com/jarun/ddgr)!
-
-*Love smart and efficient terminal utilities? Explore my repositories. Buy me 
a cup of coffee if they help you.*
+*Love smart and efficient utilities? Explore [my 
repositories](https://github.com/jarun?tab=repositories). Buy me a cup of 
coffee if they help you.*
 
 <p align="center">
 <a href="https://saythanks.io/to/jarun";><img 
src="https://img.shields.io/badge/say-thanks!-ff69b4.svg"; /></a>
-<a 
href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=RMLTQ76JSXJ4Q";><img
 src="https://img.shields.io/badge/Donate-$5-green.svg"; alt="Donate via 
PayPal!" /></a>
+<a 
href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=RMLTQ76JSXJ4Q";><img
 src="https://img.shields.io/badge/PayPal-donate-green.svg"; alt="Donate via 
PayPal!" /></a>
 </p>
 
 ### Table of contents
@@ -79,19 +81,22 @@
 
 `googler` requires Python 3.4 or later. Only the latest patch release of each 
minor version is supported.
 
-To copy url to clipboard at the omniprompt, `googler` uses `xsel` on Linux, 
`pbcopy` (default installed) on OS X and `clip` (default installed) on Windows.
+To copy url to clipboard at the omniprompt, `googler` looks for `xsel` or 
`xclip` or `termux-clipboard-set` (in the same order) on Linux, `pbcopy` 
(default installed) on OS X and `clip` (default installed) on Windows. It also 
supports GNU Screen and tmux copy-paste buffers in the absence of X11.
 
 #### From a package manager
 
-- [AUR](https://aur.archlinux.org/packages/googler/)
-- [Debian](https://packages.debian.org/search?keywords=googler&searchon=names)
+- [AUR](https://aur.archlinux.org/packages/googler/) (`yaourt -S googler`)
+- [Debian](https://packages.debian.org/search?keywords=googler&searchon=names) 
(`apt-get install googler`)
+- [Fedora](https://apps.fedoraproject.org/packages/googler) (`dnf install 
googler`)
 - [FreeBSD](https://www.freshports.org/www/googler/) (`pkg install googler`)
-- [Homebrew](http://formulae.brew.sh/formula/googler)
-- 
[NixOS](https://github.com/NixOS/nixpkgs/tree/master/pkgs/applications/misc/googler)
 (`sudo nix-env -i googler`)
-- [openSUSE](https://software.opensuse.org/package/googler)
-- [Slackware](http://slackbuilds.org/repository/14.2/network/googler/)
-- [Ubuntu](https://packages.ubuntu.com/search?keywords=googler&searchon=names)
-- [Ubuntu PPA](https://launchpad.net/~twodopeshaggy/+archive/ubuntu/jarun/)
+- [Homebrew](http://formulae.brew.sh/formula/googler) (`brew install googler`)
+- 
[NixOS](https://github.com/NixOS/nixpkgs/tree/master/pkgs/applications/misc/googler)
 (`nix-env -i googler`)
+- [openSUSE](https://software.opensuse.org/search?q=googler) (`zypper in 
googler`)
+- [Slackware](http://slackbuilds.org/repository/14.2/network/googler/) 
(`slackpkg install googler`)
+- [Snap Store](https://snapcraft.io/googler) (`snap install googler`)
+- [Ubuntu](https://packages.ubuntu.com/search?keywords=googler&searchon=names) 
(`apt-get install googler`)
+- [Ubuntu PPA](https://launchpad.net/~twodopeshaggy/+archive/ubuntu/jarun/) 
(`apt-get install googler`)
+- [Void 
Linux](https://github.com/void-linux/void-packages/blob/master/srcpkgs/googler/template)
 (`xbps-install -S googler`)
 
 ##### Tips for packagers
 
@@ -103,7 +108,7 @@
 
 #### Release packages
 
-Packages for Arch Linux, CentOS, Debian, Fedora, openSUSE and Ubuntu are 
available with the [latest stable 
release](https://github.com/jarun/googler/releases/latest).
+Packages for Arch Linux, CentOS, Debian, Fedora, openSUSE Leap and Ubuntu are 
available with the [latest stable 
release](https://github.com/jarun/googler/releases/latest).
 
 #### From source
 
@@ -121,7 +126,7 @@
 
 #### Running standalone
 
-`googler` is a standalone executable. From the containing directory:
+`googler` is a standalone executable (and can run even on environments like 
Termux). From the containing directory:
 
     $ ./googler
 
@@ -131,7 +136,7 @@
 
 To install the latest stable version, run
 
-    $ sudo curl -o /usr/local/bin/googler 
https://raw.githubusercontent.com/jarun/googler/v3.5/googler && sudo chmod +x 
/usr/local/bin/googler
+    $ sudo curl -o /usr/local/bin/googler 
https://raw.githubusercontent.com/jarun/googler/v3.7.1/googler && sudo chmod +x 
/usr/local/bin/googler
 
 You could then let googler upgrade itself by running
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/googler-3.5/auto-completion/googler_at/googler_at 
new/googler-3.7.1/auto-completion/googler_at/googler_at
--- old/googler-3.5/auto-completion/googler_at/googler_at       2018-02-16 
03:07:19.000000000 +0100
+++ new/googler-3.7.1/auto-completion/googler_at/googler_at     2018-10-09 
22:24:00.000000000 +0200
@@ -61,6 +61,8 @@
   alias @di='googler -w dictionary.com'
 # DistroWatch
   alias @distrowatch='googler -w distrowatch.com'
+# Daily Natural Remedies
+  alias @dnr='googler -w dailynaturalremedies.com'
 # Debian Package Search
   alias @dpkg='googler -w packages.debian.org'
 
@@ -119,6 +121,8 @@
 
 # Hackaday
   alias @had='googler -w hackaday.com'
+# Healthline
+  alias @hl='googler -w healthline.com'
 # History
   alias @history='googler -w history.com'
 # Hacker News
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/googler-3.5/googler new/googler-3.7.1/googler
--- old/googler-3.5/googler     2018-02-16 03:07:19.000000000 +0100
+++ new/googler-3.7.1/googler   2018-10-09 22:24:00.000000000 +0200
@@ -68,7 +68,7 @@
 
 # Constants
 
-_VERSION_ = '3.5'
+_VERSION_ = '3.7.1'
 
 COLORMAP = {k: '\x1b[%sm' % v for k, v in {
     'a': '30', 'b': '31', 'c': '32', 'd': '33',
@@ -82,8 +82,7 @@
     'x': '0', 'X': '1', 'y': '7', 'Y': '7;1',
 }.items()}
 
-# Disguise as Firefox on Ubuntu
-USER_AGENT = ('Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:58.0) Gecko/20100101 
Firefox/58.0')
+USER_AGENT = ('googler/' + _VERSION_)
 ua = True  # User Agent is enabled by default
 
 text_browsers = ['elinks', 'links', 'lynx', 'w3m', 'www-browser']
@@ -2082,24 +2081,47 @@
                 elif cmd.startswith('c ') and cmd[2:].isdigit():
                     try:
                         # try copying the url to clipboard using native 
utilities
+                        copier_params = []
+                        copier_mode = 'stdin'
                         if sys.platform.startswith(('linux', 'freebsd', 
'openbsd')):
-                            if shutil.which('xsel') is None:
-                                raise FileNotFoundError
-                            copier_params = ['xsel', '-b', '-i']
+                            if shutil.which('xsel') is not None:
+                                copier_params = ['xsel', '-b', '-i']
+                            elif shutil.which('xclip') is not None:
+                                copier_params = ['xclip', '-selection', 
'clipboard']
+                            elif shutil.which('termux-clipboard-set') is not 
None:
+                                copier_params = ['termux-clipboard-set']
                         elif sys.platform == 'darwin':
                             copier_params = ['pbcopy']
                         elif sys.platform == 'win32':
                             copier_params = ['clip']
-                        else:
-                            copier_params = []
+
+                        # If native clipboard utilities are absent, try to use 
terminal
+                        # multiplexers, tmux/GNU screen, as fallback.
+                        if not copier_params:
+                            if os.getenv('TMUX_PANE'):  # check for tmux
+                                # Try to use tmux buffer as fallback. Use case 
suggested by #230.
+                                copier_params = ['tmux', 'set-buffer']
+                                copier_mode = 'cmdline_arg'
+                            elif os.getenv('STY'):  # check for GNU screen
+                                # Try to use GNU screen's exchange-file as 
fallback.
+                                copier_params = ['screen', '-X', 'readbuf']
+                                copier_mode = 'ext_file'
 
                         if not copier_params:
-                            printerr('operating system not identified')
+                            printerr('failed to locate suitable clipboard 
utility')
                         else:
-                            Popen(copier_params, stdin=PIPE, stdout=DEVNULL,
-                                  
stderr=DEVNULL).communicate(self._urltable[cmd[2:]].encode('utf-8'))
-                    except FileNotFoundError:
-                        printerr('xsel missing')
+                            content = self._urltable[cmd[2:]].encode('utf-8')
+                            if copier_mode == 'stdin':
+                                Popen(copier_params, stdin=PIPE,
+                                      stdout=DEVNULL, 
stderr=DEVNULL).communicate(content)
+                            elif copier_mode == 'cmdline_arg':
+                                Popen(copier_params + [content], stdin=DEVNULL,
+                                      stdout=DEVNULL, 
stderr=DEVNULL).communicate()
+                            else:
+                                with open('/tmp/screen-exchange', 'wb') as f:
+                                    f.write(content)
+                                Popen(copier_params, stdin=DEVNULL,
+                                      stdout=DEVNULL, 
stderr=DEVNULL).communicate()
                     except Exception:
                         raise NoKeywordsException
                 else:
@@ -2359,10 +2381,11 @@
     if '@' in proxyspec:
         pos = proxyspec.find('@')
         user_passwd = urllib.parse.unquote(proxyspec[:pos])
-        host_port = proxyspec[pos+1:]
+        # Remove trailing '/' if any
+        host_port = proxyspec[pos+1:].rstrip('/')
     else:
         user_passwd = None
-        host_port = proxyspec
+        host_port = proxyspec.rstrip('/')
 
     if ':' not in host_port:
         # Use port 1080 as default, following curl.
@@ -2380,6 +2403,7 @@
 # instance, they won't if the specified prefix ends in a punctuation
 # mark.)
 def completer_fetch_completions(prefix):
+    import html
     import json
     import re
     import urllib.request
@@ -2390,7 +2414,9 @@
                urllib.parse.quote(prefix, safe=''))
     # A timeout of 3 seconds seems to be overly generous already.
     resp = urllib.request.urlopen(api_url, timeout=3)
-    respobj = json.loads(resp.read().decode('utf-8'))
+    charset = resp.headers.get_content_charset()
+    logger.debug('Completions charset: %s', charset)
+    respobj = json.loads(resp.read().decode(charset))
 
     # The response object, once parsed as JSON, should look like
     #
@@ -2404,7 +2430,7 @@
     # Note the each result entry need not have two members; e.g., for
     # 'gi', there is an entry ['gi<b>f</b>', 0, [131]].
     HTML_TAG = re.compile(r'<[^>]+>')
-    return [HTML_TAG.sub('', entry[0]) for entry in respobj[1]]
+    return [html.unescape(HTML_TAG.sub('', entry[0])) for entry in respobj[1]]
 
 
 def completer_run(prefix):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/googler-3.5/googler.1 new/googler-3.7.1/googler.1
--- old/googler-3.5/googler.1   2018-02-16 03:07:19.000000000 +0100
+++ new/googler-3.7.1/googler.1 2018-10-09 22:24:00.000000000 +0200
@@ -1,4 +1,4 @@
-.TH "GOOGLER" "1" "16 Feb 2018" "Version 3.5" "User Commands"
+.TH "GOOGLER" "1" "10 Oct 2018" "Version 3.7.1" "User Commands"
 .SH NAME
 googler \- Google from the command-line
 .SH SYNOPSIS
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/googler-3.5/packagecore.yaml 
new/googler-3.7.1/packagecore.yaml
--- old/googler-3.5/packagecore.yaml    2018-02-16 03:07:19.000000000 +0100
+++ new/googler-3.7.1/packagecore.yaml  2018-10-09 22:24:00.000000000 +0200
@@ -12,6 +12,30 @@
       - make
     deps:
       - python
+  centos7.0:
+    builddeps:
+      - make
+    deps:
+      - python
+    commands:
+      pre:
+        - yum install epel-release
+  centos7.1:
+    builddeps:
+      - make
+    deps:
+      - python
+    commands:
+      pre:
+        - yum install epel-release
+  centos7.2:
+    builddeps:
+      - make
+    deps:
+      - python
+    commands:
+      pre:
+        - yum install epel-release
   centos7.3:
     builddeps:
       - make
@@ -20,11 +44,26 @@
     commands:
       pre:
         - yum install epel-release
+  centos7.4:
+    builddeps:
+      - make
+    deps:
+      - python
+  debian8:
+    builddeps:
+      - make
+    deps:
+      - python3
   debian9:
     builddeps:
       - make
     deps:
       - python3
+  fedora25:
+    builddeps:
+      - make
+    deps:
+      - python3
   fedora26:
     builddeps:
       - make
@@ -35,17 +74,37 @@
       - make
     deps:
       - python3
+  fedora28:
+    builddeps:
+      - make
+    deps:
+      - python3
+  opensuse42.1:
+    builddeps:
+      - make
+    deps:
+      - python3
+  opensuse42.2:
+    builddeps:
+      - make
+    deps:
+      - python3
   opensuse42.3:
     builddeps:
       - make
     deps:
       - python3
+  ubuntu14.04:
+    builddeps:
+      - make
+    deps:
+      - python3
   ubuntu16.04:
     builddeps:
       - make
     deps:
       - python3
-  ubuntu17.10:
+  ubuntu18.04:
     builddeps:
       - make
     deps:


Reply via email to