debian/0000755000000000000000000000000012154011543007162 5ustar debian/clean0000644000000000000000000000001012154011543010156 0ustar man/*.1 debian/watch0000644000000000000000000000007512154011543010215 0ustar # No released archives. See debian/copyright for VCS access. debian/rules0000755000000000000000000000062312154011543010243 0ustar #!/usr/bin/make -f PACKAGE = xlsx2csv URL = git://github.com/dilshod/xlsx2csv.git UPSTREAMDIR = ../upstream.git man: $(MAKE) -C man -f pod2man.mk PACKAGE=$(PACKAGE) makeman override_dh_installman: man dh_installman override_dh_auto_install: install -m 755 -D xlsx2csv.py \ $(CURDIR)/debian/$(PACKAGE)/usr/bin/$(PACKAGE) %: dh $@ --with python2 .PHONY: get-vcs-changelog man # End of file debian/changelog0000644000000000000000000000025412154011543011035 0ustar xlsx2csv (0.20+20121013+gitfa44ba6-1) unstable; urgency=low * Initial release (Closes: #690354). -- Jari Aalto Wed, 05 Jun 2013 20:05:29 +0300 debian/patches/0000755000000000000000000000000012154011543010611 5ustar debian/patches/series0000644000000000000000000000002512154011543012023 0ustar 10-eol-handler.patch debian/patches/10-eol-handler.patch0000644000000000000000000000247412154011543014251 0ustar From: Jari Aalto Subject: Use sensible EOL terminator according to OS Forwared: https://github.com/dilshod/xlsx2csv/issues/31 --- xlsx2csv.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) --- a/xlsx2csv.py +++ b/xlsx2csv.py @@ -22,11 +22,17 @@ __author__ = "Dilshod Temirkhodjaev " __license__ = "GPL-2+" -import csv, datetime, zipfile, sys, os +import csv, datetime, zipfile, sys, os, re import xml.parsers.expat from xml.dom import minidom from optparse import OptionParser +EOL = "\n" + +# example: ProgramData=C:\ProgramData +if os.environ.get("ProgramData",None): + EOL = "\r\n" + # see also ruby-roo lib at: http://github.com/hmcgowan/roo FORMATS = { 'general' : 'float', @@ -132,7 +138,7 @@ else: for s in workbook.sheets: if sheetdelimiter != "": - outfile.write(sheetdelimiter + " " + str(s['id']) + " - " + s['name'].encode('utf-8') + "\r\n") + outfile.write(sheetdelimiter + " " + str(s['id']) + " - " + s['name'].encode('utf-8') + EOL) sheet = Sheet(workbook, shared_strings, styles, ziphandle.read("xl/worksheets/sheet%i.xml" %s['id'])) sheet.set_dateformat(dateformat) sheet.set_skip_empty_lines(skip_empty_lines) debian/docs0000644000000000000000000000000712154011543010032 0ustar README debian/source/0000755000000000000000000000000012154011543010462 5ustar debian/source/format0000644000000000000000000000001412154011543011670 0ustar 3.0 (quilt) debian/compat0000644000000000000000000000000212154011543010360 0ustar 9 debian/copyright0000644000000000000000000000242612154011543011121 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0 X-Format: http://dep.debian.net/deps/dep5 Upstream-Name: xlsx2csv Upstream-Contact: Dilshod Temirkhodjaev Source: https://github.com/dilshod/xlsx2csv X-Upstream-Vcs: https://github.com/dilshod/xlsx2csv X-Upstream-Bugs: https://github.com/dilshod/xlsx2csv/issues Files: * Copyright: 2010-2012 Dilshod Temirkhodjaev License: GPL-2+ Files: debian/* Copyright: 2013 Jari Aalto License: GPL-2+ License: GPL-2+ This package is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. . This package is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. . You should have received a copy of the GNU General Public License along with this program. If not, see . . On Debian systems, the complete text of the GNU General Public License can be found in "/usr/share/common-licenses/GPL-2". debian/manpages0000644000000000000000000000001012154011543010667 0ustar man/*.1 debian/control0000644000000000000000000000153412154011543010570 0ustar Source: xlsx2csv Section: text Priority: optional Maintainer: Jari Aalto Build-Depends: debhelper (>= 9), python | python-all | python-dev | python-all-dev Standards-Version: 3.9.4 Homepage: https://github.com/dilshod/xlsx2csv Vcs-Git: git://anonscm.debian.org/collab-maint/xlsx2csv.git Vcs-Browser: http://anonscm.debian.org/gitweb/?p=collab-maint/xlsx2csv.git;a=summary Package: xlsx2csv Architecture: all Depends: ${misc:Depends}, ${python:Depends} Description: convert xslx files to csv format xlsx files are zip archives where spreadsheet data is stored. In order to process a file, various bits inside the archive need to be located. This utility uses the Expat SAX parser to collect the strings into a simple dictionary, keyed by their relative position in the XML file. This makes it possible to process files of any size.