guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] gnu: add xlsx2csv.


From: Jan Nieuwenhuizen
Subject: Re: [PATCH] gnu: add xlsx2csv.
Date: Thu, 11 Aug 2016 14:11:16 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

Ben Woodcroft writes:

Hi!

> Thanks for the package. I built it and used it to convert a file of
> mine, it seemed to work.

Good!

> However, I note that while the check phase passes, many of the tests
> are reported as being failed. Could you look into it?

That's trying to run them with non-installed python versions.  Patched
the test script to only use `python.'

>> +    (propagated-inputs
>> +     `(("expat" ,expat)))
> I removed this input and could still use the built package. Is it necessary?

Apparently not: Removed.

>> +    (synopsis "xlsx to csv converter")
>> +    (description
>> +     "Xls2csv converts xslx files to csv format.  Handles large
>> xlsx-files.")

> How about "Xlsx2csv is a program to convert Open Office XML (XLSX)
> format spreadsheets into plaintext @dfn{comma separated values} (CSV)
> files.  It was designed to be fast and to handle large input files."

Better, thanks.

> I think xml.scm might be a better home for this one.

Done.

Thanks!  Greetings,
Jan

>From 38922f282ea054eda572d575272bd91539ba53bc Mon Sep 17 00:00:00 2001
From: Jan Nieuwenhuizen <address@hidden>
Date: Wed, 13 Jul 2016 14:46:33 +0200
Subject: [PATCH] gnu: Add xlsx2csv.

* gnu/packages/xml.scm (xlsx2csv): New variable.
---
 gnu/packages/xml.scm | 33 +++++++++++++++++++++++++++++++++
 1 file changed, 33 insertions(+)

diff --git a/gnu/packages/xml.scm b/gnu/packages/xml.scm
index e97a0b0..74f5457 100644
--- a/gnu/packages/xml.scm
+++ b/gnu/packages/xml.scm
@@ -9,6 +9,7 @@
 ;;; Copyright © 2015 Raimon Grau <address@hidden>
 ;;; Copyright © 2016 Mathieu Lirzin <address@hidden>
 ;;; Copyright © 2016 Leo Famulari <address@hidden>
+;;; Copyright © 2016 Jan Nieuwenhuizen <address@hidden>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -741,3 +742,35 @@ used to transform, query, validate, and edit XML 
documents.  XPath is used to
 match and extract data, and elements can be added, deleted or modified using
 XSLT and EXSLT.")
    (license license:x11)))
+
+(define-public xlsx2csv
+  (package
+    (name "xlsx2csv")
+    (version "0.7.2")
+    (source (origin
+             (method url-fetch)
+             (uri (string-append
+                   "https://github.com/dilshod/";
+                   name "/archive/release/" version ".tar.gz"))
+             (file-name (string-append name "-" version ".tar.gz"))
+             (sha256
+              (base32
+               "1gpn6kaa7l1ai8c9zx2j3acf04bvxq79pni8jjfjrk01smjbyyql"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:python ,python-2
+       #:phases
+       (modify-phases %standard-phases
+         (replace 'check
+           (lambda _
+             (substitute* "test/run"
+               ;; Run tests with `python' only
+               (("^(PYTHON_VERSIONS = ).*" all m) (string-append m "['']")))
+             (zero? (system* "test/run")))))))
+    (home-page "https://github.com/dilshod/xlsx2csv";)
+    (synopsis "xlsx to csv converter")
+    (description
+     "Xlsx2csv is a program to convert Open Office XML (XLSX) format
+spreadsheets into plaintext @dfn{comma separated values} (CSV) files.  It is
+designed to be fast and to handle large input files.")
+    (license license:gpl2+)))
-- 
2.9.2

-- 
Jan Nieuwenhuizen <address@hidden> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar®  http://AvatarAcademy.nl  

reply via email to

[Prev in Thread] Current Thread [Next in Thread]