GithubHelp home page GithubHelp logo

okuraku / random-jisho-word-widget Goto Github PK

View Code? Open in Web Editor NEW
8.0 1.0 0.0 19.38 MB

iOS 14 widget to display random words from a selected JLPT grade. Powered by jisho.org and Scriptable

JavaScript 100.00%

random-jisho-word-widget's Introduction

Random Jisho Word Widget

iOS 14 widget to display random words from a jisho.org search (e.g. a selected JLPT grade). Powered by jisho.org and Scriptable

Widget overview

What is it?

iOS 14 supports adding more flexible widgets to your home screen. The app Scriptable opens up widget development to all of us, not needing to publish an app to the App Store just to build a widget. This widget is meant to assist Japanese learners by providing an easy way to display Japanese words with their readings and definitions in either a small, medium, or large format for review. Which words are shown can be customized by specifying a search parameter (see details below).

Installation

Installation is done in two steps: copying the script file to your device and then adding a Scriptable widget utilizing the script.

Prerequisites

Scriptable must be installed.

Download the script file

An iOS >Shortcut< is provided to make this easier. It will download the latest script content and place it where Scriptable expects it. Note: If you do not want to enable untrusted Shortcuts (necessary for running any shared ones) you can also do this step by manually copying the contents of RandomJishoWords.js into a new script in Scriptable.

Downloading the Shortcut Running the Shortcut

Add a new Widget

  1. Long press the home screen and tap the + button.
  2. Scroll down and select Scriptable as the app for the widget
  3. Choose a size (all three are supported) and select Add Widget
  4. Tap the widget and for Script, select 'Random Jisho Word Widget'
  5. Under Parameter, enter a jisho.org search string. Examples: #jlpt-n1, #jlpt-n3 #common. If not specified, #jlpt-n5 will be used.

Adding a small widget Adding a large widget

Usage

Feel free to adjust the search at any time by modifying the widget and entering a new Parameter. If you'd like to resize the widget, it needs to be removed and re-added. Colors used can be easily changed by modifying the script content inside Scriptable.

jisho.org provides some very interesting and useful tags that you can set as your Parameter to see selected words on your home screen for practice. The full list is here. Some examples I picked that you might try:

Acknowledgments

Many thanks to MaximiliumM for publishing this widget which performs a very similar function. I wanted an app to display a wider variety of words with more open-ended configuration and was able to use their code as a starting point. I also would like to express gratitude to all of the contributors to jisho.org, including its authors and everyone who curates the data it links us to. It is a wonderful tool. If you'd like to access the Jisho.org API yourself you can find a lot of discussion about it here.

random-jisho-word-widget's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

random-jisho-word-widget's Issues

Documentation

  • Shortcut for easy install
  • Record gifs showing setup, clicking
  • Write documentation with above, acknowledgments

Error handling

When one of the data values isn't present, display the slug or something else to help troubleshoot that case instead of generic errors

Don't use iCloud?

It's unclear why FileManager.iCloud should be used over local(). Try to support both cases

More text sizing tweaks

Report from Reddit: "iPad Pro 10.5, some of the English definitions are not contained in the small widget but are cut out of the widget"

Better offline behavior

Seems like right now just errors out. Better offline behavior would be just to keep whatever words it last displayed.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.