summaryrefslogtreecommitdiff
path: root/textproc
diff options
context:
space:
mode:
authornia <nia@pkgsrc.org>2022-03-06 09:29:28 +0000
committernia <nia@pkgsrc.org>2022-03-06 09:29:28 +0000
commitdeeee491173e2a288067e5d3cc68eeecb2d5823f (patch)
tree9ca87ab7c5397460d0c59ea732749807a997a52a /textproc
parent16d75abd2d919f1114206a47c2dabd4530bcd8e9 (diff)
downloadpkgsrc-deeee491173e2a288067e5d3cc68eeecb2d5823f.tar.gz
textproc: add lua-ftcsv
ftcsv is a fast csv library written in pure Lua. It features two parsing modes, one for CSVs that can easily be loaded into memory (up to a few hundred MBs depending on the system), and another for loading files using an iterator - useful for manipulating large files or processing during load. It correctly handles most csv (and csv-like) files found in the wild, from varying line endings (Windows, Linux, and OS9), UTF-8 BOM support, and odd delimiters. There are also various options that can tweak how a file is loaded, only grabbing a few fields, renaming fields, and parsing header-less files!
Diffstat (limited to 'textproc')
-rw-r--r--textproc/Makefile3
-rw-r--r--textproc/lua-ftcsv/DESCR13
-rw-r--r--textproc/lua-ftcsv/Makefile28
-rw-r--r--textproc/lua-ftcsv/PLIST2
-rw-r--r--textproc/lua-ftcsv/distinfo5
5 files changed, 50 insertions, 1 deletions
diff --git a/textproc/Makefile b/textproc/Makefile
index cc6a50c79c9..96ca64f2e7d 100644
--- a/textproc/Makefile
+++ b/textproc/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.1294 2022/02/27 21:09:09 pin Exp $
+# $NetBSD: Makefile,v 1.1295 2022/03/06 09:29:28 nia Exp $
#
COMMENT= Text processing utilities (does not include desktop publishing)
@@ -494,6 +494,7 @@ SUBDIR+= lua-cosmo
SUBDIR+= lua-dkjson
SUBDIR+= lua-etlua
SUBDIR+= lua-expat
+SUBDIR+= lua-ftcsv
SUBDIR+= lua-inifile
SUBDIR+= lua-lustache
SUBDIR+= lua-lyaml
diff --git a/textproc/lua-ftcsv/DESCR b/textproc/lua-ftcsv/DESCR
new file mode 100644
index 00000000000..633f241ae56
--- /dev/null
+++ b/textproc/lua-ftcsv/DESCR
@@ -0,0 +1,13 @@
+ftcsv is a fast csv library written in pure Lua.
+
+It features two parsing modes, one for CSVs that can easily be loaded into
+memory (up to a few hundred MBs depending on the system), and another for
+loading files using an iterator - useful for manipulating large files or
+processing during load.
+
+It correctly handles most csv (and csv-like) files found in the wild, from
+varying line endings (Windows, Linux, and OS9), UTF-8 BOM support, and odd
+delimiters.
+
+There are also various options that can tweak how a file is loaded, only
+grabbing a few fields, renaming fields, and parsing header-less files!
diff --git a/textproc/lua-ftcsv/Makefile b/textproc/lua-ftcsv/Makefile
new file mode 100644
index 00000000000..e7784dfd6ac
--- /dev/null
+++ b/textproc/lua-ftcsv/Makefile
@@ -0,0 +1,28 @@
+# $NetBSD: Makefile,v 1.1 2022/03/06 09:29:28 nia Exp $
+
+DISTNAME= ftcsv-1.2.1
+PKGNAME= ${LUA_PKGPREFIX}-${DISTNAME}
+CATEGORIES= textproc lua
+MASTER_SITES= ${MASTER_SITE_GITHUB:=FourierTransformer/}
+GITHUB_PROJECT= ftcsv
+
+MAINTAINER= pkgsrc-users@NetBSD.org
+HOMEPAGE= https://github.com/FourierTransformer/ftcsv
+COMMENT= Fast csv library written in pure Lua
+LICENSE= mit
+
+TEST_DEPENDS+= ${LUA_PKGPREFIX}-cjson-[0-9]*:../../textproc/lua-cjson
+
+NO_BUILD= yes
+USE_LANGUAGES= # none
+
+LUA_USE_BUSTED= yes
+
+INSTALLATION_DIRS+= ${LUA_LDIR}
+
+do-install:
+ ${INSTALL_LIB} ${WRKSRC}/ftcsv.lua \
+ ${DESTDIR}${PREFIX}/${LUA_LDIR}
+
+.include "../../lang/lua/module.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/textproc/lua-ftcsv/PLIST b/textproc/lua-ftcsv/PLIST
new file mode 100644
index 00000000000..3dd06c4fd30
--- /dev/null
+++ b/textproc/lua-ftcsv/PLIST
@@ -0,0 +1,2 @@
+@comment $NetBSD: PLIST,v 1.1 2022/03/06 09:29:28 nia Exp $
+${LUA_LDIR}/ftcsv.lua
diff --git a/textproc/lua-ftcsv/distinfo b/textproc/lua-ftcsv/distinfo
new file mode 100644
index 00000000000..a55fefac617
--- /dev/null
+++ b/textproc/lua-ftcsv/distinfo
@@ -0,0 +1,5 @@
+$NetBSD: distinfo,v 1.1 2022/03/06 09:29:28 nia Exp $
+
+BLAKE2s (ftcsv-1.2.1.tar.gz) = b6744c68c334c434ba1fc2b0f4e84c4c3b2168b30c30e835ead70d30bbe7f985
+SHA512 (ftcsv-1.2.1.tar.gz) = 9771d39b3ef4417657e259e5fd9cc063142750b547ff2c6c97f3fe51ba6e10349ebee0563225416aa6bd8b447fca057d80e83f5cd18bab6c96a47db79f465dc6
+Size (ftcsv-1.2.1.tar.gz) = 18195 bytes