
I made this thing almost a year ago now, but never got around to sharing it.
Is it ergonomic? No, the webpage is much much better, but this is cooler.
Try it out. Do some reviews over the terminal. Do them over SSH!
This is a Ruby project, there is no single executable you could download, you just clone the source code and point a ruby interpreter to the entry point
./bin/tui.rb
Requirements
- A terminal (e.g. Raw TTY, Alacritty, Ghostty, PowerShell, WezTerm, Foot, …)
- a CJK font like NotoSans
- Git (you don’t need any graphical aplication for it, just the raw command line tool is enough)
- Ruby Interpreter
- Python Interpreter
- Patience debugging your environment if you are on Windows (sorry, the python FFI is fragile)
Installation
- Clone the code
git clone https://github.com/Everesh/WaniKani-TUI.git
- Move to the directory
cd WaniKani-TUI
- Install Ruby Dependencies
bundle install
- 3b. if this install failed due to you not having the bundle command, run
gem install bundler && bundle install
- Install Python dependencies
pip install pillow numpy
- Put a CJK font into the
./tui/cjk_rendererpath
- It has to be called exactly
NotoSansJP-Regular.ttfaltho the contents can be whatever- Or you can point to any other font explicitly via an absolute path in the config file
- You are gtg, just run and have fun
bundle exec ruby bin/tui.rb
Customization
You can change the colors and few other miscellaneous things.
All the options should be listed in the example config.yml
GitHub - Everesh/WaniKani-TUI: Terminal client for WaniKani · GitHub
FAQ
Frequently is a stretch, more like what Im anticipating
Does this store any data outside of the cloned repo?
- YES, I do utilize the
XDG_DATA_HOMEor%LOCALAPPDATA%, depending on your
platform, to store the config file and subject data in a single SQLite db.
Does this communicate with anything outside of WaniKani's API?
- NO, there is no telemetry or anything of that sort
How do I connect it to my WaniKani profile?
- You will get prompted on the first run to provide it an api key which would then be stored for subsequent authentication against the wanikani api. The permissions you will need are
all_data:read,assignments:startandreviews:create.
How do I delete all the data?
- Delete the contents of
XDG_DATA_HOME/WaniKaniTUI/or%LOCALAPPDATA%\WaniKaniTUI\, depending on your platform
Can I change the CJK font to something other than NotoSans?
- YES, anything
.ttfis fine, just point to it in the config, or if you dont want to bother with the config file, just rename it toNotoSansJP-Regular.ttfand drop it in the tui path./tui/cjk_renderer/NotoSansJP-Regular.ttf
When I try to run this, I get an error
- Could be more things, but most likely you are missing the cjk font. Make sure you have a font named
NotoSansJP-Regular.ttfin./tui/cjk_renderer/. Im not going to be distributing it along with the code itself. Alternatively, you can set a path to any cjk font in the config file and the discovery of Noto in the./tuisub dir will be skipped
Okey, I do have the font, but I still get an error
- Most likely a PyCall issue. The python bridge is not the stablest thing in the world. Windows especially is fragile here. I wish I could help you further, but best I can do is wish you the best troubleshooting your environment. The trace is your friend
Cool, could you add <blank>?
- NO, im not actively adding features, for me the app is complete, but feel free to fork it.
