Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-gscholar for openSUSE:Factory
checked in at 2022-10-17 14:57:34
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-gscholar (Old)
and /work/SRC/openSUSE:Factory/.python-gscholar.new.2275 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-gscholar"
Mon Oct 17 14:57:34 2022 rev:4 rq:1009274 version:2.1.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-gscholar/python-gscholar.changes
2022-02-04 00:46:17.321124574 +0100
+++
/work/SRC/openSUSE:Factory/.python-gscholar.new.2275/python-gscholar.changes
2022-10-17 14:57:38.070085194 +0200
@@ -1,0 +2,11 @@
+Sun Oct 9 17:57:08 UTC 2022 - Arun Persaud <[email protected]>
+
+- specfile:
+ * require python >= 3.7
+
+- update to version 2.1.0:
+ * dropped python 3.6 support
+ * migrated from argparse to optparse
+ * added set-cookie in response
+
+-------------------------------------------------------------------
Old:
----
gscholar-2.0.0.tar.gz
New:
----
gscholar-2.1.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-gscholar.spec ++++++
--- /var/tmp/diff_new_pack.oje9G7/_old 2022-10-17 14:57:38.574086162 +0200
+++ /var/tmp/diff_new_pack.oje9G7/_new 2022-10-17 14:57:38.582086178 +0200
@@ -17,15 +17,15 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
-%define skip_python2 1
Name: python-gscholar
-Version: 2.0.0
+Version: 2.1.0
Release: 0
Summary: Python library to query Google Scholar
License: MIT
Group: Development/Languages/Python
URL: https://github.com/venthur/gscholar
Source0:
https://files.pythonhosted.org/packages/source/g/gscholar/gscholar-%{version}.tar.gz
+BuildRequires: %{python_module base >= 3.7}
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
@@ -41,7 +41,6 @@
%prep
%setup -q -n gscholar-%{version}
-sed -i -e '/^#!\//, 1d' gscholar/__main__.py
sed -i -e '/^#!\//, 1d' gscholar/gscholar.py
%build
++++++ gscholar-2.0.0.tar.gz -> gscholar-2.1.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/gscholar-2.0.0/CHANGELOG.md
new/gscholar-2.1.0/CHANGELOG.md
--- old/gscholar-2.0.0/CHANGELOG.md 2021-12-08 13:42:07.000000000 +0100
+++ new/gscholar-2.1.0/CHANGELOG.md 2022-10-04 21:23:10.000000000 +0200
@@ -1,5 +1,11 @@
# Changelog
+## [2.1.0] - 2022-10-04
+
+* dropped python 3.6 support
+* migrated from argparse to optparse
+* added set-cookie in response
+
## [2.0.0] - 2021-12-08
* removed Python2 support
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/gscholar-2.0.0/PKG-INFO new/gscholar-2.1.0/PKG-INFO
--- old/gscholar-2.0.0/PKG-INFO 2021-12-08 13:42:21.182349200 +0100
+++ new/gscholar-2.1.0/PKG-INFO 2022-10-04 21:23:52.046583200 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: gscholar
-Version: 2.0.0
+Version: 2.1.0
Summary: Python library to query Google Scholar.
Home-page: https://github.com/venthur/gscholar
Author: Bastian Venthur
@@ -8,103 +8,97 @@
License: MIT
Project-URL: Source, https://github.com/venthur/gscholar
Project-URL: Changelog,
https://github.com/venthur/gscholar/blob/master/CHANGELOG.md
-Description: # gscholar
-
- Query Google Scholar using Python.
-
-
- ## Requirements
-
- * Python
- * pdftotext (command line tool)
-
-
- ### Note on Python2 and Python3
-
- Gscholar is Python2 and Python3 compatible. No changes should be
required to run
- on either Python version.
-
-
- ## Installing
-
- ```bash
- $ pip install gscholar
- ```
-
- ##Using gscholar as a command line tool
-
- gscholar provides a command line tool, to use it, just call `gscholar`
like:
-
- ```bash
- $ gscholar "albert einstein"
- ```
-
- or
-
- ```bash
- $ python3 -m gscholar "albert einstein"
- ```
-
- ### Making a simple lookup:
-
- ```bash
- $ gscholar "some author or title"
- ```
-
- will return the first result from Google Scholar matching this query.
-
-
- ### Getting more results:
-
- ```bash
- $ gscholar --all "some author or title"
- ```
-
- Same as above but returns up to 10 bibtex items. (Use with caution
Google will
- assume you're a bot an ban you're IP temporarily)
-
-
- ### Querying using a pdf:
-
- ```bash
- $ gscholar /path/to/pdf
- ```
-
- Will read the pdf to generate a Google Scholar query. It uses this
query to show
- the first bibtex result as above.
-
-
- ### Renaming a pdf:
-
- ```bash
- $ gscholar --rename /path/to/pdf
- ```
-
- Will do the same as above but asks you if it should rename the file
according
- to the bibtex result. You have to answer with "y", default answer is
no.
-
-
- ### Getting help:
-
- ```bash
- $ gscholar --help
- ```
-
-
- ## Using gscholar as a python library
-
- Install the gscholar package with `pip install` as described above or
copy the
- package somewhere Python can find it.
-
- ```python
- import gscholar
-
- gscholar.query("some author or title")
- ```
-
- will return a list of bibtex items.
-
Keywords: google scholar cli
-Platform: UNKNOWN
-Requires-Python: >=3.6
+Requires-Python: >=3.7
Description-Content-Type: text/markdown
+License-File: LICENSE
+
+# gscholar
+
+Query Google Scholar using Python.
+
+
+## Requirements
+
+ * Python
+ * pdftotext (command line tool)
+
+
+## Installing
+
+```bash
+$ pip install gscholar
+```
+
+##Using gscholar as a command line tool
+
+gscholar provides a command line tool, to use it, just call `gscholar` like:
+
+```bash
+$ gscholar "albert einstein"
+```
+
+or
+
+```bash
+$ python3 -m gscholar "albert einstein"
+```
+
+### Making a simple lookup:
+
+```bash
+$ gscholar "some author or title"
+```
+
+will return the first result from Google Scholar matching this query.
+
+
+### Getting more results:
+
+```bash
+$ gscholar --all "some author or title"
+```
+
+Same as above but returns up to 10 bibtex items. (Use with caution Google will
+assume you're a bot an ban you're IP temporarily)
+
+
+### Querying using a pdf:
+
+```bash
+$ gscholar /path/to/pdf
+```
+
+Will read the pdf to generate a Google Scholar query. It uses this query to
show
+the first bibtex result as above.
+
+
+### Renaming a pdf:
+
+```bash
+$ gscholar --rename /path/to/pdf
+```
+
+Will do the same as above but asks you if it should rename the file according
+to the bibtex result. You have to answer with "y", default answer is no.
+
+
+### Getting help:
+
+```bash
+$ gscholar --help
+```
+
+
+## Using gscholar as a python library
+
+Install the gscholar package with `pip install` as described above or copy the
+package somewhere Python can find it.
+
+```python
+import gscholar
+
+gscholar.query("some author or title")
+```
+
+will return a list of bibtex items.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/gscholar-2.0.0/README.md new/gscholar-2.1.0/README.md
--- old/gscholar-2.0.0/README.md 2021-12-08 09:23:43.000000000 +0100
+++ new/gscholar-2.1.0/README.md 2022-10-04 16:59:17.000000000 +0200
@@ -9,12 +9,6 @@
* pdftotext (command line tool)
-### Note on Python2 and Python3
-
-Gscholar is Python2 and Python3 compatible. No changes should be required to
run
-on either Python version.
-
-
## Installing
```bash
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/gscholar-2.0.0/gscholar/__main__.py
new/gscholar-2.1.0/gscholar/__main__.py
--- old/gscholar-2.0.0/gscholar/__main__.py 2021-12-08 13:42:07.000000000
+0100
+++ new/gscholar-2.1.0/gscholar/__main__.py 2022-10-04 21:21:12.000000000
+0200
@@ -1,4 +1,4 @@
-import optparse
+import argparse
import logging
import sys
import os
@@ -15,67 +15,70 @@
def main():
usage = 'Usage: %prog [options] {pdf | "search terms"}'
- parser = optparse.OptionParser(usage)
- parser.add_option("-a", "--all", action="store_true", dest="all",
- default=False, help="show all bibtex results")
- parser.add_option("-d", "--debug", action="store_true", dest="debug",
- default=False, help="show debugging output")
- parser.add_option("-r", "--rename", action="store_true", dest="rename",
- default=False, help="rename file")
- parser.add_option("-f", "--outputformat", dest='output',
- default="bibtex",
- help=("Output format. Available formats are: bibtex, "
- "endnote, refman, wenxianwang "
- "[default: %default]"))
- parser.add_option("-s", "--startpage", dest='startpage',
- help="Page number to start parsing PDF file at.")
- parser.add_option('-V', '--version', action='store_true',
- help='Print version and quit.')
-
- (options, args) = parser.parse_args()
- if options.debug is True:
+ parser = argparse.ArgumentParser(usage)
+ parser.add_argument(
+ "-a", "--all", action="store_true",
+ help="show all bibtex results"
+ )
+ parser.add_argument(
+ "-d", "--debug", action="store_true",
+ help="show debugging output"
+ )
+ parser.add_argument(
+ "-r", "--rename", action="store_true",
+ help="rename file"
+ )
+ parser.add_argument(
+ "-f", "--outputformat", dest='output', default="bibtex",
+ help=(
+ "Output format. Available formats are: bibtex, endnote, refman,"
+ "wenxianwang [default: %(default)s]"))
+ parser.add_argument(
+ "-s", "--startpage",
+ help="Page number to start parsing PDF file at."
+ )
+ parser.add_argument(
+ '--version', action='version', version=gs.__VERSION__)
+ parser.add_argument(
+ 'keyword', metavar='{pdf | "search terms"}',
+ help='pdf | "search terms"')
+ args = parser.parse_args()
+ if args.debug is True:
logger.setLevel(logging.DEBUG)
- if options.version:
- print(gs.__VERSION__)
- return
- if options.output == 'bibtex':
+ if args.output == 'bibtex':
outformat = gs.FORMAT_BIBTEX
- elif options.output == 'endnote':
+ elif args.output == 'endnote':
outformat = gs.FORMAT_ENDNOTE
- elif options.output == 'refman':
+ elif args.output == 'refman':
outformat = gs.FORMAT_REFMAN
- elif options.output == 'wenxianwang':
+ elif args.output == 'wenxianwang':
outformat = gs.FORMAT_WENXIANWANG
- if len(args) != 1:
- parser.error("No argument given, nothing to do.")
- sys.exit(1)
- args = args[0]
pdfmode = False
- if os.path.exists(args):
+ if os.path.exists(args.keyword):
logger.debug(f"File exist, assuming you want me to lookup the pdf: "
f"{args}.")
pdfmode = True
- biblist = gs.pdflookup(args, all, outformat, options.startpage)
+ biblist = gs.pdflookup(args.keyword, all, outformat, args.startpage)
else:
logger.debug(f"Assuming you want me to lookup the query: {args}")
- biblist = gs.query(args, outformat, options.all)
+ biblist = gs.query(args.keyword, outformat, args.all)
if len(biblist) < 1:
print("No results found, try again with a different query!")
sys.exit(1)
- if options.all is True:
+ if args.all is True:
logger.debug("All results:")
for i in biblist:
print(i)
else:
logger.debug("First result:")
print(biblist[0])
- if options.rename is True:
+ if args.rename is True:
if not pdfmode:
print("You asked me to rename the pdf but didn't tell me which "
"file to rename, aborting.")
sys.exit(1)
else:
- gs.rename_file(args, biblist[0])
+ gs.rename_file(args.keyword, biblist[0])
if __name__ == '__main__':
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/gscholar-2.0.0/gscholar/gscholar.py
new/gscholar-2.1.0/gscholar/gscholar.py
--- old/gscholar-2.0.0/gscholar/gscholar.py 2021-12-08 13:42:07.000000000
+0100
+++ new/gscholar-2.1.0/gscholar/gscholar.py 2022-10-04 21:21:12.000000000
+0200
@@ -55,6 +55,9 @@
header['Cookie'] = "GSP=CF=%d" % outformat
request = Request(url, headers=header)
response = urlopen(request)
+ # add set_cookie in header in request header!
+ set_cookie = response.headers['Set-Cookie']
+ header['Cookie'] += set_cookie
html = response.read()
html = html.decode('utf8')
# grab the links
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/gscholar-2.0.0/gscholar/version.py
new/gscholar-2.1.0/gscholar/version.py
--- old/gscholar-2.0.0/gscholar/version.py 2021-12-08 13:42:07.000000000
+0100
+++ new/gscholar-2.1.0/gscholar/version.py 2022-10-04 21:22:45.000000000
+0200
@@ -1 +1 @@
-__VERSION__ = '2.0.0'
+__VERSION__ = '2.1.0'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/gscholar-2.0.0/gscholar.egg-info/PKG-INFO
new/gscholar-2.1.0/gscholar.egg-info/PKG-INFO
--- old/gscholar-2.0.0/gscholar.egg-info/PKG-INFO 2021-12-08
13:42:21.000000000 +0100
+++ new/gscholar-2.1.0/gscholar.egg-info/PKG-INFO 2022-10-04
21:23:51.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: gscholar
-Version: 2.0.0
+Version: 2.1.0
Summary: Python library to query Google Scholar.
Home-page: https://github.com/venthur/gscholar
Author: Bastian Venthur
@@ -8,103 +8,97 @@
License: MIT
Project-URL: Source, https://github.com/venthur/gscholar
Project-URL: Changelog,
https://github.com/venthur/gscholar/blob/master/CHANGELOG.md
-Description: # gscholar
-
- Query Google Scholar using Python.
-
-
- ## Requirements
-
- * Python
- * pdftotext (command line tool)
-
-
- ### Note on Python2 and Python3
-
- Gscholar is Python2 and Python3 compatible. No changes should be
required to run
- on either Python version.
-
-
- ## Installing
-
- ```bash
- $ pip install gscholar
- ```
-
- ##Using gscholar as a command line tool
-
- gscholar provides a command line tool, to use it, just call `gscholar`
like:
-
- ```bash
- $ gscholar "albert einstein"
- ```
-
- or
-
- ```bash
- $ python3 -m gscholar "albert einstein"
- ```
-
- ### Making a simple lookup:
-
- ```bash
- $ gscholar "some author or title"
- ```
-
- will return the first result from Google Scholar matching this query.
-
-
- ### Getting more results:
-
- ```bash
- $ gscholar --all "some author or title"
- ```
-
- Same as above but returns up to 10 bibtex items. (Use with caution
Google will
- assume you're a bot an ban you're IP temporarily)
-
-
- ### Querying using a pdf:
-
- ```bash
- $ gscholar /path/to/pdf
- ```
-
- Will read the pdf to generate a Google Scholar query. It uses this
query to show
- the first bibtex result as above.
-
-
- ### Renaming a pdf:
-
- ```bash
- $ gscholar --rename /path/to/pdf
- ```
-
- Will do the same as above but asks you if it should rename the file
according
- to the bibtex result. You have to answer with "y", default answer is
no.
-
-
- ### Getting help:
-
- ```bash
- $ gscholar --help
- ```
-
-
- ## Using gscholar as a python library
-
- Install the gscholar package with `pip install` as described above or
copy the
- package somewhere Python can find it.
-
- ```python
- import gscholar
-
- gscholar.query("some author or title")
- ```
-
- will return a list of bibtex items.
-
Keywords: google scholar cli
-Platform: UNKNOWN
-Requires-Python: >=3.6
+Requires-Python: >=3.7
Description-Content-Type: text/markdown
+License-File: LICENSE
+
+# gscholar
+
+Query Google Scholar using Python.
+
+
+## Requirements
+
+ * Python
+ * pdftotext (command line tool)
+
+
+## Installing
+
+```bash
+$ pip install gscholar
+```
+
+##Using gscholar as a command line tool
+
+gscholar provides a command line tool, to use it, just call `gscholar` like:
+
+```bash
+$ gscholar "albert einstein"
+```
+
+or
+
+```bash
+$ python3 -m gscholar "albert einstein"
+```
+
+### Making a simple lookup:
+
+```bash
+$ gscholar "some author or title"
+```
+
+will return the first result from Google Scholar matching this query.
+
+
+### Getting more results:
+
+```bash
+$ gscholar --all "some author or title"
+```
+
+Same as above but returns up to 10 bibtex items. (Use with caution Google will
+assume you're a bot an ban you're IP temporarily)
+
+
+### Querying using a pdf:
+
+```bash
+$ gscholar /path/to/pdf
+```
+
+Will read the pdf to generate a Google Scholar query. It uses this query to
show
+the first bibtex result as above.
+
+
+### Renaming a pdf:
+
+```bash
+$ gscholar --rename /path/to/pdf
+```
+
+Will do the same as above but asks you if it should rename the file according
+to the bibtex result. You have to answer with "y", default answer is no.
+
+
+### Getting help:
+
+```bash
+$ gscholar --help
+```
+
+
+## Using gscholar as a python library
+
+Install the gscholar package with `pip install` as described above or copy the
+package somewhere Python can find it.
+
+```python
+import gscholar
+
+gscholar.query("some author or title")
+```
+
+will return a list of bibtex items.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/gscholar-2.0.0/gscholar.egg-info/entry_points.txt
new/gscholar-2.1.0/gscholar.egg-info/entry_points.txt
--- old/gscholar-2.0.0/gscholar.egg-info/entry_points.txt 2021-12-08
13:42:21.000000000 +0100
+++ new/gscholar-2.1.0/gscholar.egg-info/entry_points.txt 2022-10-04
21:23:51.000000000 +0200
@@ -1,3 +1,2 @@
[console_scripts]
gscholar = gscholar.__main__:main
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/gscholar-2.0.0/setup.py new/gscholar-2.1.0/setup.py
--- old/gscholar-2.0.0/setup.py 2021-12-08 13:42:07.000000000 +0100
+++ new/gscholar-2.1.0/setup.py 2022-10-04 21:17:46.000000000 +0200
@@ -24,7 +24,7 @@
'Changelog':
'https://github.com/venthur/gscholar/blob/master/CHANGELOG.md',
},
- python_requires='>=3.6',
+ python_requires='>=3.7',
packages=['gscholar'],
entry_points={
'console_scripts': [