Socket
Socket
Sign inDemoInstall

@matt-riley/cvcsv-cli

Package Overview
Dependencies
5
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @matt-riley/cvcsv-cli

[![Language grade: JavaScript](https://img.shields.io/lgtm/grade/javascript/g/matt-riley/cvcsv-cli.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/matt-riley/cvcsv-cli/context:javascript)


Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

Language grade: JavaScript

cvcsv-cli

This is a tool to make the process of creating the bulk import CSV file for Google Clouds Vision Product Search API a little easier.

Here is the documentation for the formatting the CSV.

Prerequisites

  • Node

  • The data should be organised as follows:

    .
    ├── kitkat
    │   └── chunky
    │       ├── peanut_butter
    │       │   ├── 01.jpg
    │       │   ├── 02.jpg
    │       ├── plain
    │       │   ├── 01.jpg
    │       │   ├── 02.jpg
    │       ├── salted_caramel
    │       │   ├── 01.jpg
    │       │   ├── 02.jpg
    │       │   ├── 03.jpg
    │       └── white
    │           └── 01.png
    

How to use

npm i -g @matt-riley/cvcsv-cli

Note: The package is published to Github Package Registry follow these instructions in order to be able to install this package and others from there.

Then once the package has been installed:

cvcsv

The CLI will then ask a few questions relating to the data, i.e. where it is, the GCP bucket name, etc.

The output file will be created in the directory that you provide as the source of the images you wish to add to the csv.

asciicast

Config File

The CLI will read a config file from within the directory that it is executed.

The file should be named .cvcsvrc and the structure is as follows:

{
  "bucketName": "the-name-of-the-gs-bucket-the-sample-images-are-stored",
  "csvFileLocation": "where-you-would-like-to-save-the-csv-file",
  "csvFilename": "the-name-of-the-file.csv",
  "productCategory": "any-of-the-product-categories-GCP-CV-has",
  "productSet": "the-name-of-your-product-set",
  "rootDirectory": "the-root-directory-of-your-images"
}

You can complete the whole file or you can miss any of the fields out, the CLI will ask you for any that are missing.

If not file is there then you will get the full set of questions.

TODO

  • Improve the tests.
  • Add to my personal Homebrew tap to make updates/upgrades easier to manage.
  • Confirmation screen.

FAQ

Why isn't this just published to NPM like everything else?

Well for a start there is this and this.

FAQs

Last updated on 23 Sep 2019

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc