Subject: [PATCH] WIP libxsl
From: Catonano <[email-masked]>
To: [email-masked]
Date: Mon, 3 Apr 2017 00:12:16 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

The tests don't work and I don't know which bsd license this thing has.
Please help

This library read excel files.

One can write the results in csv format or maybe populate a database.

It provides an example command that prints in csv. I tested it with a
multisheet .xsl document and it worked.

It printed the first line of a sheet along the last line of the previous
one, no separation.

It can provide a list of sheets, so one is supposed to list the sheets,
then extract then one at a time and print them separately by oneself.

Also it doesn't deal with the excel datetime format, which can be
frustrating.
From 53e7212b6b4612532f2784fe94056a063749e1cd Mon Sep 17 00:00:00 2001
From: humanitiesNerd <[email-masked]>
Date: Mon, 27 Mar 2017 17:53:56 +0200
Subject: [PATCH] gnu: Add libxsl

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

diff --git a/gnu/packages/xml.scm b/gnu/packages/xml.scm
index bd2748287..6c3ae4913 100644
--- a/gnu/packages/xml.scm
+++ b/gnu/packages/xml.scm
@@ -14,6 +14,7 @@
 ;;; Copyright © 2016 ng0 <[email-masked]>
 ;;; Copyright © 2016 Tobias Geerinckx-Rice <[email-masked]>
 ;;; Copyright © 2016, 2017 Marius Bakke <[email-masked]>
+;;; Copyright © 2017 humanitiesNerd <[email-masked]>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -1085,3 +1086,39 @@ XSLT and EXSLT.")
 XLSM) 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+)))
+
+(define-public libxsl
+  (package
+    (name "libxsl")
+    (version "1.4.0")
+    (source (origin
+              (method url-fetch/zipbomb)
+              (uri (string-append "https://sourceforge.net/projects/"
+                                  name "/files/" name "-"
+                                  version ".zip"))
+              (sha256
+               (base32
+                "1g8ds7wbhsa4hdcn77xc2c0l3vvz5bx2hx9ng9c9n7aii92ymfnk"))))
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-before
+          'configure 'pre-conigure
+          (lambda* (#:key inputs #:allow-other-keys)
+            (chdir "libxls"))))
+       ;; this causes the command xls2csv to be named libxls2csv.
+       ;; In this way it won't conlict with a python based
+       ;; command by the same name, should a user install both
+       #:configure-flags '("--program-prefix" "lib")
+       ;; tests fail because a "test-driver" file is missing
+       ;; reported here
+       ;; https://sourceforge.net/p/libxls/discussion/294119/thread/4b5ce0d8/
+       #:tests? #f))
+    (build-system gnu-build-system)
+    (home-page "http://libxls.sourceforge.net/")
+    (synopsis "Reads excel files. It doesn't write them")
+    (description
+     "A C library which can read Excel (xls) files
+since Excel 97 (the BIFF8 format).
+libxls cannot write Excel files.")
+    (license license:bsd-3))) ;or bsd-2 ? Or bsd-4 ? I don't know
-- 
2.12.0