Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
hk220 committed May 30, 2021
1 parent 7030887 commit ce3b090
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 4 deletions.
13 changes: 11 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go-circle-list-extract extracts a circle list of Comitia in JSON or CSV format.

## Install from binary

Donwload from [release page](https://github.com/hk220/go-circle-list-extract/releases.)
Donwload a binary according to your OS and config.yaml from [release page](https://github.com/hk220/go-circle-list-extract/releases.)

## Install from source

Expand All @@ -15,7 +15,14 @@ go install github.com/hk220/go-circle-list-extract
## Usage

```bash
go-circle-list-extract -f [format:json, csv] -o [output filename] [eventname]
Usage:
go-circle-list-extract [event name] [flags]

Flags:
-c, --config string config file (default is config.yaml) (default "config.yaml")
-f, --format string output format (support: json, csv) (default "csv")
-h, --help help for go-circle-list-extract
-o, --output string output file name (default "circles.csv")
```

## Support Event
Expand All @@ -24,3 +31,5 @@ See config.yaml

- Comitia 134: event name is `comitia134`
- Comitia 136: event name is `comitia136`

To see the old events, look at [SupportEvent.md](SupportEvent.md)
11 changes: 11 additions & 0 deletions SupportEvent.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Older Support Event

Maybe the link is broken and you can't extract it.

- Comitia 125: event name is `comitia125`
- Comitia 126: event name is `comitia126`
- Comitia 127: event name is `comitia127`
- Comitia 128: event name is `comitia128`
- Comitia 129: event name is `comitia129`
- Comitia 130: event name is `comitia130`
- Comitia 131: event name is `comitia131`
4 changes: 2 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ var (
cfgFile string

rootCmd = &cobra.Command{
Use: "go-circle-list-extract",
Use: "go-circle-list-extract [event name]",
Short: "go-circle-list-extract extracts a circle list of Comitia in JSON or CSV format.",
Args: cobra.ExactArgs(1),
Run: func(cmd *cobra.Command, args []string) {
Expand Down Expand Up @@ -86,7 +86,7 @@ func init() {
cobra.OnInitialize(initConfig)

rootCmd.PersistentFlags().StringVarP(&cfgFile, "config", "c", "config.yaml", "config file (default is config.yaml)")
rootCmd.PersistentFlags().StringP("format", "f", "csv", "output format")
rootCmd.PersistentFlags().StringP("format", "f", "csv", "output format (support: json, csv)")
rootCmd.PersistentFlags().StringP("output", "o", "circles.csv", "output file name")
viper.BindPFlag("format", rootCmd.PersistentFlags().Lookup("format"))
viper.BindPFlag("output", rootCmd.PersistentFlags().Lookup("output"))
Expand Down

0 comments on commit ce3b090

Please sign in to comment.