diff --git a/Dockerfile b/Dockerfile index 4d1dd52..9c1e3ee 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,7 +3,7 @@ LABEL maintainer="sombochea@cubetiqs.com" VOLUME [ "/app/data" ] -ENV INPUT_FILE './data/people.xlsx' +ENV INPUT_FILE './data/source.xlsx' ENV OUTPUT_PATH './data/outputs' ENV MAPPER_FILE './data/mapper.json' diff --git a/README.md b/README.md index 89d7f57..0b30aac 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,13 @@ # excel2json - [![Node.js Package](https://github.com/CUBETIQ/excel2json/actions/workflows/npm-publish.yml/badge.svg)](https://github.com/CUBETIQ/excel2json/actions/workflows/npm-publish.yml) [![Docker CI](https://github.com/CUBETIQ/excel2json/actions/workflows/docker-publish.yml/badge.svg)](https://github.com/CUBETIQ/excel2json/actions/workflows/docker-publish.yml) +![Docker Image Size (latest by date)](https://img.shields.io/docker/image-size/cubetiq/excel2json) +![Docker Pulls](https://img.shields.io/docker/pulls/cubetiq/excel2json) - Read file excel to json - Custom mapping with custom columns and configs - Custom props +- Docker suppport # Install ```shell @@ -21,7 +23,21 @@ yarn add global excel2json-xlsx ``` Usage ```shell -excel2json-xlsx -i people.xlsx -o exported.json +excel2json-xlsx -i source.xlsx -o exported.json +``` +OR +```shell +npx excel2json -i source.xlsx -o exported.json +``` + +# [Docker Hub](https://hub.docker.com/r/cubetiq/excel2json) +***Pulling image*** +```shell +docker pull cubetiq/excel2json +``` +***Run container*** +```shell +docker run --rm -it -v /my/path/data:/app/data cubetiq/excel2json -i ./data/source.xlsx -p true ``` # Build diff --git a/data/people.xlsx b/data/source.xlsx similarity index 100% rename from data/people.xlsx rename to data/source.xlsx diff --git a/index.js b/index.js index 9afff12..1f9f5bd 100644 --- a/index.js +++ b/index.js @@ -3,7 +3,7 @@ const excel2json = require("./excel2json"); // called function export excel2json const exported = excel2json({ - inputFile: "./data/people.xlsx" + inputFile: "./data/source.xlsx" }); // output data from exported