Preparing for 1.0 release.

This commit is contained in:
Hiers 2023-12-17 21:45:30 +00:00
parent 58d2c92e3a
commit feb73531cd
4 changed files with 20 additions and 15 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

View file

@ -1,7 +1,7 @@
[package]
name = "jisho-cli"
description = "A simple cli tool to lookup Japanese words using jisho.org"
version = "0.1.4"
version = "1.0.0"
authors = ["jojii <jojii@gmx.net>", "Hiers <dvmap@protonmail.com"]
readme = "README.md"
repository = "https://github.com/Hiers/jisho-cli"
@ -9,17 +9,17 @@ license = "GPL-3.0"
edition = "2018"
[target.'cfg(windows)'.dependencies]
windows-sys = { version = "0.45.0", features = ["Win32_Foundation", "Win32_System_Console", "Win32_UI_Shell"] }
windows-sys = { version = "0.52.0", features = ["Win32_Foundation", "Win32_System_Console", "Win32_UI_Shell"] }
[target.'cfg(unix)'.dependencies]
libc = "0.2.139"
libc = "0.2.151"
[dependencies]
ureq = { version = "2.1.0", features = ["json"] }
serde_json = "1.0.64"
colored = "2.0.0"
ureq = { version = "2.8.0", features = ["json"] }
serde_json = "1.0.108"
colored = "2.1.0"
argparse = "0.2.2"
atty = "0.2"
atty = "0.2.14"
kradical_parsing = "0.1.0"
[features]

View file

@ -1,10 +1,11 @@
# Jisho (cli)
A very simple cli tool to look up Japanese words using jisho.org's API.
Searching for kanji by radicals is also available.
A simple cli tool to look up Japanese words using jisho.org's API.
Additionally, searching for kanji by radicals and browsing tatoeba's database of example sentences is also available.
<br>
<img src=".img/dab0ab082751a1b17271309c2ffc3c16d53c8498513619e50235e8157bab01fa.png">
<img src=".img/16adb8274ff5e12b13545df2996dbdc3be149b9cd5575ceb38e2d9e031117ab9.png">
<img src=".img/97bc905fa6f0ea31314aa4c7fae16d4883d555184f7e65d7f1e41cd6a389148c.png">
# Installation
Binaries are directly available from the release tab.
@ -17,12 +18,14 @@ cargo build --release
```
# Usage
A readline wrapper like `rlwrap` is strongly recommended if using `jisho-cli` interactively (-i).
A readline wrapper like `rlwrap` is strongly recommended if using `jisho-cli` interactively (-i or empty input).
```
jisho [<words to look up>]
jisho :[<radicals in kanji>]
jisho _[<expressions in sentences>]
```
When looking up radicals, * (or ) can be used to add a radical that can't be easily typed, e.g. 气.
When looking up kanji, * (or ) can be used to add a radical that can't be easily typed, e.g. 气.
# Note
To search kanji by radicals, the [radkfile](https://www.edrdg.org/krad/kradinf.html) needs to be installed in either `~/.local/share/` on Linux or `~\AppData\Local\ `on Windows.
Example sentences taken from [tatoeba](https://tatoeba.org/).

View file

@ -122,9 +122,10 @@ fn parse_args() -> aux::Options {
let mut query_vec: Vec<String> = Vec::new();
{
let mut ap = ArgumentParser::new();
ap.set_description("Use jisho.org from cli. \
ap.set_description("Use jisho.org from the cli. \
Searching for kanji by radicals is also available if the radkfile file is installed in \"~/.local/share\" \
or \"~\\AppData\\Local\\\" if you're on Windows.");
(linux) or \"~\\AppData\\Local\\\" (windows). \
Additionally, searching for sentences in tatoeba is also possible.");
ap.add_option(
&["-V", "--version"],
Print(env!("CARGO_PKG_VERSION").to_string()),
@ -138,7 +139,8 @@ fn parse_args() -> aux::Options {
ap.refer(&mut query_vec)
.add_argument("Query", List, "Search terms using jisho.org;
Prepend it with ':' to search a kanji by radicals instead \
and ':*' to search a radical by strokes (e.g. ':*').");
and ':*' to search a radical by strokes (e.g. ':*'); \
You can also use '_' to see example sentences from tatoeba.");
ap.refer(&mut options.interactive).add_option(
&["-i", "--interactive"],