Giter Site home page Giter Site logo

Comments (11)

Metastasis avatar Metastasis commented on July 23, 2024 1

@Siemienik Ok, sounds good. Then rest part of the issue I think is clear

from xtoolset.

Metastasis avatar Metastasis commented on July 23, 2024

@Siemienik
Could you describe a little bit this issue?

  1. What args should be?
  2. Is this supposed to be implemented via "bin" in package.json?
  3. Do you have any preferences over CLI framework or it could be any? I prefer cac. I think it simple enough and will suite our needs

from xtoolset.

Siemienik avatar Siemienik commented on July 23, 2024

I'm going to describe it for todo in next week (after version2.3.2published).
It will be similar to: https://github.com/Siemienik/xlsx-renderer/issues/25 done in Siemienik/xlsx-renderer-cli#1 (it's stuck because commander isn't test friendly :/)

If are you looking for something todo, may take care about finishing Siemienik/xlsx-renderer-cli#1 ?

What args should be?

not described yet, however I have some ideas

Is this supposed to be implemented via "bin" in package.json?

I consider about one of two way,

  • monorepo (provided via bin)
  • external repo xlsx-import-cli

in NPM I have reserved package sxi for this tool.

Do you have any preferences over CLI framework or it could be any? I prefer cac. I think it simple enough and will suite our needs

No, however I want to keep 100% test coverage - it will be nice to used tool allow testing without full pack of pain. (what I investigated, https://github.com/oclif/oclif is test friendly)

from xtoolset.

Siemienik avatar Siemienik commented on July 23, 2024
# basic
cat invoice.xlsx > sxi config.js > result.json
sxi config.js invoice.xlsx > result.json
sxi -o result.json config.js invoice.xlsx 

#more advanced (todo)
cat invoice.xlsx > sxi config.js | sxr template.xlsx > refreshed-invoice.xlsx

OUTDATED: DRAFT reason: I've just realized that, config may contains value mapper that do not works in a json file. Have to invastigate / write a prototyp.

from xtoolset.

Siemienik avatar Siemienik commented on July 23, 2024

DRAFT reason: I've just realized that, config may contains value mapper that do not works in a json file. Have to invastigate / write a prototyp.

This should not be a problem after #31

from xtoolset.

Siemienik avatar Siemienik commented on July 23, 2024

I change it from Draft to Proposal, because to mamy thing should happen before we may start doing it.

However this issue is quite important imo.

from xtoolset.

Siemienik avatar Siemienik commented on July 23, 2024

DRAFT reason: I've just realized that, config may contains value mapper that do not works in a json file. Have to invastigate / write a prototyp.

This will not be a problem when import-cfg.json will be replaced by JS file : import-cfg.js wich exports default config.

from xtoolset.

Siemienik avatar Siemienik commented on July 23, 2024

@Metastasis WDYT? should I describe something more for this issue?

from xtoolset.

Metastasis avatar Metastasis commented on July 23, 2024

@Siemienik In examples folder we used configs declared both in ts and js files. Does CLI have to support ts files?

Also what about json files? We just ignore them for now?

from xtoolset.

Siemienik avatar Siemienik commented on July 23, 2024

Also what about json files? We just ignore them for now?

I think json files will works like js one but without mappers. (json is much more secure than js file. From the other side, js file has possibility to make config dynamically). I consider about moving json file supporting to new issue.

Does CLI have to support ts files?

Imo, this should be another one issue and will analyse it separately.

WDYT?

EDIT:

I added points into "After" section.

from xtoolset.

Siemienik avatar Siemienik commented on July 23, 2024

Xlsx-import-cli v0.0.1-alpha1 released! Feel welcome to test alpha version 🚀

from xtoolset.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.