Skip to content

Commit

Permalink
Merge pull request #64 from yanosea/63-add-explanation-of-interactive…
Browse files Browse the repository at this point in the history
…-generation

📚doc: add explanation of interactive generation
  • Loading branch information
yanosea authored Oct 16, 2024
2 parents 7d0ba01 + 511de57 commit a804284
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 6 deletions.
38 changes: 37 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

## ℹ️ About

`jrp` is the CLI tool to generate Japanese random phrase(s). (It's jokeey tool!)
`jrp` is the CLI jokeey tool to generate Japanese random phrase(s).
You can save the generated phrase(s) to the history and manage them.
Also, you can save the generated phrase(s) to the favorite and manage them.

Expand Down Expand Up @@ -59,6 +59,42 @@ Arguments:
number 🔢 number of phrases to generate (e.g: 10)
```

## 💬 Interactive mode

![demo_interactive](docs/demo_interactive.gif "demo_interactive")

`jrp` can generate Japanese random phrase(s) interactively.
You can favorite, save, skip, and exit interactively while generating phrase(s).

To use this mode, run either command below.

```sh
# Those commands below are equivalent.
# And they have their aliases. Please check the help message.
jrp interactive
# or
jrp --interactive
# or
jrp generate interactive
# or
jrp generate --interactive
```

Press either key below for your action.

- `u`
- Favorite, continue.
- `i`
- Favorite, exit.
- `j`
- Save, continue.
- `k`
- Save, exit.
- `m`
- Skip, continue.
- `other`
- Skip, exit.

## 🌍 Environments

### 📁 Directory to store WordNet Japan sqlite database file
Expand Down
4 changes: 2 additions & 2 deletions cmd/constant/interactive.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ by the flag "-p" or "--prefix" and "-s" or "--suffix".
And you can choose to save or favorite the phrase(s) generated interactively.
Press the key for your action:
Press either key below for your action:
"u" : Favorite, continue.
"i" : Favorite, exit.
"j" : Save, continue.
Expand Down Expand Up @@ -60,7 +60,7 @@ Flags:
INTERACTIVE_MESSAGE_EXIT = "🚪Exit!"
INTERACTIVE_MESSAGE_SKIP = "⏭️ Skip!"
INTERACTIVE_MESSAGE_PHASE = "🔄 Phase : "
INTERACTIVE_PROMPT_LABEL = `🔽 Press the key for your action:
INTERACTIVE_PROMPT_LABEL = `🔽 Press either key below for your action:
"u" : Favorite, continue.
"i" : Favorite, exit.
"j" : Save, continue.
Expand Down
2 changes: 1 addition & 1 deletion cmd/constant/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ by the flag "-p" or "--prefix" and "-s" or "--suffix".
Those commands below are the same.
"jrp" : "jrp generate"
"jrp interactive" : "jrp generate interactive" : "jrp generate --interactive"
"jrp interactive" : "jrp --interactive" : "jrp generate interactive" : "jrp generate --interactive"
Usage:
jrp [flags]
Expand Down
4 changes: 2 additions & 2 deletions docs/coverage.html
Original file line number Diff line number Diff line change
Expand Up @@ -4250,7 +4250,7 @@

And you can choose to save or favorite the phrase(s) generated interactively.

Press the key for your action:
Press either key below for your action:
"u" : Favorite, continue.
"i" : Favorite, exit.
"j" : Save, continue.
Expand Down Expand Up @@ -4301,7 +4301,7 @@
INTERACTIVE_MESSAGE_EXIT = "🚪Exit!"
INTERACTIVE_MESSAGE_SKIP = "⏭️ Skip!"
INTERACTIVE_MESSAGE_PHASE = "🔄 Phase : "
INTERACTIVE_PROMPT_LABEL = `🔽 Press the key for your action:
INTERACTIVE_PROMPT_LABEL = `🔽 Press either key below for your action:
"u" : Favorite, continue.
"i" : Favorite, exit.
"j" : Save, continue.
Expand Down
Binary file added docs/demo_interactive.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit a804284

Please sign in to comment.