* bug#26344: [PATCH] WIP libxsl
@ 2017-04-02 22:12 Catonano
2017-04-10 7:11 ` Catonano
0 siblings, 1 reply; 3+ messages in thread
From: Catonano @ 2017-04-02 22:12 UTC (permalink / raw)
To: 26344
[-- Attachment #1.1: Type: text/plain, Size: 615 bytes --]
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.
[-- Attachment #1.2: Type: text/html, Size: 774 bytes --]
[-- Attachment #2: serries.patch --]
[-- Type: text/x-patch, Size: 2468 bytes --]
From 53e7212b6b4612532f2784fe94056a063749e1cd Mon Sep 17 00:00:00 2001
From: humanitiesNerd <catonano@gmail.com>
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 <ng0@we.make.ritual.n0.is>
;;; Copyright © 2016 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2016, 2017 Marius Bakke <mbakke@fastmail.com>
+;;; Copyright © 2017 humanitiesNerd <catonano@gmail.com>
;;;
;;; 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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* bug#26344: [PATCH] WIP libxsl
2017-04-02 22:12 bug#26344: [PATCH] WIP libxsl Catonano
@ 2017-04-10 7:11 ` Catonano
2017-04-13 11:13 ` Ricardo Wurmus
0 siblings, 1 reply; 3+ messages in thread
From: Catonano @ 2017-04-10 7:11 UTC (permalink / raw)
To: 26344
[-- Attachment #1.1: Type: text/plain, Size: 200 bytes --]
2017-04-03 0:12 GMT+02:00 Catonano <catonano@gmail.com>:
> The tests don't work and I don't know which bsd license this thing has.
> Please help
>
>
Ok, so this is Ricardo's version. Thanks, Ricardo
[-- Attachment #1.2: Type: text/html, Size: 626 bytes --]
[-- Attachment #2: new-libxsl.patch --]
[-- Type: text/x-patch, Size: 2283 bytes --]
From c03ae1485da44ac75333f5c6dd1eef986cf8a167 Mon Sep 17 00:00:00 2001
From: humanitiesNerd <catonano@gmail.com>
Date: Mon, 10 Apr 2017 08:43:36 +0200
Subject: [PATCH] gnu: Add libxsl
* gnu/packages/xml.scm (libxls): 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 283d5112a..97bae98d1 100644
--- a/gnu/packages/xml.scm
+++ b/gnu/packages/xml.scm
@@ -39,6 +39,7 @@
#:use-module (gnu packages python)
#:use-module (gnu packages tls)
#:use-module (gnu packages web)
+ #:use-module (gnu packages zip)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix packages)
#:use-module (guix download)
@@ -1089,3 +1090,39 @@ files. It is designed to be fast and to handle large input files.")
(define-public python2-defusedxml
(package-with-python2 python-defusedxml))
+
+
+(define-public libxls
+ (package
+ (name "libxls")
+ (version "1.4.0")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "https://sourceforge.net/projects/"
+ name "/files/" name "-"
+ version ".zip"))
+ (sha256
+ (base32
+ "1g8ds7wbhsa4hdcn77xc2c0l3vvz5bx2hx9ng9c9n7aii92ymfnk"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'bootstrap
+ (lambda _
+ (zero? (system* "bash" "bootstrap"))))))
+ ;; this causes the command xls2csv to be named libxls2csv.
+ ;; In this way it won't conflict with a python
+ ;; command by the same name, should a user install both
+ #:configure-flags '("--program-prefix" "lib"))
+ (native-inputs
+ `(("unzip" ,unzip)
+ ("autoconf" ,autoconf)
+ ("automake" ,automake)
+ ("libtool" ,libtool)))
+ (home-page "http://libxls.sourceforge.net/")
+ (synopsis "libxls reads excel files. It doesn't write them")
+ (description
+ "libxls is a C library which can read Excel (xls) files since Excel 97 (the BIFF8 format).
+libxls cannot write Excel files.")
+ (license license:bsd-2)))
--
2.12.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* bug#26344: [PATCH] WIP libxsl
2017-04-10 7:11 ` Catonano
@ 2017-04-13 11:13 ` Ricardo Wurmus
0 siblings, 0 replies; 3+ messages in thread
From: Ricardo Wurmus @ 2017-04-13 11:13 UTC (permalink / raw)
To: Catonano; +Cc: 26344-done
Catonano <catonano@gmail.com> writes:
> 2017-04-03 0:12 GMT+02:00 Catonano <catonano@gmail.com>:
>
>> The tests don't work and I don't know which bsd license this thing has.
>> Please help
>>
>>
> Ok, so this is Ricardo's version. Thanks, Ricardo
I pushed a modified version to master with commit
ca8f3f9a510705a99f5f4a6b66c24c9e44a98d7d.
I removed the configure flags because I haven’t seen any tool of a
conflicting name in my store. If users find conflicts with tools they
should rather use separate profiles.
I also added a comment to explain why the bootstrapping is required, and
I changed the synopsis and description slightly.
Thanks for the contribution!
--
Ricardo
GPG: BCA6 89B6 3655 3801 C3C6 2150 197A 5888 235F ACAC
https://elephly.net
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-04-13 11:14 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-04-02 22:12 bug#26344: [PATCH] WIP libxsl Catonano
2017-04-10 7:11 ` Catonano
2017-04-13 11:13 ` Ricardo Wurmus
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.