Commit graph

65 commits

Author SHA1 Message Date
Hiers
659003f647 Bump version. 2024-02-17 19:17:34 +00:00
Hiers
6fcd5489d5 Removed unnecessary mallocs.
The colored crate was being used for convinient coloring of the terminal
text, but after profiling I found it was responsible for almost 1/3 of
the memory allocations of the jisho searching feature.

Decided to write ANSI codes manually instead, along with using write! +
format_args! instead of format! for similar reasons, but not as
egregious.
2024-02-17 19:12:09 +00:00
Hiers
a475790e63 Only load the radkfile once per execution.
Before this, Yakudatsu would load and parse the whole file everytime you
used the kanji search.
2024-02-17 18:54:20 +00:00
Hiers
0070579f79 Fix underflow if executed outside of a terminal. 2024-02-17 18:33:25 +00:00
Hiers
eafa2550bb Fixed not checking correctly for empty strings. 2024-02-02 21:34:45 +00:00
Hiers
19929580da Final final changes before release. 2024-01-28 09:41:27 +00:00
Hiers
5f329ccab4 More Windows-specific fixes. 2023-12-19 13:08:06 +00:00
Hiers
f11950b0de Changed aux.rs to util.rs because of Windows. 2023-12-19 11:06:24 +00:00
Hiers
312ce83127 Not sure if this actually improves performance.
But just in case.
2023-12-18 07:52:33 +00:00
Hiers
f0d4e815d0 Update README. 2023-12-17 21:55:59 +00:00
Hiers
feb73531cd Preparing for 1.0 release. 2023-12-17 21:45:30 +00:00
Hiers
58d2c92e3a Fix some bugs on empty inputs. 2023-12-17 21:33:24 +00:00
Hiers
75bdf17905 Empty jisho command now starts interactive mode. 2023-12-17 21:02:26 +00:00
Hiers
86fed8b3d6 Moved error messages out of kanji_search.rs 2023-12-17 21:00:12 +00:00
Hiers
220a164c67 Cleanup. 2023-12-17 16:31:05 +00:00
Hiers
b3d8a06fdf Working sentence searching.
It's working, but the code is not very polished.
Will clean it up later.
2023-12-16 19:42:38 +00:00
Hiers
37e36db2a1 Fix program not exiting on EOF during some prompts 2023-12-16 11:44:37 +00:00
Hiers
5501c621c9 Split word search into its own file too. 2023-12-16 11:24:55 +00:00
Hiers
93576a3e34 Split kanji search by radical functions.
Put them in another file in preparation for adding sentence searching
which will add considerable complexity to the code.
2023-12-14 19:15:35 +00:00
Hiers
683610bf2c Update README. 2023-11-21 18:07:15 +00:00
Hiers
cb977989c6 Fixed "(common)" tag not showing up as green. 2023-11-20 19:42:29 +00:00
Hiers
ac5a961d8d Code cleanup. 2023-11-06 10:40:37 +00:00
Hiers
900cec4df4 Fix broken coloured text on Windows. 2023-10-14 18:02:32 +01:00
Hiers
139f3b17ab Upload local patches I've been running for jisho-cli. 2023-10-14 17:12:06 +01:00
Hiers
128c0a6e9b More changes to formatting and additional info. Also exit on EOF. 2023-03-18 21:47:50 +00:00
Hiers
c541922d05 Fix loop not reading more than 2 alternate readings. 2023-03-18 21:47:27 +00:00
Hiers
d067e01bd4 Remove aux variable and assign output to format! directly. 2023-03-05 15:05:10 +00:00
Hiers
6ad4c5cdc3 Add other forms section to results that have them. 2023-03-05 15:01:15 +00:00
Hiers
321aab0480 Few more minor changes to formatting. 2023-03-04 13:18:04 +00:00
Hiers
556c32b1ec Change formatting to be closer to what jisho presents. 2023-03-04 11:37:44 +00:00
Jojii
9b2e51fee3
Merge pull request #6 from Hiers/master
Print to less if output is bigger than terminal window height.
2023-02-20 18:26:46 +01:00
Hiers
1c3c5644d3 Move child process code to separate function and other small changes. 2023-02-19 23:18:42 +00:00
Hiers
d56d31cc64 Removed the pager crate in favour of implementing that functionality in jisho-cli. Added windows version of terminal_size function. 2023-02-19 11:01:24 +00:00
Hiers
bc8a29fcf3 Fix buffer underflow bug in output line counter. 2023-02-17 11:41:38 +00:00
Hiers
7f149998bb Print to less if output is bigger than terminal window height. 2023-02-17 10:23:52 +00:00
jojii
06dba7a78f
fix #3 2021-04-07 14:02:32 +02:00
jojii
c168323282
don't do empty requests 2021-04-07 13:57:16 +02:00
jojii
d017288de4
add -k to open each kanji info in a browser tab 2021-04-02 20:20:09 +02:00
jojii
9eb9481067
update depnedencies 2021-04-01 20:24:33 +02:00
jojii
22c7a785c9
add interactive mode 2021-03-16 14:51:25 +01:00
jojii
25bd627643
bump new release 2021-03-15 23:33:19 +01:00
jojii
0f942f6738
few further improvements 2021-03-15 23:28:19 +01:00
jojii
36ecd62faf
don't start counting at 0 2021-03-15 23:24:30 +01:00
jojii
227f76bc82
add cli parsing
closes #2
2021-03-15 23:23:28 +01:00
jojii
3b74ad59dd
update dependencies 2021-03-15 22:51:59 +01:00
jojii
51364bb9f7 Fix some words not shown シ 2021-02-24 20:09:59 +01:00
jojii
3457b3d9cf update ureq 2021-02-23 14:01:46 +01:00
jojii
e8c158e5d3 bump v0.1.3 2021-02-18 18:49:36 +01:00
jojii
a9e080d9da fix empty brackets 2021-02-18 18:49:18 +01:00
jojii
440ecb3645 bump release v0.1.2 2021-02-18 18:04:26 +01:00