Skip to content

Tools for users of Wanikani.com (a japanese study website)

Notifications You must be signed in to change notification settings

curious-attempt-bunny/wanikanitools

Repository files navigation

Wanikani Tools

Assorted tools built on top of the wanikani v2 API. So far:

  • an API caching layer that rolls up responses,
  • a leaches screensaver page

Users

Animated leaches display

Go to https://wanikanitools.curiousattemptbunny.com/.

Set it as your screen saver

Mac OSX

Follow the instructions at https://www.usethistip.com/add-website-screen-saver-mac-os-x.html.

Developers

Wanikani API cache

The following endpoints cache rolled-up responses from Wanikani (use HTTP GET and your v2 API key):

In addition a (deprecated) merged view of the review_statistics endpoint is available via:

An SRS level breakdown endpoint is available via (as used by https://greasyfork.org/en/scripts/32344-wanikani-srs-level-progress):

Cache invalidation

The first page of each request will be made to Wanikani, and if the date_updated_at field has changed then the remaining pages will be queried for (and then cached). In other words, each query will result in 1 or more queries to Wanikani.

Setup

See https://github.com/curious-attempt-bunny/dokku-rails-omniauth-bootstrap-react/blob/master/README.md.

dokku config:set --no-restart wanikanitools WANIKANI_V2_API_KEY=XXX

Persistent caches

For a persistent cache (i.e. dokku deploys do not erase the cache):

On dokku host machine:

mkdir -p  /var/lib/dokku/data/storage/wanikanitools
chown -R 32767:32767 /var/lib/dokku/data/storage/wanikanitools
dokku docker-options:add wanikanitools deploy,run "-v /var/lib/dokku/data/storage/wanikanitools:/app/storage"
dokku config:set wanikanitools CACHE_PATH=/app/storage

Improved performance

dokku config:set wanikanitools RACK_ENV=production WEB_CONCURRENCY=5

Running locally

bundle install
bundle exec rake db:create db:migrate
WANIKANI_V2_API_KEY=XXX bundle exec rails server
open http://localhost:3000

About

Tools for users of Wanikani.com (a japanese study website)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published