Skip to content

Instantly share code, notes, and snippets.

@BNPrashanth
Last active April 20, 2019 07:08
Show Gist options
  • Select an option

  • Save BNPrashanth/e2d2a531c082fecc4d3f6240c2ff89c5 to your computer and use it in GitHub Desktop.

Select an option

Save BNPrashanth/e2d2a531c082fecc4d3f6240c2ff89c5 to your computer and use it in GitHub Desktop.
package main
import (
s "gsheet-to-json-csv/src/services"
u "gsheet-to-json-csv/src/utils"
"os"
)
func main() {
// Strting the Application
u.GeneralLogger.Println("Starting Extracting Language Files from GoogleSheet - downloading csv approach..")
csvFilePath := "../outputs/gsheet.csv"
errorResponse := s.Download(
"https://docs.google.com/spreadsheets/d/e/2PACX-1vQIhLNNfUKVjxMkMwdtTFnvuV8oN1H_OmgOWRCwHBkSfOo1fzA08LXDfcK4EA86fx18M4FeAIwOoBBR/pub?output=csv",
csvFilePath,
5000,
)
if errorResponse.Err != nil {
u.ErrorLogger.Println(errorResponse.Message, errorResponse.Err)
os.Exit(1)
}
s.WriteLanguageFiles(csvFilePath)
u.GeneralLogger.Println("Completed Execution..")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment