Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-pandocfilters for 
openSUSE:Factory checked in at 2021-03-05 13:48:13
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-pandocfilters (Old)
 and      /work/SRC/openSUSE:Factory/.python-pandocfilters.new.2378 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-pandocfilters"

Fri Mar  5 13:48:13 2021 rev:5 rq:876830 version:1.4.3

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/python-pandocfilters/python-pandocfilters.changes    
    2018-12-24 11:40:44.445486788 +0100
+++ 
/work/SRC/openSUSE:Factory/.python-pandocfilters.new.2378/python-pandocfilters.changes
      2021-03-05 13:50:41.159917635 +0100
@@ -1,0 +2,9 @@
+Thu Mar  4 21:06:04 UTC 2021 - Dirk M??ller <[email protected]>
+
+- update to 1.4.3:
+  * LilyPond: take in account width and staffsize from metadata
+  * Autodetect gregorio executables 
+  * Fix metavars example
+  * Documentation fixes 
+
+-------------------------------------------------------------------

Old:
----
  pandocfilters-1.4.2.tar.gz

New:
----
  pandocfilters-1.4.3.tar.gz

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

Other differences:
------------------
++++++ python-pandocfilters.spec ++++++
--- /var/tmp/diff_new_pack.g97KNl/_old  2021-03-05 13:50:41.659918140 +0100
+++ /var/tmp/diff_new_pack.g97KNl/_new  2021-03-05 13:50:41.663918143 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package python-pandocfilters
 #
-# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2021 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -18,12 +18,12 @@
 
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 Name:           python-pandocfilters
-Version:        1.4.2
+Version:        1.4.3
 Release:        0
 Summary:        Python module for writing pandoc filters
 License:        BSD-3-Clause
 Group:          Development/Languages/Python
-Url:            http://github.com/jgm/pandocfilters
+URL:            http://github.com/jgm/pandocfilters
 Source:         
https://pypi.io/packages/source/p/pandocfilters/pandocfilters-%{version}.tar.gz
 BuildRequires:  %{python_module setuptools}
 BuildRequires:  python-rpm-macros

++++++ pandocfilters-1.4.2.tar.gz -> pandocfilters-1.4.3.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pandocfilters-1.4.2/PKG-INFO 
new/pandocfilters-1.4.3/PKG-INFO
--- old/pandocfilters-1.4.2/PKG-INFO    2017-08-08 05:47:36.000000000 +0200
+++ new/pandocfilters-1.4.3/PKG-INFO    2020-10-23 19:05:56.986996400 +0200
@@ -1,11 +1,11 @@
 Metadata-Version: 1.1
 Name: pandocfilters
-Version: 1.4.2
+Version: 1.4.3
 Summary: Utilities for writing pandoc filters in python
 Home-page: http://github.com/jgm/pandocfilters
 Author: John MacFarlane
 Author-email: [email protected]
-License: UNKNOWN
+License: BSD-3-Clause
 Description: pandocfilters
         =============
         
@@ -29,6 +29,11 @@
         
         __ http://johnmacfarlane.net/pandoc/scripting.html
         
+        For an alternative library for writing pandoc filters, with
+        a more "Pythonic" design, see `panflute`__.
+        
+        __ https://github.com/sergiocorreia/panflute
+        
         Compatibility
         ----------------
         Pandoc 1.16 introduced link and image `attributes` to the existing
@@ -74,7 +79,7 @@
            -  ``None``: this means that the object should remain unchanged
            -  a pandoc object: this will replace the original object
            -  a list of pandoc objects: these will replace the original object;
-              the list is merged with the neighbors of the orignal objects
+              the list is merged with the neighbors of the original objects
               (spliced into the list the original object belongs to); returning
               an empty list deletes the object
         
@@ -117,7 +122,7 @@
         
            The argument ``format`` is a string describing the output format.
         
-           Returns a the new JSON-formatted pandoc document.
+           Returns a new JSON-formatted pandoc document.
         
         -  ``stringify(x)``
         
@@ -228,3 +233,12 @@
 Classifier: Operating System :: OS Independent
 Classifier: Programming Language :: Python
 Classifier: Topic :: Text Processing :: Filters
+Classifier: Programming Language :: Python :: 2
+Classifier: Programming Language :: Python :: 2.7
+Classifier: Programming Language :: Python :: 3
+Classifier: Programming Language :: Python :: 3.4
+Classifier: Programming Language :: Python :: 3.5
+Classifier: Programming Language :: Python :: 3.6
+Classifier: Programming Language :: Python :: 3.7
+Classifier: Programming Language :: Python :: 3.8
+Classifier: Programming Language :: Python :: 3.9
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pandocfilters-1.4.2/README 
new/pandocfilters-1.4.3/README
--- old/pandocfilters-1.4.2/README      2017-08-08 05:39:27.000000000 +0200
+++ new/pandocfilters-1.4.3/README      2020-10-23 18:50:40.857030400 +0200
@@ -21,6 +21,11 @@
 
 __ http://johnmacfarlane.net/pandoc/scripting.html
 
+For an alternative library for writing pandoc filters, with
+a more "Pythonic" design, see `panflute`__.
+
+__ https://github.com/sergiocorreia/panflute
+
 Compatibility
 ----------------
 Pandoc 1.16 introduced link and image `attributes` to the existing
@@ -66,7 +71,7 @@
    -  ``None``: this means that the object should remain unchanged
    -  a pandoc object: this will replace the original object
    -  a list of pandoc objects: these will replace the original object;
-      the list is merged with the neighbors of the orignal objects
+      the list is merged with the neighbors of the original objects
       (spliced into the list the original object belongs to); returning
       an empty list deletes the object
 
@@ -109,7 +114,7 @@
 
    The argument ``format`` is a string describing the output format.
 
-   Returns a the new JSON-formatted pandoc document.
+   Returns a new JSON-formatted pandoc document.
 
 -  ``stringify(x)``
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pandocfilters-1.4.2/README.rst 
new/pandocfilters-1.4.3/README.rst
--- old/pandocfilters-1.4.2/README.rst  2017-08-08 05:39:27.000000000 +0200
+++ new/pandocfilters-1.4.3/README.rst  2020-10-23 18:50:40.857030400 +0200
@@ -21,6 +21,11 @@
 
 __ http://johnmacfarlane.net/pandoc/scripting.html
 
+For an alternative library for writing pandoc filters, with
+a more "Pythonic" design, see `panflute`__.
+
+__ https://github.com/sergiocorreia/panflute
+
 Compatibility
 ----------------
 Pandoc 1.16 introduced link and image `attributes` to the existing
@@ -66,7 +71,7 @@
    -  ``None``: this means that the object should remain unchanged
    -  a pandoc object: this will replace the original object
    -  a list of pandoc objects: these will replace the original object;
-      the list is merged with the neighbors of the orignal objects
+      the list is merged with the neighbors of the original objects
       (spliced into the list the original object belongs to); returning
       an empty list deletes the object
 
@@ -109,7 +114,7 @@
 
    The argument ``format`` is a string describing the output format.
 
-   Returns a the new JSON-formatted pandoc document.
+   Returns a new JSON-formatted pandoc document.
 
 -  ``stringify(x)``
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pandocfilters-1.4.2/examples/gabc.py 
new/pandocfilters-1.4.3/examples/gabc.py
--- old/pandocfilters-1.4.2/examples/gabc.py    2016-11-05 21:42:13.000000000 
+0100
+++ new/pandocfilters-1.4.3/examples/gabc.py    2020-10-23 18:50:40.857302000 
+0200
@@ -8,12 +8,14 @@
 
 import os
 from sys import getfilesystemencoding, stderr
-from subprocess import Popen, call, PIPE, DEVNULL
+from subprocess import Popen, call, PIPE
+from itertools import chain
+from glob import iglob
 from hashlib import sha1
 from pandocfilters import toJSONFilter, RawBlock, RawInline, Para, Image
 
 
-STDERR = DEVNULL
+STDERR = stderr
 IMAGEDIR = "tmp_gabc"
 LATEX_DOC = """\\documentclass{article}
 \\usepackage{libertine}
@@ -86,8 +88,13 @@
         doc.write(LATEX_DOC % (snippet))
     environment = os.environ
     environment['shell_escape_commands'] = \
-        "bibtex,bibtex8,kpsewhich,makeindex,mpost,repstopdf,\
-        gregorio,gregorio-4_2_0"
+        "bibtex,bibtex8,kpsewhich,makeindex,mpost,repstopdf," + \
+        ','.join(
+            os.path.basename(n) for n in chain.from_iterable(
+                iglob(os.path.join(chemin, 'gregorio*'))
+                for chemin in os.environ["PATH"].split(os.pathsep)
+            )
+        )
     proc = Popen(
         ["lualatex", '-output-directory=' + IMAGEDIR, texdocument],
         stdin=PIPE,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/pandocfilters-1.4.2/examples/gitlab_markdown-sample.md 
new/pandocfilters-1.4.3/examples/gitlab_markdown-sample.md
--- old/pandocfilters-1.4.2/examples/gitlab_markdown-sample.md  1970-01-01 
01:00:00.000000000 +0100
+++ new/pandocfilters-1.4.3/examples/gitlab_markdown-sample.md  2020-10-23 
18:50:40.857530000 +0200
@@ -0,0 +1,23 @@
+Use this
+
+```math
+a^2 + b^2 = c^2
+```
+
+to get
+
+$$
+a^2 + b^2 = c^2
+$$
+
+also you go from $`a^2 + b^2 = c^2`$ to $a^2 + b^2 = c^2$
+
+`inline code`
+
+```
+fenced non-math code
+    block
+```
+
+    non-math code block
+    by indentation
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pandocfilters-1.4.2/examples/gitlab_markdown.py 
new/pandocfilters-1.4.3/examples/gitlab_markdown.py
--- old/pandocfilters-1.4.2/examples/gitlab_markdown.py 1970-01-01 
01:00:00.000000000 +0100
+++ new/pandocfilters-1.4.3/examples/gitlab_markdown.py 2020-10-23 
18:50:40.857759700 +0200
@@ -0,0 +1,25 @@
+#!/usr/bin/env python3
+
+from pandocfilters import toJSONFilter, Math, Para
+"""
+Pandoc filter to convert gitlab flavored markdown to pandoc flavored markdown
+"""
+
+
+def gitlab_markdown(key, value, format, meta):
+    if key == "CodeBlock":
+        [[identification, classes, keyvals], code] = value
+        if len(classes) > 0 and classes[0] == "math":
+            fmt = {'t': 'DisplayMath',
+                   'c': []}
+            return Para([Math(fmt, code)])
+
+    elif key == "Math":
+        [fmt, code] = value
+        if isinstance(fmt, dict) and fmt['t'] == "InlineMath":
+            # if fmt['t'] == "InlineMath":
+            return Math(fmt, code.strip('`'))
+
+
+if __name__ == "__main__":
+    toJSONFilter(gitlab_markdown)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pandocfilters-1.4.2/examples/lilypond.py 
new/pandocfilters-1.4.3/examples/lilypond.py
--- old/pandocfilters-1.4.2/examples/lilypond.py        2016-08-23 
22:49:31.000000000 +0200
+++ new/pandocfilters-1.4.3/examples/lilypond.py        2020-10-23 
18:50:40.858005300 +0200
@@ -11,7 +11,8 @@
 from sys import getfilesystemencoding, stderr
 from subprocess import Popen, call, PIPE
 from hashlib import sha1
-from pandocfilters import toJSONFilter, Para, Image, RawInline, RawBlock
+from pandocfilters import toJSONFilter, stringify,\
+    Para, Image, RawInline, RawBlock
 
 IMAGEDIR = "tmp_ly"
 LATEX_DOC = """\\documentclass{article}
@@ -38,7 +39,7 @@
     return RawBlock('latex', code)
 
 
-def ly2png(lily, outfile, staffsize):
+def ly2png(lily, outfile, kvs):
     p = Popen([
         "lilypond",
         "-dno-point-and-click",
@@ -47,15 +48,18 @@
         "-ddelete-intermediate-files",
         "-o", outfile,
         "-"
-    ], stdin=PIPE, stdout=-3)
+    ], stdin=PIPE, stdout=stderr)
     p.stdin.write(("\\paper{\n"
         "indent=0\\mm\n"
         "oddFooterMarkup=##f\n"
         "oddHeaderMarkup=##f\n"
         "bookTitleMarkup = ##f\n"
         "scoreTitleMarkup = ##f\n"
+        "line-width = %s\n"
         "}\n"
-        "#(set-global-staff-size %s)\n" % staffsize +
+        "#(set-global-staff-size %s)\n" % (
+            kvs['width'][:-2] + '\\' + kvs['width'][-2:],
+            kvs['staffsize']) +
         lily).encode("utf-8"))
     p.communicate()
     p.stdin.close()
@@ -65,12 +69,12 @@
         "-r144",
         "-sOutputFile=" + outfile + '.png',
         outfile + '.pdf',
-    ], stdout=-3)
+    ], stdout=stderr)
 
 
-def png(contents, staffsize):
+def png(contents, kvs):
     """Creates a png if needed."""
-    outfile = os.path.join(IMAGEDIR, sha(contents + str(staffsize)))
+    outfile = os.path.join(IMAGEDIR, sha(contents + str(kvs['staffsize'])))
     src = outfile + '.png'
     if not os.path.isfile(src):
         try:
@@ -78,24 +82,43 @@
             stderr.write('Created directory ' + IMAGEDIR + '\n')
         except OSError:
             pass
-        ly2png(contents, outfile, staffsize)
+        ly2png(contents, outfile, kvs)
         stderr.write('Created image ' + src + '\n')
     return src
 
 
+def calc_params(kvs, meta):
+    if 'staffsize' not in kvs:
+        try:
+            kvs['staffsize'] = int(
+                meta['music']['c']['lilypond']['c']['staffsize']['c']
+            )
+        except (KeyError, TypeError):
+            kvs['staffsize'] = 20
+    if 'width' not in kvs:
+        try:
+            kvs['width'] = \
+                meta['music']['c']['lilypond']['c']['width']['c'][0]['c']
+        except (KeyError, TypeError):
+            kvs['width'] = '210mm'
+    return kvs
+
+
 def lily(key, value, fmt, meta):
     if key == 'Code':
         [[ident, classes, kvs], contents] = value  # pylint:disable=I0011,W0612
         kvs = {key: value for key, value in kvs}
         if "ly" in classes:
-            staffsize = kvs['staffsize'] if 'staffsize' in kvs else 20
+            kvs = calc_params(kvs, meta)
             if fmt == "latex":
                 if ident == "":
                     label = ""
                 else:
                     label = '\\label{' + ident + '}'
                 return latex(
-                    '\\includely[staffsize=%s]{%s}' % (staffsize, contents) +
+                    '\\includely[staffsize=%s]{%s}' % (
+                        kvs['staffsize'], contents
+                    ) +
                     label
                 )
             else:
@@ -105,24 +128,33 @@
                 with open(infile, 'r') as doc:
                     code = doc.read()
                 return [
-                    Image(['', [], []], [], [png(code, staffsize), ""])
+                    Image(['', [], []],
+                        [],
+                        [png(code, kvs), ""]
+                    )
                 ]
     if key == 'CodeBlock':
         [[ident, classes, kvs], code] = value
         kvs = {key: value for key, value in kvs}
         if "ly" in classes:
-            staffsize = kvs['staffsize'] if 'staffsize' in kvs else 20
+            kvs = calc_params(kvs, meta)
             if fmt == "latex":
                 if ident == "":
                     label = ""
                 else:
                     label = '\\label{' + ident + '}'
                 return latexblock(
-                    '\\lily[staffsize=%s]{%s}' % (staffsize, code) +
+                    '\\lily[staffsize=%s]{%s}' % (kvs['staffsize'], code) +
                     label
                 )
             else:
-                return Para([Image(['', [], []], [], [png(code, staffsize), 
""])])
+                return Para([
+                    Image(
+                        ['', [], []],
+                        [],
+                        [png(code, kvs), ""]
+                    )
+                ])
 
 if __name__ == "__main__":
     toJSONFilter(lily)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pandocfilters-1.4.2/examples/metavars.py 
new/pandocfilters-1.4.3/examples/metavars.py
--- old/pandocfilters-1.4.2/examples/metavars.py        2016-08-23 
22:49:31.000000000 +0200
+++ new/pandocfilters-1.4.3/examples/metavars.py        2020-10-23 
18:50:40.858235000 +0200
@@ -22,7 +22,7 @@
                 return Span(attributes({'class': 'interpolated',
                                         'field': field}),
                             result['c'])
-            elif 'MetaString' in result[t]:
+            elif 'MetaString' in result['t']:
                 return Str(result['c'])
 
 if __name__ == "__main__":
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pandocfilters-1.4.2/examples/tikz-sample.md 
new/pandocfilters-1.4.3/examples/tikz-sample.md
--- old/pandocfilters-1.4.2/examples/tikz-sample.md     2016-08-23 
22:49:31.000000000 +0200
+++ new/pandocfilters-1.4.3/examples/tikz-sample.md     2020-10-23 
18:50:40.858461400 +0200
@@ -20,6 +20,7 @@
 
 to get 
 
+```latex
 \begin{tikzpicture}
 
 \def \n {5}
@@ -33,5 +34,6 @@
     arc ({360/\n * (\s - 1)+\margin}:{360/\n * (\s)-\margin}:\radius);
 }
 \end{tikzpicture}
+```
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pandocfilters-1.4.2/pandocfilters.py 
new/pandocfilters-1.4.3/pandocfilters.py
--- old/pandocfilters-1.4.2/pandocfilters.py    2016-12-24 15:43:04.000000000 
+0100
+++ new/pandocfilters-1.4.3/pandocfilters.py    2020-10-23 18:50:40.858725300 
+0200
@@ -120,9 +120,7 @@
                 array.append(walk(item, action, format, meta))
         return array
     elif isinstance(x, dict):
-        for k in x:
-            x[k] = walk(x[k], action, format, meta)
-        return x
+        return {k: walk(v, action, format, meta) for k, v in x.items()}
     else:
         return x
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pandocfilters-1.4.2/setup.py 
new/pandocfilters-1.4.3/setup.py
--- old/pandocfilters-1.4.2/setup.py    2017-08-08 05:42:56.000000000 +0200
+++ new/pandocfilters-1.4.3/setup.py    2020-10-23 19:05:46.240143800 +0200
@@ -6,14 +6,16 @@
     return open(os.path.join(os.path.dirname(__file__), fname)).read()
 
 setup(name='pandocfilters',
-      version='1.4.2',
+      version='1.4.3',
       description='Utilities for writing pandoc filters in python',
       long_description=read('README.rst'),
       author='John MacFarlane',
       author_email='[email protected]',
       url='http://github.com/jgm/pandocfilters',
       py_modules=['pandocfilters'],
+      license="BSD-3-Clause",
       keywords=['pandoc'],
+      python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*',
       classifiers=[
           'Development Status :: 3 - Alpha',
           'Environment :: Console',
@@ -22,6 +24,15 @@
           'License :: OSI Approved :: BSD License',
           'Operating System :: OS Independent',
           'Programming Language :: Python',
-          'Topic :: Text Processing :: Filters'
+          'Topic :: Text Processing :: Filters',
+          'Programming Language :: Python :: 2',
+          'Programming Language :: Python :: 2.7',
+          'Programming Language :: Python :: 3',
+          'Programming Language :: Python :: 3.4',
+          'Programming Language :: Python :: 3.5',
+          'Programming Language :: Python :: 3.6',
+          'Programming Language :: Python :: 3.7',
+          'Programming Language :: Python :: 3.8',
+          'Programming Language :: Python :: 3.9',
       ],
       )

Reply via email to