Last active
April 20, 2019 07:08
-
-
Save BNPrashanth/e2d2a531c082fecc4d3f6240c2ff89c5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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