kishaningithub / shopify-csv-download

Download a shopify site in a csv format that the shopify importer understands
MIT License
56 stars 9 forks source link
go golang hacktoberfest

shopify csv download

Build Status Go Doc Go Report Card standard-readme compliant Latest release Buy me a lunch

Download a shopify site in a csv format that the shopify importer understands

Table of Contents

Install

Using Homebrew

brew install kishaningithub/tap/shopify-csv-download

Using Binary

# All unix environments with curl
curl -sfL https://raw.githubusercontent.com/kishaningithub/shopify-csv-download/master/install.sh | sudo sh -s -- -b /usr/local/bin

# In alpine linux (as it does not come with curl by default)
wget -O - -q https://raw.githubusercontent.com/kishaningithub/shopify-csv-download/master/install.sh | sudo sh -s -- -b /usr/local/bin

Usage

CLI

Retrieving all publicly exposed products

shopify-csv-download https://shopify-site.com > shopify-site-products.csv

Library

package main

import (
    "log"
    "net/url"
    "os"

    "github.com/kishaningithub/shopify-csv-download/pkg/products"
)

func main() {
    siteUrl, err := url.Parse("https://shopify-site.com")
    if err != nil {
        log.Println(err)
        return
    }
    err = products.SaveAsImportableCSV(*siteUrl, os.Stdout)
    if err != nil {
        log.Println(err)
        return
    }
}

Maintainers

@kishaningithub

Contribute

PRs accepted.

Small note: If editing the README, please conform to the standard-readme specification.

License

MIT © 2021 Kishan B