ShoppinPal / vend-tools

A command-line-interface (CLI) which allows you to easily perform custom tasks for your vendhq.com instance
http://shoppinpal.github.io/vend-tools/
GNU General Public License v2.0
3 stars 3 forks source link

path for export file #3

Closed elbrando closed 9 years ago

elbrando commented 9 years ago

Would be nice to specify once where the file should be saved rather than it being dropped in the working folder.

elbrando commented 9 years ago

File name, too, please.

pulkitsinghal commented 9 years ago

Ok I will add and --output option and just to make things a bit easier, also add an -o alias for shorthand. Leaving a dev reference for myself or whomever else wants to finish this feature before me: http://vdemedes.github.io/ronin/guides/options/

pulkitsinghal commented 9 years ago

Introducing a new settings.json file:

{
  "defaultOutputDirectory": "/Users/pulkitsinghal/Dropbox/vend-tools",
  "timestampFiles": false
}

With such a config ... running: $ vend-tools fetch-product-by-sku --sku 100

Throws the data into: /Users/pulkitsinghal/Dropbox/vend-tools/fetch-product-by-sku.json which is a predictable filename in a shared directory ... I wonder if that's good enough or if a custom output filename is still a worthy add-on?

pulkitsinghal commented 9 years ago

@elbrando reported that files with *.csv extensions don't follow the rules like the *.json ones! will fix soon