jrp

command module
v1.1.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 15, 2024 License: MIT Imports: 5 Imported by: 0

README ΒΆ

golangci-lint release

🎲 jrp

Latest Release
Coverage Report
demo

ℹ️ About

jrp is the CLI tool to generate Japanese random phrase(s). (It's jokeey tool!)
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.

This tool uses WordNet Japan sqlite database file.

πŸ’» Usage

Usage:
  jrp [flags]
  jrp [command]

Available Subcommands:
  download, dl,   d  πŸ“¦ Download WordNet Japan sqlite database file from the official web site.
  generate, gen,  g  ✨ Generate Japanese random phrase(s). You can abbreviate "generate" sub command. ("jrp" and "jrp generate" are the same.)
  history,  hist, h  πŸ“œ Manage the history of the "generate" command.
  favorite, fav,  f  ⭐ Manage the favorited phrase(s) of the history of "generate" command.
  help               🀝 Help for jrp.
  completion         πŸ”§ Generate the autocompletion script for the specified shell.
  version            πŸ”– Show the version of jrp.

Flags:
  -n, --number   πŸ”’ number of phrases to generate (default 1, e.g: 10)
  -p  --prefix   πŸ’¬ prefix of phrase(s) to generate
  -s  --suffix   πŸ’¬ suffix of phrase(s) to generate
  -d  --dry-run  πŸ§ͺ generate phrase(s) without saving to the history
  -P, --plain    πŸ“ plain text output instead of table output
  -h, --help     🀝 help for jrp
  -v, --version  πŸ”– version for jrp

Arguments:
  number  πŸ”’ number of phrases to generate (e.g: 10)

🌍 Environments

πŸ“ Directory to store WordNet Japan sqlite database file

Default : $XDG_DATA_HOME/jrp or $HOME/.local/share/jrp

export JRP_WNJPN_DB_FILE_DIR=/path/to/your/directory
πŸ“ Directory to store jrp sqlite database file

Default : $XDG_DATA_HOME/jrp or $HOME/.local/share/jrp

export JRP_DB_FILE_DIR=/path/to/your/directory

πŸ”§ Installation

🐭 Using go
go install github.com/yanosea/jrp@latest
🍺 Using homebrew
brew tap yanosea/tap
brew install yanosea/tap/jrp
πŸ“¦ Download from release

Go to the Releases and download the latest binary for your platform.

✨ Update

🐭 Using go

reinstall jrp!

go install github.com/yanosea/jrp@latest
🍺 Using homebrew
brew update
brew upgrade jrp
πŸ“¦ Download from release

Download the latest binary from the Releases page and replace the old binary in your $PATH.

🧹 Uninstallation

πŸ”§ Uninstall jrp
🐭 Using go
rm $GOPATH/bin/jrp
sudo rm -fr $GOPATH/pkg/mod/github.com/yanosea/jrp@*
🍺 Using homebrew
brew uninstall jrp
brew untap yanosea/tap/jrp
πŸ“¦ Download from release

Remove the binary you downloaded and placed in your $PATH.

πŸ—‘οΈ Remove data files

If you've set jrp envs, please replace $HOME/.local/share/jrp with envs you've set.
These below commands are in the case of default. Ofcourse you can remove whole the directory.

πŸ’Ύ Remove WordNet Japan sqlite database file
rm $HOME/.local/share/jrp/wnjpn.db
πŸ’Ύ Remove jrp sqlite database file
rm $HOME/.local/share/jrp/jrp.db

πŸ“ƒ License

πŸ”“MIT

πŸ–ŠοΈ Author

🏹 yanosea

πŸ”₯ Motivation

I love the smart phone application PhrasePlus!
I wanted to run an application with equivalent functionality to this in the terminal, so I created it!

🀝 Contributing

Feel free to point me in the right directionπŸ™

Documentation ΒΆ

Overview ΒΆ

Package main is the entry point of jrp.

Directories ΒΆ

Path Synopsis
app
database/jrp/model
Package model is a package for providing jrp model.
Package model is a package for providing jrp model.
database/jrp/repository
Package repository is a package for providing jrp repository.
Package repository is a package for providing jrp repository.
database/jrp/repository/query
Package query is a package for providing queries to manage jrp database.
Package query is a package for providing queries to manage jrp database.
database/wnjpn/model
Package model is a package for providing wnjpn model.
Package model is a package for providing wnjpn model.
database/wnjpn/repository
Package repository is a package for providing wnjpn repository.
Package repository is a package for providing wnjpn repository.
database/wnjpn/repository/query
Package query is a package for providing queries to get word from wnjpn database.
Package query is a package for providing queries to get word from wnjpn database.
library/dbfiledirpathprovider
Package dbfiledirpathprovider is a package for providing db file directory path.
Package dbfiledirpathprovider is a package for providing db file directory path.
library/downloader
Package downloader is a package for downloading wnjpn db file.
Package downloader is a package for downloading wnjpn db file.
library/generator
Package generator is a package for generating jrp.
Package generator is a package for generating jrp.
library/jrpwriter
Package jrpwriter is a package for writing jrp as table.
Package jrpwriter is a package for writing jrp as table.
library/utility
Package utility is a package of collection of utility functions.
Package utility is a package of collection of utility functions.
library/versionprovider
Package versionprovider is a package for providing version from build info.
Package versionprovider is a package for providing version from build info.
proxy/buffer
Package bufferproxy is a package that provides a buffer proxy for the app.
Package bufferproxy is a package that provides a buffer proxy for the app.
proxy/cobra
Package cobraproxy is a package that provides a cobra proxy for the app.
Package cobraproxy is a package that provides a cobra proxy for the app.
proxy/color
Package colorproxy is a package that provides a color proxy for the app.
Package colorproxy is a package that provides a color proxy for the app.
proxy/debug
Package debugproxy is a package that provides a debug proxy for the app.
Package debugproxy is a package that provides a debug proxy for the app.
proxy/filepath
Package filepathproxy is a package that provides a filepath proxy for the app.
Package filepathproxy is a package that provides a filepath proxy for the app.
proxy/fmt
Package fmtproxy is a package that provides a fmt proxy for the app.
Package fmtproxy is a package that provides a fmt proxy for the app.
proxy/fs
Package fsproxy is a package that provides a fs proxy for the app.
Package fsproxy is a package that provides a fs proxy for the app.
proxy/gzip
Package gzipproxy is a package that provides a gzip proxy for the app.
Package gzipproxy is a package that provides a gzip proxy for the app.
proxy/http
Package httpproxy is a package that provides a http proxy for the app.
Package httpproxy is a package that provides a http proxy for the app.
proxy/io
Package ioproxy is a package that provides an io proxy for the app.
Package ioproxy is a package that provides an io proxy for the app.
proxy/os
Package osproxy is a package that provides an os proxy for the app.
Package osproxy is a package that provides an os proxy for the app.
proxy/pflag
Package pflagproxy is a package that provides a pflag proxy for the app.
Package pflagproxy is a package that provides a pflag proxy for the app.
proxy/promptui
Package promptuiproxy is a package that provides a promptui proxy for the app.
Package promptuiproxy is a package that provides a promptui proxy for the app.
proxy/rand
Package randproxy is a package that provides a rand proxy for the app.
Package randproxy is a package that provides a rand proxy for the app.
proxy/sort
Package sortproxy is a package that provides a sort proxy for the app.
Package sortproxy is a package that provides a sort proxy for the app.
proxy/spinner
Package spinner proxy is a package that provides a spinner proxy for the app.
Package spinner proxy is a package that provides a spinner proxy for the app.
proxy/sql
Package sqlproxy is a package that provides a sql proxy for the app.
Package sqlproxy is a package that provides a sql proxy for the app.
proxy/strconv
Package strconvproxy is a package that provides a strconv proxy for the app.
Package strconvproxy is a package that provides a strconv proxy for the app.
proxy/strings
Package stringsproxy is a package that provides a strings proxy for the app.
Package stringsproxy is a package that provides a strings proxy for the app.
proxy/tablewriter
Package tablewriterproxy is a package that provides a tablewriter proxy for the app.
Package tablewriterproxy is a package that provides a tablewriter proxy for the app.
proxy/time
Package time proxy is a package that provides a time proxy for the app.
Package time proxy is a package that provides a time proxy for the app.
proxy/user
Package userproxy is a package that provides a user proxy for the app.
Package userproxy is a package that provides a user proxy for the app.
cmd
Package cmd is a package for providing command.
Package cmd is a package for providing command.
constant
Package constant provides constants for jrp.
Package constant provides constants for jrp.
mock
app/database/jrp/repository
Package mockrepository is a generated GoMock package.
Package mockrepository is a generated GoMock package.
app/database/wnjpn/repository
Package mockrepository is a generated GoMock package.
Package mockrepository is a generated GoMock package.
app/library/dbfiledirpathprovider
Package mockdbfiledirpathprovider is a generated GoMock package.
Package mockdbfiledirpathprovider is a generated GoMock package.
app/library/downloader
Package mockdownloader is a generated GoMock package.
Package mockdownloader is a generated GoMock package.
app/library/generator
Package mockgenerator is a generated GoMock package.
Package mockgenerator is a generated GoMock package.
app/library/jrpwriter
Package mockjrpwriter is a generated GoMock package.
Package mockjrpwriter is a generated GoMock package.
app/library/utility
Package mockutility is a generated GoMock package.
Package mockutility is a generated GoMock package.
app/library/versionprovider
Package mockversionprovider is a generated GoMock package.
Package mockversionprovider is a generated GoMock package.
app/proxy/buffer
Package mockbufferproxy is a generated GoMock package.
Package mockbufferproxy is a generated GoMock package.
app/proxy/cobra
Package mockcobraproxy is a generated GoMock package.
Package mockcobraproxy is a generated GoMock package.
app/proxy/color
Package mockcolorproxy is a generated GoMock package.
Package mockcolorproxy is a generated GoMock package.
app/proxy/debug
Package mockdebugproxy is a generated GoMock package.
Package mockdebugproxy is a generated GoMock package.
app/proxy/filepath
Package mockfilepathproxy is a generated GoMock package.
Package mockfilepathproxy is a generated GoMock package.
app/proxy/fmt
Package mockfmtproxy is a generated GoMock package.
Package mockfmtproxy is a generated GoMock package.
app/proxy/fs
Package mockfsproxy is a generated GoMock package.
Package mockfsproxy is a generated GoMock package.
app/proxy/gzip
Package mockgzipproxy is a generated GoMock package.
Package mockgzipproxy is a generated GoMock package.
app/proxy/http
Package mockhttpproxy is a generated GoMock package.
Package mockhttpproxy is a generated GoMock package.
app/proxy/io
Package mockioproxy is a generated GoMock package.
Package mockioproxy is a generated GoMock package.
app/proxy/os
Package mockosproxy is a generated GoMock package.
Package mockosproxy is a generated GoMock package.
app/proxy/pflag
Package mockpflagproxy is a generated GoMock package.
Package mockpflagproxy is a generated GoMock package.
app/proxy/promptui
Package mockpromptuiproxy is a generated GoMock package.
Package mockpromptuiproxy is a generated GoMock package.
app/proxy/rand
Package mockrandproxy is a generated GoMock package.
Package mockrandproxy is a generated GoMock package.
app/proxy/sort
Package mocksortproxy is a generated GoMock package.
Package mocksortproxy is a generated GoMock package.
app/proxy/spinner
Package mockspinnerproxy is a generated GoMock package.
Package mockspinnerproxy is a generated GoMock package.
app/proxy/sql
Package mocksqlproxy is a generated GoMock package.
Package mocksqlproxy is a generated GoMock package.
app/proxy/strconv
Package mockstrconvproxy is a generated GoMock package.
Package mockstrconvproxy is a generated GoMock package.
app/proxy/strings
Package mockstringsproxy is a generated GoMock package.
Package mockstringsproxy is a generated GoMock package.
app/proxy/tablewriter
Package mocktablewriterproxy is a generated GoMock package.
Package mocktablewriterproxy is a generated GoMock package.
app/proxy/time
Package mocktimeproxy is a generated GoMock package.
Package mocktimeproxy is a generated GoMock package.
app/proxy/user
Package mockuserproxy is a generated GoMock package.
Package mockuserproxy is a generated GoMock package.
test
testutility
Package testutility is a package for capturing output for testing.
Package testutility is a package for capturing output for testing.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL