https://github.com/dekal/costa-rewrite
Analyzing data return from public API of Costa Rewrite
https://github.com/dekal/costa-rewrite
golang
Last synced: about 20 hours ago
JSON representation
Analyzing data return from public API of Costa Rewrite
- Host: GitHub
- URL: https://github.com/dekal/costa-rewrite
- Owner: DeKal
- License: mit
- Created: 2020-01-09T04:22:02.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-01-14T02:43:45.000Z (over 6 years ago)
- Last Synced: 2025-05-30T10:58:56.256Z (about 1 year ago)
- Topics: golang
- Language: Go
- Homepage:
- Size: 18.2 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
### Description
Analyzing data return from public API of Costa Rewrite
### Prerequisite
- Input CSV file
- Default CSV file name `example_input.csv`
- CSV file must have Header view sample file `example_input.csv`
#### Run with Default param
```
./run.sh
```
#### Help
```
./run.sh --help
Usage of ./costa-rewrite:
-country string
country filter for some specific word [HK, ID, MY, PH, SG, TW] (default "SG")
-file1 string
file name 1 (default "output")
-file2 string
file name 2 (default "output-2")
-inputName string
an Input name for reading data (default "example_input.csv")
-mode string
mode: [normal, compare] (default "normal")
-outputName string
an Output name for writing data (default "output.csv")
-rewriteHost string
rewrite host (default "http://localhost:9999")
```
#### Run with custom param
```
./run.sh -country SG -inputName example_input.csv -outputName output.csv -rewriteHost rewrite-url-example.com
```
#### Run with compare mode
```
./run.sh -mode compare -file1 output-local-normal.csv -file2 output-local-remove.csv -outputName output.csv
```
#### Full usage for analyzing
```
# Run Costa in normal mode (rewrite + brand)
./run.sh -country SG -inputName "Search Autocorrect.csv" -outputName output-normal.csv
# Run Costa when removing brand suggestion
./run.sh -country SG -inputName "Search Autocorrect.csv" -outputName output-remove.csv
# Output for further analyzing
./run.sh -mode compare -file1 output-normal.csv -file2 output-remove.csv -outputName output-staging.csv
```