Hello community, here is the log from the commit of package unoconv for openSUSE:Factory checked in at 2019-01-10 15:23:48 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/unoconv (Old) and /work/SRC/openSUSE:Factory/.unoconv.new.28833 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "unoconv" Thu Jan 10 15:23:48 2019 rev:13 rq:664307 version:0.8.2 Changes: -------- --- /work/SRC/openSUSE:Factory/unoconv/unoconv.changes 2016-01-05 09:41:30.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.unoconv.new.28833/unoconv.changes 2019-01-10 15:23:49.862300052 +0100 @@ -1,0 +2,21 @@ +Thu Jan 10 09:07:10 UTC 2019 - mar...@gmx.de + +- Update to version 0.8.2 + Changes since 0.7: + * Add option -M/--meta to add or update document metadata during + conversion. + * Add option -I/--input-filter-name to specify input format + * Dropped support for OpenOffice 3.3 and 3.4 + * Fix for Python 3 to read binary data from stdin + * Fix for password protected files + * Make -F switch working for user-defined fields +- Drop patches (not longer needed) + * 0001-libreoffice-or-OO.o-has-never-had-wps-export.patch + * 0001-make-LaTeX-export-usable-with-writer2latex-ext.patch + * 0001-python3-added-compatibility.patch + * 0001-Updated-ChangeLog.patch + * 0001-update-FSF-address.patch + * 0002-remove-export-formats-dropped-by-LibreOffice.patch +- Use tarball from github + +------------------------------------------------------------------- Old: ---- 0001-Updated-ChangeLog.patch 0001-libreoffice-or-OO.o-has-never-had-wps-export.patch 0001-make-LaTeX-export-usable-with-writer2latex-ext.patch 0001-python3-added-compatibility.patch 0001-update-FSF-address.patch 0002-remove-export-formats-dropped-by-LibreOffice.patch unoconv-0.7.tar.gz New: ---- unoconv-0.8.2.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ unoconv.spec ++++++ --- /var/tmp/diff_new_pack.kPoWlg/_old 2019-01-10 15:23:50.214299688 +0100 +++ /var/tmp/diff_new_pack.kPoWlg/_new 2019-01-10 15:23:50.214299688 +0100 @@ -1,7 +1,7 @@ # # spec file for package unoconv # -# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,24 +17,15 @@ Name: unoconv -Version: 0.7 +Version: 0.8.2 Release: 0 Summary: Tool to convert between any document format supported by LibreOffice -License: GPL-2.0 +License: GPL-2.0-only Group: Productivity/File utilities -Url: http://dag.wieers.com/home-made/unoconv/ -Source: http://dag.wieers.com/home-made/unoconv/unoconv-%{version}.tar.gz -Patch0: 0001-python3-added-compatibility.patch -Patch1: 0001-update-FSF-address.patch -Patch2: 0001-make-LaTeX-export-usable-with-writer2latex-ext.patch -Patch3: 0001-libreoffice-or-OO.o-has-never-had-wps-export.patch -Patch4: 0002-remove-export-formats-dropped-by-LibreOffice.patch -Patch5: 0001-Updated-ChangeLog.patch -%if 0%{?suse_version} >= 1315 -Requires: python >= 3.0 -%endif +URL: http://dag.wieers.com/home-made/unoconv/ +Source: https://github.com/dagwieers/%{name}/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz Requires: libreoffice-pyuno -BuildRoot: %{_tmppath}/%{name}-%{version}-build +Requires: python3 BuildArch: noarch %description @@ -52,26 +43,19 @@ %prep %setup -q -%if 0%{?suse_version} >= 1315 -%patch0 -p1 -%endif -%patch1 -p1 -%patch2 -p1 -%patch3 -p1 -%patch4 -p1 -%patch5 -p1 +sed -i 's|#!%{_bindir}/env python|#!%{_bindir}/python3|g' unoconv %build %install -make DESTDIR=%{buildroot} install +%make_install make DESTDIR=%{buildroot} install-links rm -v %{buildroot}%{_bindir}/odt2txt %files -%defattr(-, root, root, 0755) -%doc AUTHORS CHANGELOG.md ChangeLog COPYING README.adoc doc/*.adoc -%doc %{_mandir}/man1/unoconv.1* +%license COPYING +%doc AUTHORS CHANGELOG.md ChangeLog README.adoc doc/*.adoc +%{_mandir}/man1/unoconv.1%{?ext_man} %{_bindir}/* %changelog ++++++ unoconv-0.7.tar.gz -> unoconv-0.8.2.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/unoconv-0.7/.gitignore new/unoconv-0.8.2/.gitignore --- old/unoconv-0.7/.gitignore 1970-01-01 01:00:00.000000000 +0100 +++ new/unoconv-0.8.2/.gitignore 2017-12-07 12:01:17.000000000 +0100 @@ -0,0 +1 @@ +.DS_Store diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/unoconv-0.7/.travis.yml new/unoconv-0.8.2/.travis.yml --- old/unoconv-0.7/.travis.yml 1970-01-01 01:00:00.000000000 +0100 +++ new/unoconv-0.8.2/.travis.yml 2017-12-07 12:01:17.000000000 +0100 @@ -0,0 +1,31 @@ +os: + - linux + - osx + +env: + - VERSION=3.5.7.2 + - VERSION=3.6.7.2 + - VERSION=4.0.6.2 + - VERSION=4.1.6.1 + - VERSION=4.2.8.2 + - VERSION=4.3.7.2 + - VERSION=4.4.7.2 + - VERSION=5.0.5.2 + - VERSION=5.1.1.3 + - VERSION=5.1.2.1 + +matrix: + allow_failures: + - os: osx + - os: linux + - env: VERSION=5.1.2.1 + exclude: + - os: osx + env: VERSION=3.5.7.2 + +before_install: + - sudo VERSION=$VERSION bash ci/linux.bash + - sudo VERSION=$VERSION bash ci/osx.bash + +script: + - make -C tests diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/unoconv-0.7/CHANGELOG.md new/unoconv-0.8.2/CHANGELOG.md --- old/unoconv-0.7/CHANGELOG.md 2015-06-23 13:00:52.000000000 +0200 +++ new/unoconv-0.8.2/CHANGELOG.md 2017-12-07 12:01:17.000000000 +0100 @@ -1,207 +1,296 @@ # Change Log -## [Unreleased](https://github.com/dagwieers/unoconv/tree/HEAD) +## [0.8](https://github.com/dagwieers/unoconv/tree/0.8) (2017-12-07) +[Full Changelog](https://github.com/dagwieers/unoconv/compare/0.7...0.8) -[Full Changelog](https://github.com/dagwieers/unoconv/compare/0.6...HEAD) +**Implemented enhancements:** + +- Update README.adoc [\#370](https://github.com/dagwieers/unoconv/pull/370) ([Atalanttore](https://github.com/Atalanttore)) +- Add a command line option to specify import filter name [\#343](https://github.com/dagwieers/unoconv/pull/343) ([MartijnVdS](https://github.com/MartijnVdS)) +- manage office exit code 81 on listener [\#327](https://github.com/dagwieers/unoconv/pull/327) ([alikefia](https://github.com/alikefia)) +- Typo in manpage [\#313](https://github.com/dagwieers/unoconv/pull/313) ([jacobmischka](https://github.com/jacobmischka)) +- Handle SIGTERM when starting as listener [\#301](https://github.com/dagwieers/unoconv/pull/301) ([leture](https://github.com/leture)) +- Add .travis.yml to run tests from 3.3 to 5.0 on OS X and Linux [\#296](https://github.com/dagwieers/unoconv/pull/296) ([pquentin](https://github.com/pquentin)) +- fix misset printer for drawing [\#294](https://github.com/dagwieers/unoconv/pull/294) ([wmin0](https://github.com/wmin0)) +- add printer options [\#282](https://github.com/dagwieers/unoconv/pull/282) ([wmin0](https://github.com/wmin0)) +- Add extra bin/lib directories for LibreOffice on OS X [\#276](https://github.com/dagwieers/unoconv/pull/276) ([hubgit](https://github.com/hubgit)) + +**Fixed bugs:** + +- Ambiguous message [\#326](https://github.com/dagwieers/unoconv/issues/326) +- Fix travis downloads [\#314](https://github.com/dagwieers/unoconv/pull/314) ([pquentin](https://github.com/pquentin)) +- Fix for Python 3 to read binary data from stdin [\#309](https://github.com/dagwieers/unoconv/pull/309) ([kaysersoze](https://github.com/kaysersoze)) + +**Closed issues:** + +- failed to replace variable 'A' with value 'B' in the document. [\#425](https://github.com/dagwieers/unoconv/issues/425) +- Add more maintainers [\#411](https://github.com/dagwieers/unoconv/issues/411) +- PPT changing color while converting with Unoconv [\#406](https://github.com/dagwieers/unoconv/issues/406) +- ERROR: No module named 'uno' [\#403](https://github.com/dagwieers/unoconv/issues/403) +- unoconv from pptx, text is rendered as image [\#401](https://github.com/dagwieers/unoconv/issues/401) +- Compare docs [\#400](https://github.com/dagwieers/unoconv/issues/400) +- Unoconv creates new file with root permissions [\#394](https://github.com/dagwieers/unoconv/issues/394) +- xsl:attribute: Cannot add attributes to an element if children have been already added to the element. [\#387](https://github.com/dagwieers/unoconv/issues/387) +- Output file is owned by root [\#381](https://github.com/dagwieers/unoconv/issues/381) +- PPT to PDF: Textboxes underneath images appearing on top of image [\#378](https://github.com/dagwieers/unoconv/issues/378) +- script works fine with CLI but do not work with browser [\#365](https://github.com/dagwieers/unoconv/issues/365) +- Problem to execute from PHP \(Ubuntu, XAMPP\) [\#353](https://github.com/dagwieers/unoconv/issues/353) +- Progress bar [\#346](https://github.com/dagwieers/unoconv/issues/346) +- Can't get remote listener to work [\#341](https://github.com/dagwieers/unoconv/issues/341) +- Can't run unoconv as www-data user in Ubuntu 14.04LTS [\#336](https://github.com/dagwieers/unoconv/issues/336) +- Segmentation fault on Alpine Linux [\#333](https://github.com/dagwieers/unoconv/issues/333) +- Some docx files that contained table does not be converted to pdf exactly [\#330](https://github.com/dagwieers/unoconv/issues/330) +- Can not convert ppt file to pdf file with file name which contain japanese character. [\#325](https://github.com/dagwieers/unoconv/issues/325) +- How to install latest unoconv from github into ubuntu 14.40 headless terminal? [\#323](https://github.com/dagwieers/unoconv/issues/323) +- mac osx + emf conversion delegates to imagemagick which doesnt support it [\#320](https://github.com/dagwieers/unoconv/issues/320) +- Unable to use unoconv through php shell\_exec [\#302](https://github.com/dagwieers/unoconv/issues/302) +- Running 2+ instances of unoconv concurrently results in error [\#299](https://github.com/dagwieers/unoconv/issues/299) +- Missing help option in help output [\#297](https://github.com/dagwieers/unoconv/issues/297) +- OS X, LibreOffice 4.4 and 5.0: no suitable office installation [\#292](https://github.com/dagwieers/unoconv/issues/292) +- Enhancing the performance on converting text files [\#291](https://github.com/dagwieers/unoconv/issues/291) +- Cannot find a suitable pyuno library and python binary combination in /usr/lib/libreoffice [\#290](https://github.com/dagwieers/unoconv/issues/290) +- Conversion of a list from a docx to html [\#287](https://github.com/dagwieers/unoconv/issues/287) +- unoconv 0.7 hangs out of nowhere [\#274](https://github.com/dagwieers/unoconv/issues/274) +- pagination [\#268](https://github.com/dagwieers/unoconv/issues/268) +- LibreOffice Python Syntax Error Mac OS X [\#166](https://github.com/dagwieers/unoconv/issues/166) + +**Merged pull requests:** + +- \* make -F switch working for user-defined fields [\#426](https://github.com/dagwieers/unoconv/pull/426) ([belegnar](https://github.com/belegnar)) +- Updated Changelog and docs [\#422](https://github.com/dagwieers/unoconv/pull/422) ([regebro](https://github.com/regebro)) +- Added setup.py [\#421](https://github.com/dagwieers/unoconv/pull/421) ([regebro](https://github.com/regebro)) +- Drop support for v3.3 and v3.4 [\#413](https://github.com/dagwieers/unoconv/pull/413) ([regebro](https://github.com/regebro)) +- pass the password as openoffice expects it, so it will work for docum… [\#358](https://github.com/dagwieers/unoconv/pull/358) ([monomelodies](https://github.com/monomelodies)) + +## [0.7](https://github.com/dagwieers/unoconv/tree/0.7) (2015-07-08) +[Full Changelog](https://github.com/dagwieers/unoconv/compare/0.6...0.7) **Implemented enhancements:** +- --version and --help commands should return 0 status code [\#222](https://github.com/dagwieers/unoconv/issues/222) +- Using unoconv with pyenv [\#204](https://github.com/dagwieers/unoconv/issues/204) +- Add --version option [\#183](https://github.com/dagwieers/unoconv/issues/183) +- Error using --stdout in a win32 box - CR + LF instead LF [\#112](https://github.com/dagwieers/unoconv/issues/112) - python3 compatibility [\#107](https://github.com/dagwieers/unoconv/issues/107) - +- unoconv includes deleted text when converting from doc to txt [\#40](https://github.com/dagwieers/unoconv/issues/40) +- Add an --stdin option to read content from stdin [\#35](https://github.com/dagwieers/unoconv/issues/35) - Preserve the original timestamp, ownership and permissions [\#31](https://github.com/dagwieers/unoconv/issues/31) +- Minor readme addition about HOME directory \(\#87\) [\#265](https://github.com/dagwieers/unoconv/pull/265) ([pataquets](https://github.com/pataquets)) +- Cycle through all images in input file [\#254](https://github.com/dagwieers/unoconv/pull/254) ([integritydc](https://github.com/integritydc)) +- Add change log file. [\#253](https://github.com/dagwieers/unoconv/pull/253) ([skywinder](https://github.com/skywinder)) +- Add a extra search path on MacOS X for OpenOffice [\#250](https://github.com/dagwieers/unoconv/pull/250) ([vittala](https://github.com/vittala)) +- document --version option in help output [\#200](https://github.com/dagwieers/unoconv/pull/200) ([mmariani](https://github.com/mmariani)) +- Add -F|--field to update user-defined fields before exporting document [\#193](https://github.com/dagwieers/unoconv/pull/193) ([raphink](https://github.com/raphink)) +- Preserve timestamps and permissions [\#179](https://github.com/dagwieers/unoconv/pull/179) ([vincentbernat](https://github.com/vincentbernat)) +- Correct output of "make help" [\#174](https://github.com/dagwieers/unoconv/pull/174) ([ojwb](https://github.com/ojwb)) +- Find LibreOffice 4.1 on MacOSX [\#154](https://github.com/dagwieers/unoconv/pull/154) ([zopyx](https://github.com/zopyx)) +- set format based on extension [\#151](https://github.com/dagwieers/unoconv/pull/151) ([urg](https://github.com/urg)) +- Update README.asciidoc [\#140](https://github.com/dagwieers/unoconv/pull/140) ([simkimsia](https://github.com/simkimsia)) +- Add XLSX support [\#131](https://github.com/dagwieers/unoconv/pull/131) ([josiasmontag](https://github.com/josiasmontag)) +- Fix documentation typos [\#117](https://github.com/dagwieers/unoconv/pull/117) ([ojwb](https://github.com/ojwb)) +- Add python 3 support [\#111](https://github.com/dagwieers/unoconv/pull/111) ([xrmx](https://github.com/xrmx)) **Fixed bugs:** +- Mismatch of output basename for file and dir [\#251](https://github.com/dagwieers/unoconv/issues/251) +- an error occurred when called by lua in nginx [\#224](https://github.com/dagwieers/unoconv/issues/224) - On Mac OSX + LibreOffice 4.3 Not working [\#221](https://github.com/dagwieers/unoconv/issues/221) - +- --output is broken in master [\#210](https://github.com/dagwieers/unoconv/issues/210) +- Handling exit code 81 [\#192](https://github.com/dagwieers/unoconv/issues/192) +- Failure to convert when specifying a non-existing output directory \(ErrCode 283\) [\#133](https://github.com/dagwieers/unoconv/issues/133) - dyld: Library not loaded: /usr/local/libodep/lib/libintl.8.dylib [\#128](https://github.com/dagwieers/unoconv/issues/128) - +- When converting odt to pdf table of contents may have wrong page numbers [\#120](https://github.com/dagwieers/unoconv/issues/120) - unoconv: option --export must not have an argument [\#93](https://github.com/dagwieers/unoconv/issues/93) - +- MathType equations in docx file generates very small images [\#91](https://github.com/dagwieers/unoconv/issues/91) - Configuration of LibreOffice is changed [\#15](https://github.com/dagwieers/unoconv/issues/15) +- Fix python2 compatibility after 3249fd3 [\#175](https://github.com/dagwieers/unoconv/pull/175) ([xrmx](https://github.com/xrmx)) +- Resolves: fdo\#70309 can't write bytes direct to stdout in python3 [\#170](https://github.com/dagwieers/unoconv/pull/170) ([caolanm](https://github.com/caolanm)) +- \#133 fix export to non existent directory [\#134](https://github.com/dagwieers/unoconv/pull/134) ([gazofnaz](https://github.com/gazofnaz)) +- Third attempt to make pull request for fixing issue \#120 [\#127](https://github.com/dagwieers/unoconv/pull/127) ([peterdemin](https://github.com/peterdemin)) **Closed issues:** +- unoconv Office probably died. Unsupported URL..all libreoffice packages have been installed [\#264](https://github.com/dagwieers/unoconv/issues/264) +- How to convert an encoded text file into a pdf one [\#262](https://github.com/dagwieers/unoconv/issues/262) +- Unoconv requires LibreOffice installed even when connecting to remote listener [\#260](https://github.com/dagwieers/unoconv/issues/260) +- sudo -u www unoconv -f pdf 1.ppt erro help me!! [\#259](https://github.com/dagwieers/unoconv/issues/259) +- ImportError: No module named 'com' \(or 'com.sun.star.document.UpdateDocMode.QUIET\_UPDATE' is unknown\) [\#258](https://github.com/dagwieers/unoconv/issues/258) +- Run unoconv with libre on another server [\#257](https://github.com/dagwieers/unoconv/issues/257) +- ImportError: No module named 'encodings' [\#255](https://github.com/dagwieers/unoconv/issues/255) +- Not able to manage/handle page breaks [\#249](https://github.com/dagwieers/unoconv/issues/249) +- Row freeze won't survive conversion ods-\>xls [\#245](https://github.com/dagwieers/unoconv/issues/245) +- Support for pptx docx [\#244](https://github.com/dagwieers/unoconv/issues/244) +- Unoconv fails with error "Error: Unable to connect or start own listener. Aborting" if LibreOffice has never been run [\#241](https://github.com/dagwieers/unoconv/issues/241) +- unconv error "The document 'file:///tmp/file.xlsx' could not be opened [\#237](https://github.com/dagwieers/unoconv/issues/237) - unoconv: Cannot find a suitable office installation on your system. [\#236](https://github.com/dagwieers/unoconv/issues/236) - +- can not convert odt to ods [\#235](https://github.com/dagwieers/unoconv/issues/235) - Libreoffice GraphicImport error [\#234](https://github.com/dagwieers/unoconv/issues/234) - +- unoconv supports python 2.6? [\#233](https://github.com/dagwieers/unoconv/issues/233) +- unoconv: RuntimeException during import phase: Office probably died. Unsupported URL [\#232](https://github.com/dagwieers/unoconv/issues/232) +- Cant convert a pdf file to a doc file [\#229](https://github.com/dagwieers/unoconv/issues/229) +- backtrace trying to convert \*.ods to xls format on Slackware64-14.1 \(ErrCode 3088\) [\#228](https://github.com/dagwieers/unoconv/issues/228) +- PDF to doc/xls/html/xhtml fails \(ErrCode 3088\) [\#226](https://github.com/dagwieers/unoconv/issues/226) - display\(\) method used by --show should not output to stderr [\#223](https://github.com/dagwieers/unoconv/issues/223) - +- problem in converting documents to pdf with argument "--stdout" \(ErrCode 3088\) [\#220](https://github.com/dagwieers/unoconv/issues/220) +- After starting the system,the fisrt time I use unoconv always fail. [\#219](https://github.com/dagwieers/unoconv/issues/219) - not generating content [\#217](https://github.com/dagwieers/unoconv/issues/217) - +- centos 6 unoconv doesn't work [\#216](https://github.com/dagwieers/unoconv/issues/216) - UNO IllegalArgument during import phase: Source file cannot be read. Unsupported URL [\#215](https://github.com/dagwieers/unoconv/issues/215) - +- Setting page size for pdf conversion [\#208](https://github.com/dagwieers/unoconv/issues/208) +- Missing binary location [\#207](https://github.com/dagwieers/unoconv/issues/207) +- libre office 4.3 requires double-dash args \(--headless instead of -headless\) [\#205](https://github.com/dagwieers/unoconv/issues/205) +- Facing problem during conversion [\#196](https://github.com/dagwieers/unoconv/issues/196) - can't find libreoffice 4.2.2.1 [\#195](https://github.com/dagwieers/unoconv/issues/195) - +- Unoconv gets stuck converting one HTML into PDF [\#191](https://github.com/dagwieers/unoconv/issues/191) +- Combines with asciidoc and docbook2odf/xhtml2odt to create PDF or Word \(.doc\) files [\#188](https://github.com/dagwieers/unoconv/issues/188) +- any way to make the convert faster? [\#187](https://github.com/dagwieers/unoconv/issues/187) - unoconv doesn't ouput UTF-8 text files on windows. [\#185](https://github.com/dagwieers/unoconv/issues/185) - -- --version [\#183](https://github.com/dagwieers/unoconv/issues/183) - -- uno bridge removed on ubuntu 13.10 [\#182](https://github.com/dagwieers/unoconv/issues/182) - -- Cannot Install in centos 6.5 [\#178](https://github.com/dagwieers/unoconv/issues/178) - +- uno bridge removed on ubuntu 13.10 \(ErrCode 283\) [\#182](https://github.com/dagwieers/unoconv/issues/182) +- unoconv: Cannot find a suitable office installation on your system MAC [\#163](https://github.com/dagwieers/unoconv/issues/163) +- How to Install unoconv install mac Os-x 10.8.4 ? [\#162](https://github.com/dagwieers/unoconv/issues/162) +- CSV export - FilterOptions ignored [\#161](https://github.com/dagwieers/unoconv/issues/161) +- UNO IllegalArgument during import phase: Source file cannot be read. [\#160](https://github.com/dagwieers/unoconv/issues/160) +- Error: Unable to connect or start own listener. Aborting. [\#155](https://github.com/dagwieers/unoconv/issues/155) +- unoconv doc to txt with russian symbols: output "?????? ?????" [\#148](https://github.com/dagwieers/unoconv/issues/148) +- Gdk-WARNING \*\*: locale not supported by C library [\#147](https://github.com/dagwieers/unoconv/issues/147) +- UNO IllegalArgument during import phase: Source file cannot be read. URL seems to be an unsupported one [\#145](https://github.com/dagwieers/unoconv/issues/145) - My unoconv works perfectly in terminal using www-data, but no pdf file when executed through php [\#139](https://github.com/dagwieers/unoconv/issues/139) - +- Export options to PDF does not work [\#138](https://github.com/dagwieers/unoconv/issues/138) +- Document does not maintain format when converting to PDF [\#137](https://github.com/dagwieers/unoconv/issues/137) - weirdly quoted output [\#135](https://github.com/dagwieers/unoconv/issues/135) - +- unoconv freezes randomly [\#130](https://github.com/dagwieers/unoconv/issues/130) +- Source file cannot be read. Unsupported URL [\#129](https://github.com/dagwieers/unoconv/issues/129) +- Installing / running unoconv on Mac Os X [\#125](https://github.com/dagwieers/unoconv/issues/125) +- UnoException when converting xlsx to html \(ErrCode 3088\) [\#119](https://github.com/dagwieers/unoconv/issues/119) +- SyntaxError: invalid syntax [\#114](https://github.com/dagwieers/unoconv/issues/114) +- UNOCONV unable to convert pdf back to pptx. [\#110](https://github.com/dagwieers/unoconv/issues/110) +- Add switch to break image links in text docs. [\#109](https://github.com/dagwieers/unoconv/issues/109) +- PPT/ODP Exporting hidden pages option when exporting to PDF [\#108](https://github.com/dagwieers/unoconv/issues/108) +- doc/docx conversions errors [\#106](https://github.com/dagwieers/unoconv/issues/106) - please add LICENSE file [\#105](https://github.com/dagwieers/unoconv/issues/105) +- PDF Export security options [\#104](https://github.com/dagwieers/unoconv/issues/104) +- SyntaxError except getopt.error, exc: [\#102](https://github.com/dagwieers/unoconv/issues/102) +- creation of executable memory area failed: Permission denied on CENTOS 5 [\#99](https://github.com/dagwieers/unoconv/issues/99) +- Default options for Text \(encoded\) export filter with LibreOffice [\#98](https://github.com/dagwieers/unoconv/issues/98) +- Unsupported URL [\#96](https://github.com/dagwieers/unoconv/issues/96) +- Unsupported URL on 64bit Ubuntu 12.04 [\#95](https://github.com/dagwieers/unoconv/issues/95) +- Pb unoconv landscape/portrait in .xls [\#92](https://github.com/dagwieers/unoconv/issues/92) +- unoconv command in debug mode to trace library path [\#89](https://github.com/dagwieers/unoconv/issues/89) +- Problem converting txt files \(ErrCode 2074\) [\#86](https://github.com/dagwieers/unoconv/issues/86) +- Creation of executable memory area failed: Permission denied [\#85](https://github.com/dagwieers/unoconv/issues/85) +- Problem converting cyrillic .doc OR .odt file to .txt [\#73](https://github.com/dagwieers/unoconv/issues/73) +- unoconv: UnoException during export phase [\#66](https://github.com/dagwieers/unoconv/issues/66) +- cannot find suitable pyuno library [\#62](https://github.com/dagwieers/unoconv/issues/62) +- Issue using on webserver [\#58](https://github.com/dagwieers/unoconv/issues/58) +- Converting filenames with non-ascii characters \(ErrCode 2074\) [\#18](https://github.com/dagwieers/unoconv/issues/18) **Merged pull requests:** -- Add a extra search path on MacOS X for OpenOffice [\#250](https://github.com/dagwieers/unoconv/pull/250) ([vittala](https://github.com/vittala)) - -- document --version option in help output [\#200](https://github.com/dagwieers/unoconv/pull/200) ([mmariani](https://github.com/mmariani)) - -- Add -F|--field to update user-defined fields before exporting document [\#193](https://github.com/dagwieers/unoconv/pull/193) ([raphink](https://github.com/raphink)) - -- Preserve timestamps and permissions [\#179](https://github.com/dagwieers/unoconv/pull/179) ([vincentbernat](https://github.com/vincentbernat)) - -- Resolves: fdo\#70309 can't write bytes direct to stdout in python3 [\#170](https://github.com/dagwieers/unoconv/pull/170) ([caolanm](https://github.com/caolanm)) - - add Microsoft Works \(.wps\) import filter [\#159](https://github.com/dagwieers/unoconv/pull/159) ([josiasmontag](https://github.com/josiasmontag)) - -- Find LibreOffice 4.1 on MacOSX [\#154](https://github.com/dagwieers/unoconv/pull/154) ([zopyx](https://github.com/zopyx)) - -- set format based on extension [\#151](https://github.com/dagwieers/unoconv/pull/151) ([urg](https://github.com/urg)) - - make sure LOdev gets new param styles [\#144](https://github.com/dagwieers/unoconv/pull/144) ([clkao](https://github.com/clkao)) -- Update README.asciidoc [\#140](https://github.com/dagwieers/unoconv/pull/140) ([simkimsia](https://github.com/simkimsia)) - -- \#133 fix export to non existent directory [\#134](https://github.com/dagwieers/unoconv/pull/134) ([gazofnaz](https://github.com/gazofnaz)) - -- Add XLSX support [\#131](https://github.com/dagwieers/unoconv/pull/131) ([josiasmontag](https://github.com/josiasmontag)) - -- Third attempt to make pull request for fixing issue \#120 [\#127](https://github.com/dagwieers/unoconv/pull/127) ([peterdemin](https://github.com/peterdemin)) - -- Fix documentation typos [\#117](https://github.com/dagwieers/unoconv/pull/117) ([ojwb](https://github.com/ojwb)) - -- Add python 3 support [\#111](https://github.com/dagwieers/unoconv/pull/111) ([xrmx](https://github.com/xrmx)) - ## [0.6](https://github.com/dagwieers/unoconv/tree/0.6) (2012-09-10) - [Full Changelog](https://github.com/dagwieers/unoconv/compare/0.5...0.6) **Implemented enhancements:** - unoconv --version fails to display revision number [\#82](https://github.com/dagwieers/unoconv/issues/82) - - Issue with named ubuntu server and office listener. [\#80](https://github.com/dagwieers/unoconv/issues/80) +- Python path variable using env [\#72](https://github.com/dagwieers/unoconv/pull/72) ([petross](https://github.com/petross)) **Fixed bugs:** - Permission in unoconv aren't applied to PDF [\#75](https://github.com/dagwieers/unoconv/issues/75) - - Improve 'make install' under MacOS X [\#63](https://github.com/dagwieers/unoconv/issues/63) - - Starting listener fails with "No Info.plist file in application bundle or no NSPrincipalClass in the Info.plist file" [\#60](https://github.com/dagwieers/unoconv/issues/60) - - selinux.txt not a valid asciidoc document [\#53](https://github.com/dagwieers/unoconv/issues/53) - - Installation under Windows? "Cannot find a suitable office installation" [\#52](https://github.com/dagwieers/unoconv/issues/52) - - Unoconv version check is incorrect, fails on older LibreOffice [\#50](https://github.com/dagwieers/unoconv/issues/50) - - Not working on Mac [\#27](https://github.com/dagwieers/unoconv/issues/27) +- Endless recursion fix for windows... [\#71](https://github.com/dagwieers/unoconv/pull/71) ([vpa](https://github.com/vpa)) +- Random seg.faults in unoconv [\#67](https://github.com/dagwieers/unoconv/pull/67) ([vpa](https://github.com/vpa)) **Closed issues:** +- unoconv and MacOS [\#81](https://github.com/dagwieers/unoconv/issues/81) +- Export filter problem in unoconv-0.5 PropertyValue not defined [\#78](https://github.com/dagwieers/unoconv/issues/78) +- The fix for Issue \#75 causes "NameError: global name 'PropertyValue' is not defined" [\#77](https://github.com/dagwieers/unoconv/issues/77) - r [\#76](https://github.com/dagwieers/unoconv/issues/76) +- word document conversion failed [\#70](https://github.com/dagwieers/unoconv/issues/70) +- soffice couldn't connect at first time [\#68](https://github.com/dagwieers/unoconv/issues/68) +- unoconv A New File Name [\#65](https://github.com/dagwieers/unoconv/issues/65) +- Remove support for OpenOffice under MacOS X [\#64](https://github.com/dagwieers/unoconv/issues/64) +- unoconv not working [\#61](https://github.com/dagwieers/unoconv/issues/61) +- Trouble upgrading to CentOS 6 [\#56](https://github.com/dagwieers/unoconv/issues/56) +- upgrade from unoconv 0.3-6 - ubuntu 10.10 [\#55](https://github.com/dagwieers/unoconv/issues/55) +- unoconv convert doc to pdf make error! [\#54](https://github.com/dagwieers/unoconv/issues/54) +- Basic installation process [\#51](https://github.com/dagwieers/unoconv/issues/51) +- unoconv: Cannot find a suitable pyuno library and python binary combination [\#49](https://github.com/dagwieers/unoconv/issues/49) +- UNO IllegalArgument during import phase: Source file cannot be read. URL seems to be an unsupported one. [\#47](https://github.com/dagwieers/unoconv/issues/47) **Merged pull requests:** - added explicit check in Listener\(\) if soffice is already running on given \(host, port\) [\#74](https://github.com/dagwieers/unoconv/pull/74) ([vpa](https://github.com/vpa)) -- Python path variable using env [\#72](https://github.com/dagwieers/unoconv/pull/72) ([petross](https://github.com/petross)) - -- Endless recursion fix for windows... [\#71](https://github.com/dagwieers/unoconv/pull/71) ([vpa](https://github.com/vpa)) - -- Random seg.faults in unoconv [\#67](https://github.com/dagwieers/unoconv/pull/67) ([vpa](https://github.com/vpa)) - ## [0.5](https://github.com/dagwieers/unoconv/tree/0.5) (2012-04-16) - [Full Changelog](https://github.com/dagwieers/unoconv/compare/0.4...0.5) **Implemented enhancements:** - Missing DocTypes?! [\#36](https://github.com/dagwieers/unoconv/issues/36) - +- Change/force the document encoding during conversion \(UTF-8\) [\#33](https://github.com/dagwieers/unoconv/issues/33) - Convert after launching listener [\#30](https://github.com/dagwieers/unoconv/issues/30) - - Close after launching listener [\#29](https://github.com/dagwieers/unoconv/issues/29) - +- SElinux Problems When Running Indirectly [\#19](https://github.com/dagwieers/unoconv/issues/19) - Deprecated command [\#14](https://github.com/dagwieers/unoconv/issues/14) - - extrapath for LO on OpenBSD [\#8](https://github.com/dagwieers/unoconv/issues/8) +- Fix a typo in unoconv manual page. [\#41](https://github.com/dagwieers/unoconv/pull/41) ([vincentbernat](https://github.com/vincentbernat)) **Fixed bugs:** - pyuno.so location not inserted into sys.path on Gentoo [\#46](https://github.com/dagwieers/unoconv/issues/46) - - unoconv doesn't work anymore on Fedora 17 [\#45](https://github.com/dagwieers/unoconv/issues/45) - - Launching with single/double hyphen [\#28](https://github.com/dagwieers/unoconv/issues/28) - - LibreOffice 3.5.0 crashes when using python UNO [\#26](https://github.com/dagwieers/unoconv/issues/26) - - uno.RuntimeException: URP-Bridge: disposed\(tid=3\) Unexpected connection closure [\#22](https://github.com/dagwieers/unoconv/issues/22) - - Exception if file doesn't exist [\#17](https://github.com/dagwieers/unoconv/issues/17) - - com.sun.star.beans.PropertyValue may not yet been imported when Options initializing [\#16](https://github.com/dagwieers/unoconv/issues/16) - +- unoconv needs 2 times to connect to LibreOffice [\#7](https://github.com/dagwieers/unoconv/issues/7) - unoconv: Cannot find the pyuno library in sys.path and known paths. [\#4](https://github.com/dagwieers/unoconv/issues/4) - - unoconv: UnoException during conversion [\#3](https://github.com/dagwieers/unoconv/issues/3) **Closed issues:** +- IIS socket problem? [\#44](https://github.com/dagwieers/unoconv/issues/44) +- Converting with LibreOffice 3.5.0 doesn't work every time [\#43](https://github.com/dagwieers/unoconv/issues/43) - Unable to run unoconv from PHP [\#42](https://github.com/dagwieers/unoconv/issues/42) - -- Change/force the document encoding during conversion \(UTF-8\) [\#33](https://github.com/dagwieers/unoconv/issues/33) - -- SElinux Problems When Running Indirectly [\#19](https://github.com/dagwieers/unoconv/issues/19) - +- UnoException during import phase [\#25](https://github.com/dagwieers/unoconv/issues/25) +- SystemError: dynamic module not initialized properly [\#24](https://github.com/dagwieers/unoconv/issues/24) +- ODT use problem [\#23](https://github.com/dagwieers/unoconv/issues/23) - JPEG export filter seems to have a size limit [\#13](https://github.com/dagwieers/unoconv/issues/13) - - LibreOffice should use SVG natively [\#11](https://github.com/dagwieers/unoconv/issues/11) - -- unoconv needs 2 times to connect to LibreOffice [\#7](https://github.com/dagwieers/unoconv/issues/7) - +- DLL load failed on windows [\#10](https://github.com/dagwieers/unoconv/issues/10) - Support for .docx conversion [\#1](https://github.com/dagwieers/unoconv/issues/1) **Merged pull requests:** -- Fix a typo in unoconv manual page. [\#41](https://github.com/dagwieers/unoconv/pull/41) ([vincentbernat](https://github.com/vincentbernat)) - - Daemon [\#38](https://github.com/dagwieers/unoconv/pull/38) ([lars-sh](https://github.com/lars-sh)) - - SElinux Problems When Running Indirectly [\#21](https://github.com/dagwieers/unoconv/pull/21) ([dks](https://github.com/dks)) - - int values in export filters [\#9](https://github.com/dagwieers/unoconv/pull/9) ([damycra](https://github.com/damycra)) - - Option --no-launch [\#6](https://github.com/dagwieers/unoconv/pull/6) ([eagleas](https://github.com/eagleas)) - - Add extrapath for official rpm [\#5](https://github.com/dagwieers/unoconv/pull/5) ([eagleas](https://github.com/eagleas)) - - Add support for libreoffice [\#2](https://github.com/dagwieers/unoconv/pull/2) ([graaff](https://github.com/graaff)) ## [0.4](https://github.com/dagwieers/unoconv/tree/0.4) (2010-10-20) - [Full Changelog](https://github.com/dagwieers/unoconv/compare/0.3...0.4) ## [0.3](https://github.com/dagwieers/unoconv/tree/0.3) (2007-09-01) - [Full Changelog](https://github.com/dagwieers/unoconv/compare/0.2...0.3) ## [0.2](https://github.com/dagwieers/unoconv/tree/0.2) (2007-05-20) - [Full Changelog](https://github.com/dagwieers/unoconv/compare/0.1...0.2) ## [0.1](https://github.com/dagwieers/unoconv/tree/0.1) (2007-05-19) - \* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)* \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/unoconv-0.7/ChangeLog new/unoconv-0.8.2/ChangeLog --- old/unoconv-0.7/ChangeLog 2015-07-09 01:20:32.000000000 +0200 +++ new/unoconv-0.8.2/ChangeLog 2017-12-07 12:01:17.000000000 +0100 @@ -1,5 +1,33 @@ +* 0.8.2 - released 2017-12-07 +- Fixed PyPI upload + +* 0.8 - released 2017-12-07 +- Add option -M/--meta to add or update document metadata during conversion +- Add option -I/--input-filter-name to specify input format (Martijn van de Streek) +- Added setup.py to support standard Python installs, like pip, etc. +- Dropped support for OpenOffice 3.3 and 3.4 +- Fix for Python 3 to read binary data from stdin (Carlos Noguera) +- Fix for password protected files (Marijn Ophorst) +- Make -F switch working for user-defined fields (Belegnar) + * 0.7 - released 2015-07-09 -- +- Ported to Python 3 (Riccardo Magliocchetti) +- Update Indexes (eg. TOC) during conversion (Peter Demin) +- Added XLSX support (Josias Montag) +- Fix output to non-existing directory +- Ensure that LibreOfficeDev release are using new long options (Chia-liang Kao) +- Set output format based on output filename extension (Patrick McAndrew) +- Accept 'office' as binary on MacOSX (Andreas Jung) +- Added Microsoft WPS import filter (Josias Montag) +- Fix --stdout output on Python 3 (Caolán McNamara) +- Added -F/--field option to update user fields during conversion (Raphaël Pinson) +- Added OpenOffice search path on MacOSX (Vittal Aithal) +- Cycle through all images references before conversion +- Added --preserve option to preserve timestamp and permissions (Vincent Bernat) +- Added --stdin option to read from standard input +- Accept remote URLs as input filename +- Fix exit code 81 and recover from initial failure (Daniel Vandersluis) +- Improve documentation related to error codes and using unoconv with Nginx/Apache/PHP * 0.6 - released 2012-09-10 - Implement debugging output (-vvv) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/unoconv-0.7/MANIFEST.in new/unoconv-0.8.2/MANIFEST.in --- old/unoconv-0.7/MANIFEST.in 1970-01-01 01:00:00.000000000 +0100 +++ new/unoconv-0.8.2/MANIFEST.in 2017-12-07 12:01:17.000000000 +0100 @@ -0,0 +1,15 @@ +include *.adoc +include *.md +include AUTHORS +include COPYING +include ChangeLog +include Makefile +recursive-include ci *.bash +recursive-include doc *.1 +recursive-include doc *.adoc +recursive-include doc Makefile +recursive-include packaging *.spec +recursive-include tests *.csv +recursive-include tests *.gif +recursive-include tests *.odt +recursive-include tests Makefile diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/unoconv-0.7/Makefile new/unoconv-0.8.2/Makefile --- old/unoconv-0.7/Makefile 2015-07-09 01:23:53.000000000 +0200 +++ new/unoconv-0.8.2/Makefile 2017-12-07 12:01:17.000000000 +0100 @@ -44,7 +44,7 @@ to_doc = odt2doc ooxml2doc to_html = odt2html -to_odp = ppt2odp +to_odp = ppt2odp to_ods = xls2ods to_odt = doc2odt sdw2odt sxw2odt ooxml2odt to_pdf = doc2pdf odp2pdf ods2pdf odt2pdf ooxml2pdf diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/unoconv-0.7/README.adoc new/unoconv-0.8.2/README.adoc --- old/unoconv-0.7/README.adoc 2015-07-09 01:16:24.000000000 +0200 +++ new/unoconv-0.8.2/README.adoc 2017-12-07 12:01:17.000000000 +0100 @@ -80,7 +80,7 @@ /opt/libreoffice4.4/program/python.bin unoconv -f pdf some-file.odt -or on MacOS X: +or on macOS: /Applications/LibreOffice.app/Contents/MacOS/python unoconv -f pdf some-file.odt @@ -109,10 +109,10 @@ - http://www.artofsolving.com/node/10 -== Using unoconv with MacOS X -LibreOffice 3.6.0.1 or later is required to use unoconv under MacOS X. This +== Using unoconv with macOS +LibreOffice 3.6.0.1 or later is required to use unoconv under macOS. This is the first version distributed with an internal python script that works. -No version of OpenOffice for MacOS X (3.4 is the current version) works because +No version of OpenOffice for macOS (3.4 is the current version) works because the necessary internal files are not included inside the application. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/unoconv-0.7/ci/linux.bash new/unoconv-0.8.2/ci/linux.bash --- old/unoconv-0.7/ci/linux.bash 1970-01-01 01:00:00.000000000 +0100 +++ new/unoconv-0.8.2/ci/linux.bash 2017-12-07 12:01:17.000000000 +0100 @@ -0,0 +1,30 @@ +#!/bin/bash + +set -o errexit + +[[ $(uname) != 'Linux' ]] && exit + +pushd /tmp + +if [[ "$VERSION" =~ ^3.3.* ]]; then + urldir=https://downloadarchive.documentfoundation.org/libreoffice/old/$VERSION/deb/x86_64 + cutversion=$(echo $VERSION | sed 's/\.[0-9]$//') + filename=LibO_${cutversion}_Linux_x86-64_install-deb_en-US +elif [[ "$VERSION" =~ ^3.[4-5].* ]]; then + urldir=https://downloadarchive.documentfoundation.org/libreoffice/old/$VERSION/deb/x86_64 + rcversion=$(echo $VERSION | sed 's/\.2$/rc2/') + filename=LibO_${rcversion}_Linux_x86-64_install-deb_en-US +elif [[ "$VERSION" =~ ^3.* ]]; then + urldir=https://downloadarchive.documentfoundation.org/libreoffice/old/$VERSION/deb/x86_64 + filename=LibO_${VERSION}_Linux_x86-64_install-deb_en-US +else + urldir=https://downloadarchive.documentfoundation.org/libreoffice/old/$VERSION/deb/x86_64 + filename=LibreOffice_${VERSION}_Linux_x86-64_deb +fi + +wget $urldir/${filename}.tar.gz +tar xvf ${filename}.tar.gz +dpkg -i Lib*_Linux_x86-64*deb*/DEBS/*.deb + +twodigitsversion=$(echo $VERSION | cut -c 1-3) +ln -s /opt/libreoffice${twodigitsversion}/program/python /tmp/python diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/unoconv-0.7/ci/osx.bash new/unoconv-0.8.2/ci/osx.bash --- old/unoconv-0.7/ci/osx.bash 1970-01-01 01:00:00.000000000 +0100 +++ new/unoconv-0.8.2/ci/osx.bash 2017-12-07 12:01:17.000000000 +0100 @@ -0,0 +1,24 @@ +#!/bin/bash + +set -o errexit + +[[ $(uname) != 'Darwin' ]] && exit + +pushd /tmp + +if [[ "$VERSION" =~ ^3.6.* ]]; then + urldir=https://downloadarchive.documentfoundation.org/libreoffice/old/$VERSION/mac/x86 + filename=LibO_${VERSION}_MacOS_x86_install_en-US.dmg +elif [[ "$VERSION" =~ ^4.[0-1].* ]]; then + urldir=https://downloadarchive.documentfoundation.org/libreoffice/old/$VERSION/mac/x86 + filename=LibreOffice_${VERSION}_MacOS_x86.dmg +else + urldir=https://downloadarchive.documentfoundation.org/libreoffice/old/$VERSION/mac/x86_64 + filename=LibreOffice_${VERSION}_MacOS_x86-64.dmg +else +fi + +wget $urldir/$filename +sudo hdiutil attach $filename + +ln -s /Volumes/LibreOffice/LibreOffice.app/Contents/MacOS/python /tmp/python diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/unoconv-0.7/doc/unoconv.1 new/unoconv-0.8.2/doc/unoconv.1 --- old/unoconv-0.7/doc/unoconv.1 2015-07-09 01:16:24.000000000 +0200 +++ new/unoconv-0.8.2/doc/unoconv.1 2017-12-07 12:01:17.000000000 +0100 @@ -1,7 +1,7 @@ '\" t .\" Title: unoconv .\" Author: Dag Wieers <d...@wieers.com> -.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/> +.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/> .\" Date: 20 october 2010 .\" Manual: \ \& .\" Source: \ \& 0.4 @@ -9,6 +9,15 @@ .\" .TH "UNOCONV" "1" "20 october 2010" "\ \& 0\&.4" "\ \&" .\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation @@ -59,7 +68,7 @@ .RS 4 .\} .nf -Default document type is \'document\'\&. +Default document type is \*(Aqdocument\*(Aq\&. .fi .if n \{\ .RE @@ -101,7 +110,7 @@ .RS 4 .\} .nf -Default document type is \'pdf\'\&. +Default document type is \*(Aqpdf\*(Aq\&. .fi .if n \{\ .RE @@ -110,7 +119,7 @@ .PP \-F, \-\-field .RS 4 -Replace user\-defined text field with value +Add or replace user\-defined text field with value .sp .if n \{\ .RS 4 @@ -138,11 +147,41 @@ .\} .RE .PP +\-I, \-\-input\-filter\-name +.RS 4 +Specify the input filter name, used when the file ending doesn\(cqt match the file type\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf +eg \-I odt +.fi +.if n \{\ +.RE +.\} +.RE +.PP \-l, \-\-listener .RS 4 Start unoconv as listener for unoconv clients to connect to\&. .RE .PP +\-M, \-\-meta +.RS 4 +Add or replace document metadata with value +.sp +.if n \{\ +.RS 4 +.\} +.nf +eg\&. \-M Author="Dag Wieers" +.fi +.if n \{\ +.RE +.\} +.RE +.PP \-n, \-\-no\-launch .RS 4 By default if no listener is running, unoconv will launch its own (temporary) listener to make sure the conversion works\&. This option will abort the conversion if no listener is found, rather than starting our own listener\&. @@ -171,7 +210,7 @@ .RS 4 .\} .nf -Default port is \'2002\'\&. +Default port is \*(Aq2002\*(Aq\&. .fi .if n \{\ .RE @@ -191,7 +230,7 @@ .RS 4 .\} .nf -Default server is \'localhost\'\&. +Default server is \*(Aqlocalhost\*(Aq\&. .fi .if n \{\ .RE @@ -1254,19 +1293,16 @@ .PP Asciidoc .RS 4 - \m[blue]\fBhttp://www\&.methods\&.co\&.nz/asciidoc/\fR\m[] .RE .PP asciidoc\-odf .RS 4 - \m[blue]\fBhttp://github\&.com/dagwieers/asciidoc\-odf\fR\m[] .RE .PP docbook2odf .RS 4 - \m[blue]\fBhttp://open\&.comsultia\&.com/docbook2odf/\fR\m[] .RE .sp @@ -1274,13 +1310,11 @@ .PP OpenOffice 2\&.1 .RS 4 - \m[blue]\fBhttp://wiki\&.services\&.openoffice\&.org/wiki/Framework/Article/Filter/FilterList_OOo_2_1\fR\m[] .RE .PP OpenOffice 3\&.0 .RS 4 - \m[blue]\fBhttp://wiki\&.services\&.openoffice\&.org/wiki/Framework/Article/Filter/FilterList_OOo_3_0\fR\m[] .RE .SH "AUTHOR" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/unoconv-0.7/doc/unoconv.1.adoc new/unoconv-0.8.2/doc/unoconv.1.adoc --- old/unoconv-0.7/doc/unoconv.1.adoc 2015-07-05 01:15:54.000000000 +0200 +++ new/unoconv-0.8.2/doc/unoconv.1.adoc 2017-12-07 12:01:17.000000000 +0100 @@ -54,7 +54,7 @@ Default document type is 'pdf'. -F, --field:: - Replace user-defined text field with value + Add or replace user-defined text field with value + eg. -F Client_Name="Oracle" @@ -64,9 +64,20 @@ + See the *IMPORT FILTERS* section. +-I, --input-filter-name:: + Specify the input filter name, used when the file ending doesn't match the + file type. ++ + eg -I odt + -l, --listener:: Start unoconv as listener for unoconv clients to connect to. +-M, --meta:: + Add or replace document metadata with value ++ + eg. -M Author="Dag Wieers" + -n, --no-launch:: By default if no listener is running, unoconv will launch its own (temporary) listener to make sure the conversion works. This option @@ -75,7 +86,7 @@ -o, --output:: If the argument is a directory, put the converted documents in this - directory. If multiple input files are provided, use it as a + directory. If multiple input files are provided, use it as a basename (and add output extension). Otherwise use it as the output filename. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/unoconv-0.7/packaging/rpm/unoconv.spec new/unoconv-0.8.2/packaging/rpm/unoconv.spec --- old/unoconv-0.7/packaging/rpm/unoconv.spec 2015-07-09 01:26:45.000000000 +0200 +++ new/unoconv-0.8.2/packaging/rpm/unoconv.spec 2017-12-07 12:01:17.000000000 +0100 @@ -8,7 +8,7 @@ Group: System Environment/Base URL: http://dag.wieers.com/home-made/unoconv/ -Source: unoconv-0.7.tar.gz +Source: https://github.com/downloads/dagwieers/unoconv/unoconv-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildArch: noarch @@ -29,7 +29,7 @@ and many more... %prep -%setup -q -n unoconv-0.7 +%setup %build %{__make} doc diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/unoconv-0.7/setup.py new/unoconv-0.8.2/setup.py --- old/unoconv-0.7/setup.py 1970-01-01 01:00:00.000000000 +0100 +++ new/unoconv-0.8.2/setup.py 2017-12-07 12:01:17.000000000 +0100 @@ -0,0 +1,118 @@ +from setuptools import setup, find_packages +from io import open + + +def adoc2rst(text): + levels = '=-~.^' + lines = text.split('\n') + # Flags: + codeblock = 0 + bullet = '' + indent = 0 + + result = [] + for line in lines: + # Get rid of extra whitespace + line = line.rstrip() + new_indent = len(line) - len(line.strip()) + + if not line.strip(): + if not result or result[-1].strip(): + result.append(line) + continue + elif line[0] == '=': + # This is a header + header = line.rstrip('=') + level = len(line) - len(header) + header = header.strip('= ') + result.append(header) + result.append(levels[level] * len(header)) + result.append('') + indent = 0 + codeblock = 0 + continue + elif line == '----': + # Code block + + if codeblock == 0: + codeblock = 1 + result.append('.. code-block::') + result.append('') + elif codeblock == 1: + # End of code + codeblock = 0 + elif codeblock == 2: + # We have a '----' codeblock after a '::' codeblock: + codeblock = 1 + + continue + elif line.strip()[0] in '-*+': + # Bullet list + # It's NOT code, even if the line before ended in colon + if codeblock == 2: + codeblock = 0 + for x in (-1, -2): + if result[x].endswith(':'): + result[x] = result[x][:-1] + + new_bullet = line.strip()[0] + if not bullet or bullet[-1] != new_bullet: + # New list + bullet = bullet + new_bullet + elif new_indent < indent: + # Outdent (but not a bullet) + if bullet: + if bullet != line.strip()[0]: + bullet = bullet[:-1] + # Bullets must end with a blank line: + result.append('') + indent = new_indent + if new_indent == 0: + codeblock = 0 + + if new_indent > indent: + indent = new_indent + + if codeblock: + line = ' ' + line + + if line and line[-1] == ':': + line += ':' + codeblock = 2 # Type 2 codeblock + + result.append(line) + + return '\n'.join(result) + + +with open('README.adoc', 'rt', encoding='UTF-8') as f: + long_description = adoc2rst(f.read()) + + +setup(name = "unoconv", + version = "0.8.2", + author = "Dag Wieers", + author_email = "dag.wie...@gmail.com", + url = "https://github.com/dagwieers/unoconv", + description = "Universal Office Converter - Office document conversion", + long_description = long_description, + scripts = ["unoconv"], + license = 'GPLv2', + keywords = 'openoffice uno office conversion', + classifiers = [ + 'Development Status :: 5 - Production/Stable', + 'Environment :: Console', + 'Intended Audience :: Developers', + 'Intended Audience :: System Administrators', + 'License :: OSI Approved :: GNU General Public License v2 (GPLv2)', + 'Programming Language :: Python', + 'Programming Language :: Python :: 2', + 'Programming Language :: Python :: 2.7', + 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 3.5', + 'Programming Language :: Python :: 3.6', + 'Topic :: Office/Business :: Office Suites', + 'Topic :: Utilities', + ], + zip_safe = False +) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/unoconv-0.7/tests/Makefile new/unoconv-0.8.2/tests/Makefile --- old/unoconv-0.7/tests/Makefile 2015-04-23 11:46:58.000000000 +0200 +++ new/unoconv-0.8.2/tests/Makefile 2017-12-07 12:01:17.000000000 +0100 @@ -1,9 +1,10 @@ ### Please modify and send me improvements -python=/opt/libreoffice4.4/program/python +python=/tmp/python unoconv=../unoconv -all: clean doc6 doc95 doc docbook fodt html mediawiki ooxml pdf rtf sdw3 sdw4 sdw sxw text txt uot xhtml +# failing filters doc6 doc95 sdw3 sdw4 sdw sxw +all: clean doc docbook fodt html mediawiki ooxml pdf rtf text txt uot xhtml @echo "== Tests finished." #xml: curriculum-vitae-dag-wieers.txt @@ -16,7 +17,7 @@ %: # -killall ooffice soffice.bin @echo "- Convert document-example.odt to $@..." - -$(python) $(unoconv) -vvv -p 2002 -f $@ document-example.odt + $(python) $(unoconv) -vvv -p 2002 -f $@ document-example.odt @echo # @ps aux | grep office # -unoconv -f $@ dag.gif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/unoconv-0.7/unoconv new/unoconv-0.8.2/unoconv --- old/unoconv-0.7/unoconv 2015-07-09 01:22:26.000000000 +0200 +++ new/unoconv-0.8.2/unoconv 2017-12-07 12:01:17.000000000 +0100 @@ -20,11 +20,12 @@ import getopt import glob import os +import signal import subprocess import sys import time -__version__ = '0.7' +__version__ = '0.8.2' doctypes = ('document', 'graphics', 'presentation', 'spreadsheet') @@ -125,12 +126,17 @@ libpath = 'error' for basis in ( 'basis-link', 'basis', '' ): for lib in officelibraries: - if os.path.isfile(realpath(basepath, basis, 'program', lib)): - libpath = realpath(basepath, basis, 'program') - officelibrary = realpath(libpath, lib) - info(3, "Found %s in %s" % (lib, libpath)) - # Break the inner loop... - break + for libdir in ( 'program', 'Frameworks' ): + if os.path.isfile(realpath(basepath, basis, libdir, lib)): + libpath = realpath(basepath, basis, libdir) + officelibrary = realpath(libpath, lib) + info(3, "Found %s in %s" % (lib, libpath)) + # Break the inner loop... + break + # Continue if the inner loop wasn't broken. + else: + continue + break # Continue if the inner loop wasn't broken. else: continue @@ -143,12 +149,17 @@ unopath = 'error' for basis in ( 'basis-link', 'basis', '' ): for bin in officebinaries: - if os.path.isfile(realpath(basepath, basis, 'program', bin)): - unopath = realpath(basepath, basis, 'program') - officebinary = realpath(unopath, bin) - info(3, "Found %s in %s" % (bin, unopath)) - # Break the inner loop... - break + for bindir in ( 'program', 'MacOS' ): + if os.path.isfile(realpath(basepath, basis, bindir, bin)): + unopath = realpath(basepath, basis, bindir) + officebinary = realpath(unopath, bin) + info(3, "Found %s in %s" % (bin, unopath)) + # Break the inner loop... + break + # Continue if the inner loop wasn't broken. + else: + continue + break # Continue if the inner loop wasn't broken. else: continue @@ -516,7 +527,9 @@ self.format = None self.importfilter = [] self.importfilteroptions = "" + self.importfiltername = None self.listener = False + self.metadata = {} self.nolaunch = False self.output = None self.password = None @@ -531,13 +544,18 @@ self.timeout = 6 self.verbose = 0 + self.setprinter = False + self.paperformat = None + self.paperorientation = None + self.papersize = None + ### Get options from the commandline try: - opts, args = getopt.getopt (args, 'c:Dd:e:F:f:hi:Llo:np:s:T:t:vV', + opts, args = getopt.getopt (args, 'c:Dd:e:F:f:hi:I:LlM:no:p:s:T:t:P:vV', ['connection=', 'debug', 'doctype=', 'export=', 'field=', 'format=', - 'help', 'import=', 'listener', 'no-launch', 'output=', - 'outputpath', 'password=', 'pipe=', 'port=', 'preserve', - 'server=', 'timeout=', 'show', 'stdin', 'stdout', 'template', + 'help', 'import=', 'import-filter-name=', 'listener', 'meta=', 'no-launch', + 'output=', 'outputpath', 'password=', 'pipe=', 'port=', 'preserve', + 'server=', 'timeout=', 'show', 'stdin', 'stdout', 'template', 'printer=', 'verbose', 'version'] ) except getopt.error as exc: print('unoconv: %s, try unoconv -h for a list of all the options' % str(exc)) @@ -574,7 +592,7 @@ print('Warning: Option %s cannot be parsed, ignoring.' % arg, file=sys.stderr) elif opt in ['-F', '--field']: l = arg.split('=') - self.fields[l[0]] = l[1] + self.fields[l[0]] = '='.join(l[1:]) elif opt in ['-f', '--format']: self.format = arg elif opt in ['-i', '--import']: @@ -594,8 +612,13 @@ self.importfilter.append( PropertyValue( name, 0, value, 0 ) ) else: print('Warning: Option %s cannot be parsed, ignoring.' % arg, file=sys.stderr) + elif opt in ['-I', '--import-filter-name']: + self.importfiltername = arg elif opt in ['-l', '--listener']: self.listener = True + elif opt in ['-M', '--meta']: + l = arg.split('=') + self.metadata[l[0]] = '='.join(l[1:]) elif opt in ['-n', '--no-launch']: self.nolaunch = True elif opt in ['-o', '--output']: @@ -628,6 +651,20 @@ elif opt in ['-V', '--version']: self.version() sys.exit(0) + elif opt in ['-P', '--printer']: + optKey, optValue = arg.split('=') + if optKey in ['PaperFormat']: + self.paperformat = optValue + self.setprinter = True + elif optKey in ['PaperOrientation']: + self.paperorientation = optValue.upper() + self.setprinter = True + elif optKey in ['PaperSize']: + intFunc = int if sys.version_info.major > 2 else long + size = list(map(lambda s: intFunc(s), optValue.split('x'))) + if (2 == len(size)): + self.papersize = size + self.setprinter = True ### Enable verbosity if self.verbose >= 2: @@ -695,33 +732,43 @@ print('''Convert from and to any format supported by LibreOffice unoconv options: - -c, --connection=string use a custom connection string - -d, --doctype=type specify document type - (document, graphics, presentation, spreadsheet) - -e, --export=name=value set export filter options - eg. -e PageRange=1-2 - -f, --format=format specify the output format - -F, --field=name=value replace user-defined text field with value - eg. -F Client_Name="Oracle" - -i, --import=string set import filter option string - eg. -i utf8 - -l, --listener start a permanent listener to use by unoconv clients - -n, --no-launch fail if no listener is found (default: launch one) - -o, --output=name output basename, filename or directory - --pipe=name alternative method of connection using a pipe - -p, --port=port specify the port (default: 2002) - to be used by client or listener - --password=string provide a password to decrypt the document - --preserve keep timestamp and permissions of the original document - -s, --server=server specify the server address (default: 127.0.0.1) - to be used by client or listener - --show list the available output formats - --stdin read from stdin (filenames are ignored if provided) - --stdout write output to stdout - -t, --template=file import the styles from template (.ott) - -T, --timeout=secs timeout after secs if connection to listener fails - -v, --verbose be more and more verbose (-vvv for debugging) - --version display version number of unoconv, OOo/LO and platform details + -c, --connection=string use a custom connection string + -d, --doctype=type specify document type + (document, graphics, presentation, spreadsheet) + -e, --export=name=value set export filter options + eg. -e PageRange=1-2 + -f, --format=format specify the output format + -F, --field=name=value replace user-defined text field with value + eg. -F Client_Name="Oracle" + -i, --import=string set import filter option string + eg. -i utf8 + -I, --import-filter-name=string set import filter name, useful when converting stdin + or files without an extension) + eg. -I ooxml + -l, --listener start a permanent listener to use by unoconv clients + -n, --no-launch fail if no listener is found (default: launch one) + -o, --output=name output basename, filename or directory + --pipe=name alternative method of connection using a pipe + -p, --port=port specify the port (default: 2002) + to be used by client or listener + --password=string provide a password to decrypt the document + --preserve keep timestamp and permissions of the original document + -s, --server=server specify the server address (default: 127.0.0.1) + to be used by client or listener + --show list the available output formats + --stdin read from stdin (filenames are ignored if provided) + --stdout write output to stdout + -t, --template=file import the styles from template (.ott) + -T, --timeout=secs timeout after secs if connection to listener fails + -v, --verbose be more and more verbose (-vvv for debugging) + --version display version number of unoconv, OOo/LO and platform details + -P, --printer printer options + PaperFormat: specify printer paper format + eg. -P PaperFormat=A3 + PaperOrientation: specify printer paper orientation + eg. -P PaperOrientation=landscape + PapserSize: specify printer paper size, paper format should set to USER, size=widthxheight + eg. -P PaperSize=130x200 means width=130, height=200 ''', file=sys.stderr) class Convertor: @@ -805,6 +852,17 @@ return unocontext + def getimportformat(self): + if op.doctype: + importformat = fmts.bydoctype(op.doctype, op.importfiltername) + else: + importformat = fmts.byname(op.importfiltername) + + if not importformat: + error('unoconv: import format [%s] is not known to unoconv.' % formatname) + + return importformat[0] + def getformat(self, inputfn): doctype = None @@ -837,9 +895,9 @@ ### No format found, throw error if not outputfmt: if doctype: - print('unoconv: format [%s/%s] is not known to unoconv.' % (op.doctype, op.format), file=sys.stderr) + error('unoconv: format [%s/%s] is not known to unoconv.' % (op.doctype, op.format), file=sys.stderr) else: - print('unoconv: format [%s] is not known to unoconv.' % op.format, file=sys.stderr) + error('unoconv: format [%s] is not known to unoconv.' % op.format, file=sys.stderr) die(1) return outputfmt @@ -874,9 +932,8 @@ ### Load inputfile inputprops = UnoProps(Hidden=True, ReadOnly=True, UpdateDocMode=QUIET_UPDATE) -# if op.password: -# info = UnoProps(algorithm-name="PBKDF2", salt="salt", iteration-count=1024, hash="hash") -# inputprops += UnoProps(ModifyPasswordInfo=info) + if op.password: + inputprops += UnoProps(Password=op.password) ### Cannot use UnoProps for FilterData property if op.importfilteroptions: @@ -887,6 +944,10 @@ if op.importfilter: inputprops += ( PropertyValue( "FilterData", 0, uno.Any("[]com.sun.star.beans.PropertyValue", tuple( op.importfilter ), ), 0 ), ) + if op.importfiltername: + importformat = self.getimportformat() + inputprops += UnoProps(FilterName=importformat.filter) + if op.stdin: inputStream = self.svcmgr.createInstanceWithContext("com.sun.star.io.SequenceInputStream", self.context) inputStream.initialize((uno.ByteSequence(inputfn),)) @@ -926,9 +987,9 @@ phase = "update-links" try: document.updateLinks() - # Found that when converting HTML files with external images, OO would only load five or six of - # the images in the file. In the resulting document, the rest of the images did not appear. Cycling - # through all the image references in the document seems to force OO to actually load them. Found + # Found that when converting HTML files with external images, OO would only load five or six of + # the images in the file. In the resulting document, the rest of the images did not appear. Cycling + # through all the image references in the document seems to force OO to actually load them. Found # some helpful guidance in this thread: # https://forum.openoffice.org/en/forum/viewtopic.php?f=30&t=23909 # Ideally we would like to have the option to embed the images into the document, but I have not been @@ -940,16 +1001,30 @@ # the document doesn't implement the XLinkUpdate interface pass - ### Replace variables + ### Add/Replace variables phase = "replace-fields" for f in op.fields: try: - field = document.TextFieldMasters.getByName("com.sun.star.text.fieldmaster.SetExpression.%s" % f) - field.DependentTextFields[0].setPropertyValue('Content', op.fields[f]) - except UnoException: - print("unoconv: failed to replace variable '%s' with value '%s' in the document." % (f, op.fields[f])) + field = document.TextFieldMasters.getByName("com.sun.star.text.fieldmaster.User.%s" % f) + field.setPropertyValue('Content', op.fields[f]) + except UnoException as e: + error("unoconv: failed to replace variable '%s' with value '%s' in the document." % (f, op.fields[f])) pass + ### Add/Replace metadata + phase = "replace-metadata" + props = document.getDocumentProperties() + user_props = props.getUserDefinedProperties() + for prop, value in op.metadata.items(): + for container in ( props, user_props ): + curr = getattr(container, prop, None) + if curr is not None: + setattr(container, prop, value) + break + else: + user_props.addProperty(prop, 0, '') + user_props.setPropertyValue(prop, value) + ### Update document indexes phase = "update-indexes" for ii in range(2): @@ -997,6 +1072,19 @@ elif outputfmt.filter == 'Text - txt - csv (StarCalc)': outputprops += UnoProps(FilterOptions="44,34,UTF8") + ### Set printer options + if op.setprinter: + printer = document.getPrinter() + for i in range(len(printer)): + if printer[i].Name == 'PaperOrientation' and op.paperorientation != None: + printer[i].Value = uno.Enum('com.sun.star.view.PaperOrientation', op.paperorientation) + elif printer[i].Name == 'PaperFormat' and op.paperformat != None: + printer[i].Value = uno.Enum('com.sun.star.view.PaperFormat', op.paperformat) + elif (printer[i].Name == 'PaperSize' and op.papersize != None and len(op.papersize) == 2): + printer[i].Value.Width = op.papersize[0] + printer[i].Value.Height = op.papersize[1] + document.setPrinter(printer) + ### Cannot use UnoProps for FilterData property if op.exportfilter: outputprops += ( PropertyValue( "FilterData", 0, uno.Any("[]com.sun.star.beans.PropertyValue", tuple( op.exportfilter ), ), 0 ), ) @@ -1094,13 +1182,34 @@ info(1, "Existing %s listener found, nothing to do." % product.ooName) return if product.ooName != "LibreOffice" or LooseVersion(product.ooSetupVersion) <= LooseVersion('3.3'): - subprocess.call([office.binary, "-headless", "-invisible", "-nocrashreport", "-nodefault", "-nologo", "-nofirststartwizard", "-norestore", "-accept=%s" % op.connection], env=os.environ) + cmd = [office.binary, "-headless", "-invisible", "-nocrashreport", "-nodefault", "-nologo", "-nofirststartwizard", "-norestore", "-accept=%s" % op.connection] + else: + cmd = [office.binary, "--headless", "--invisible", "--nocrashreport", "--nodefault", "--nologo", "--nofirststartwizard", "--norestore", "--accept=%s" % op.connection] + + # The rationale for using subprocess.Popen is to be able to handle + # a SIGTERM signal below and properly terminate the started office + # process then. This makes it possible to put the command unoconv -l + # under control of supervisor to deamonize it. Supervisor terminates + # via sending SIGTERM and sending SIGTERM to a running unoconv -l + # without the handler below will not terminate the office process + # together with it leaving the office process running. + office_process = subprocess.Popen(cmd, env=os.environ) + + def sigterm_handler(signum, frame): + office_process.terminate() + die(6, 'Exiting on SIGTERM') + + signal.signal(signal.SIGTERM, sigterm_handler) + + ret = office_process.wait() + if ret == 81: + info(1, "Restarting %s (first start - 81 exit code)" % product.ooName) + office_process = subprocess.Popen(cmd, env=os.environ) + office_process.wait() else: - subprocess.call([office.binary, "--headless", "--invisible", "--nocrashreport", "--nodefault", "--nologo", "--nofirststartwizard", "--norestore", "--accept=%s" % op.connection], env=os.environ) + raise Exception("%s crashed - exit code: %s" % (product.ooName, ret)) except Exception as e: error("Launch of %s failed.\n%s" % (office.binary, e)) - else: - info(1, "Existing %s listener found, nothing to do." % product.ooName) def error(msg): "Output error message" @@ -1182,7 +1291,12 @@ listener = Listener() if op.stdin: - inputfn = sys.stdin.read() + ### Read stdin buffer in Python 3 in order to correctly handle binary streams + ### ref: https://docs.python.org/3.1/library/sys.html#sys.stdin + if sys.version_info.major > 2: + inputfn = sys.stdin.buffer.read() + else: + inputfn = sys.stdin.read() convertor = Convertor() convertor.convert(inputfn) elif op.filenames: