commit 51a251ceaf2247b63e433dd08457276bb4cd830c
parent 0aace049268b99d6ba1046748c110c68fc418109
Author: Nikolay Korotkiy <sikmir@gmail.com>
Date: Sat, 28 Nov 2020 22:00:33 +0300
Add docx2csv
Diffstat:
3 files changed, 32 insertions(+), 0 deletions(-)
diff --git a/nix/sources.json b/nix/sources.json
@@ -97,6 +97,20 @@
"url": "https://github.com/byrnedo/docker-reg-tool/archive/c5e7ff63fa476cac1eed717d0aef238beb50c21c.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
},
+ "docx2csv": {
+ "branch": "master",
+ "builtin": false,
+ "date": "2020-05-05T21:11:02Z",
+ "description": "Extracts tables from .docx files and saves them as .csv or .xls files",
+ "homepage": "https://github.com/ivbeg/docx2csv",
+ "owner": "ivbeg",
+ "repo": "docx2csv",
+ "rev": "e397b6bd17c73d76b21404ce3422496b8da262db",
+ "sha256": "0n0h9wc8jqaqpi7cdv8692af5mwy9djgmrhwicb2f8917idj0pzf",
+ "type": "tarball",
+ "url": "https://github.com/ivbeg/docx2csv/archive/e397b6bd17c73d76b21404ce3422496b8da262db.tar.gz",
+ "url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
+ },
"elevation": {
"branch": "master",
"builtin": false,
diff --git a/pkgs/default.nix b/pkgs/default.nix
@@ -141,6 +141,7 @@ lib.makeScope newScope (
csvtools = callPackage ./tools/text/csvtools { };
datamaps = callPackage ./tools/geo/datamaps { };
docker-reg-tool = callPackage ./tools/docker-reg-tool { };
+ docx2csv = callPackage ./tools/text/docx2csv { };
elevation = callPackage ./tools/geo/elevation {
click = click-6-7;
};
diff --git a/pkgs/tools/text/docx2csv/default.nix b/pkgs/tools/text/docx2csv/default.nix
@@ -0,0 +1,17 @@
+{ lib, python3Packages, sources }:
+
+python3Packages.buildPythonApplication {
+ pname = "docx2csv-unstable";
+ version = lib.substring 0 10 sources.docx2csv.date;
+
+ src = sources.docx2csv;
+
+ propagatedBuildInputs = with python3Packages; [ click openpyxl python-docx xlwt ];
+
+ meta = with lib; {
+ inherit (sources.docx2csv) description homepage;
+ license = licenses.bsd3;
+ maintainers = [ maintainers.sikmir ];
+ platforms = platforms.unix;
+ };
+}