Skip to content

Development

CaptainDario edited this page Dec 13, 2022 · 17 revisions

Environment setup

This app was developed using dart, the flutter framework and Tensorflow (lite). Flutter needs to be installed. For this please follow the guide on the official website.

Note: There are some utility scripts that require a python installation.

Now the repository of DaKanji needs to be cloned:

git clone https://github.com/CaptainDario/DaKanji-Application

Then all necessary packages need to be installed:

flutter pub get

Now some additional files are necessary:

  1. Copy the dictionary files from the release section of DaKanji dictionary assets/dict
  2. Copy the kagome binaries from [the release section of kagome dart to blobs
  3. Copy the TF Lite binaries from the release section of TFLite binaries to blobs

Updating icons

iOS / Android

For updating the icons the flutter_launcher_icons package was used. To update all icons, replace media/icon.png and run:

flutter pub run flutter_launcher_icons:main

Windows

windows/runner/resources/app_icon.ico

png → ico: https://convertico.com/

MacOS

macos/Runner/Assets.xcassets/AppIcon.appiconset

Linux

note: only snap support

add to

Deep Linking

IMPORTANT: This is currently only available on Android and iOS

Other applications can link to DaKanji via deep linking. The base link is defined as dakanji://dakanji. Adding a dictionary to the link will result in predictions opening in this dictionary. Example:

Setting the link to dakanji://dakanji/jisho will open DaKanji. All look ups made, will than use jisho.org.

For web dictionaries which are currently not supported, you can use the dakanji://dakanji/URL/YOUR_URL_HERE link. Just replace YOUR_URL_HERE with the search url of your dictionary and put %X% as a placeholder for the character to search. Example:

If you want to link to japandict.com with the search url: https://www.japandict.com/%X% Setting the link to dakanji://dakanji/URL/https://www/japandict.com/%X% is all one needs to do.

A table with all supported deep links can be found here. You can try them out directly in your browser.

Android

Currently supported links are:

  • dakanji://dakanji/jisho (web)
  • dakanji://dakanji/wadoku (web)
  • dakanji://dakanji/weblio (web)
  • dakanji://dakanji/URL/YOUR_URL_HERE
  • dakanji://dakanji/akebi (app)
  • dakanji://dakanji/takoboto (app)
  • dakanji://dakanji/aedict (app)

Clone this wiki locally