Repository: 0xbad1d3a5/Kaku
Branch: master
Commit: 02ee8842fc18
Files: 175
Total size: 704.4 KB
Directory structure:
gitextract_arnt_e7c/
├── .gitattributes
├── .gitignore
├── .idea/
│ ├── encodings.xml
│ ├── misc.xml
│ ├── modules.xml
│ └── vcs.xml
├── LICENSE
├── README.md
├── app/
│ ├── .gitignore
│ ├── build.gradle
│ ├── proguard-rules.pro
│ └── src/
│ ├── main/
│ │ ├── AndroidManifest.xml
│ │ ├── java/
│ │ │ └── ca/
│ │ │ └── fuwafuwa/
│ │ │ └── kaku/
│ │ │ ├── BetaActivity.kt
│ │ │ ├── Constants.kt
│ │ │ ├── Database/
│ │ │ │ ├── DatabaseHelper.java
│ │ │ │ ├── DbHelperFactory.java
│ │ │ │ ├── IDatabaseHelper.java
│ │ │ │ ├── JmDictDatabase/
│ │ │ │ │ ├── JmDatabaseHelper.java
│ │ │ │ │ └── Models/
│ │ │ │ │ ├── Entry.java
│ │ │ │ │ ├── EntryOptimized.java
│ │ │ │ │ ├── Kanji.java
│ │ │ │ │ ├── KanjiIrregularity.java
│ │ │ │ │ ├── KanjiPriority.java
│ │ │ │ │ ├── Meaning.java
│ │ │ │ │ ├── MeaningAdditionalInfo.java
│ │ │ │ │ ├── MeaningAntonym.java
│ │ │ │ │ ├── MeaningCrossReference.java
│ │ │ │ │ ├── MeaningDialect.java
│ │ │ │ │ ├── MeaningField.java
│ │ │ │ │ ├── MeaningGloss.java
│ │ │ │ │ ├── MeaningKanjiRestriction.java
│ │ │ │ │ ├── MeaningLoanSource.java
│ │ │ │ │ ├── MeaningMisc.java
│ │ │ │ │ ├── MeaningPartOfSpeech.java
│ │ │ │ │ ├── MeaningReadingRestriction.java
│ │ │ │ │ ├── Reading.java
│ │ │ │ │ ├── ReadingIrregularity.java
│ │ │ │ │ ├── ReadingPriority.java
│ │ │ │ │ └── ReadingRestriction.java
│ │ │ │ └── KanjiDict2Database/
│ │ │ │ ├── Kd2DatabaseHelper.java
│ │ │ │ └── Models/
│ │ │ │ └── CharacterOptimized.java
│ │ │ ├── Deinflictor/
│ │ │ │ ├── DeinflectionDTOs.kt
│ │ │ │ ├── Deinflector.kt
│ │ │ │ └── PosMap.kt
│ │ │ ├── Dialogs/
│ │ │ │ ├── FeedbackDialogFragment.kt
│ │ │ │ ├── GrantPermissionDialogFragment.kt
│ │ │ │ ├── PlayStoreRatingDialogFragment.kt
│ │ │ │ ├── StarRatingDialogFragment.kt
│ │ │ │ └── TutorialExplainDialogFragment.kt
│ │ │ ├── Exceptions/
│ │ │ │ └── NotImplementedException.java
│ │ │ ├── Interfaces/
│ │ │ │ └── Stoppable.java
│ │ │ ├── KakuTools.kt
│ │ │ ├── LangUtils.kt
│ │ │ ├── MainActivity.kt
│ │ │ ├── MainService.java
│ │ │ ├── MainServiceHandler.java
│ │ │ ├── MainStartFragment.kt
│ │ │ ├── Ocr/
│ │ │ │ ├── BoxParams.java
│ │ │ │ ├── OcrCorrection.kt
│ │ │ │ ├── OcrParams.kt
│ │ │ │ ├── OcrResult.kt
│ │ │ │ └── OcrRunnable.kt
│ │ │ ├── PassthroughActivity.kt
│ │ │ ├── Search/
│ │ │ │ ├── JmSearchResult.kt
│ │ │ │ ├── JmTask.kt
│ │ │ │ ├── Kd2Task.kt
│ │ │ │ ├── SearchInfo.kt
│ │ │ │ └── Searcher.java
│ │ │ ├── TutorialActivity.kt
│ │ │ ├── TutorialEndFragment.kt
│ │ │ ├── TutorialFragment.kt
│ │ │ ├── TutorialWelcomeFragment.kt
│ │ │ ├── Windows/
│ │ │ │ ├── CaptureWindow.kt
│ │ │ │ ├── Data/
│ │ │ │ │ ├── DisplayData.kt
│ │ │ │ │ └── SquareChar.kt
│ │ │ │ ├── EditWindow.kt
│ │ │ │ ├── Enums/
│ │ │ │ │ ├── ChoiceType.java
│ │ │ │ │ └── LayoutPosition.kt
│ │ │ │ ├── HistoryWindow.kt
│ │ │ │ ├── InformationWindow.java
│ │ │ │ ├── InstantInfoWindow.kt
│ │ │ │ ├── InstantKanjiWindow.kt
│ │ │ │ ├── Interfaces/
│ │ │ │ │ ├── ICopyText.kt
│ │ │ │ │ ├── IRecalculateKanjiViews.kt
│ │ │ │ │ ├── ISearchPerformer.kt
│ │ │ │ │ └── WindowListener.java
│ │ │ │ ├── KanjiChoiceWindow.kt
│ │ │ │ ├── Views/
│ │ │ │ │ ├── ChoiceEditText.java
│ │ │ │ │ ├── ChoiceGridView.java
│ │ │ │ │ ├── ChoiceIconView.java
│ │ │ │ │ ├── KanjiCharacterView.kt
│ │ │ │ │ ├── KanjiGridView.kt
│ │ │ │ │ ├── KanjiImageView.kt
│ │ │ │ │ ├── ResizeView.java
│ │ │ │ │ ├── SquareGridView.kt
│ │ │ │ │ └── WindowView.java
│ │ │ │ ├── Window.java
│ │ │ │ └── WindowCoordinator.kt
│ │ │ └── XmlParsers/
│ │ │ ├── CommonParser.java
│ │ │ ├── Interfaces/
│ │ │ │ └── DictParser.java
│ │ │ ├── JmDict/
│ │ │ │ ├── JmConsts.java
│ │ │ │ ├── JmDTO/
│ │ │ │ │ ├── JmEntry.java
│ │ │ │ │ ├── JmGloss.java
│ │ │ │ │ ├── JmKEle.java
│ │ │ │ │ ├── JmLsource.java
│ │ │ │ │ ├── JmREle.java
│ │ │ │ │ └── JmSense.java
│ │ │ │ └── JmParser.java
│ │ │ ├── KanjiDict2/
│ │ │ │ ├── Kd2Consts.java
│ │ │ │ ├── Kd2DTO/
│ │ │ │ │ ├── Kd2Character.java
│ │ │ │ │ ├── Kd2Codepoint.java
│ │ │ │ │ ├── Kd2CpValue.java
│ │ │ │ │ ├── Kd2DicNumber.java
│ │ │ │ │ ├── Kd2DicRef.java
│ │ │ │ │ ├── Kd2Meaning.java
│ │ │ │ │ ├── Kd2Misc.java
│ │ │ │ │ ├── Kd2QCode.java
│ │ │ │ │ ├── Kd2QueryCode.java
│ │ │ │ │ ├── Kd2RadValue.java
│ │ │ │ │ ├── Kd2Radical.java
│ │ │ │ │ ├── Kd2Reading.java
│ │ │ │ │ ├── Kd2ReadingMeaning.java
│ │ │ │ │ ├── Kd2RmGroup.java
│ │ │ │ │ └── Kd2Variant.java
│ │ │ │ └── Kd2Parser.java
│ │ │ └── ParserRunnable.java
│ │ └── res/
│ │ ├── anim/
│ │ │ ├── fade_repeat.xml
│ │ │ └── slide_in.xml
│ │ ├── drawable/
│ │ │ ├── bg_solid_border_0_blue_black.xml
│ │ │ ├── bg_solid_border_0_white_black.xml
│ │ │ ├── bg_solid_border_corners_0_white_black_round.xml
│ │ │ ├── bg_translucent_border_0_black_black.xml
│ │ │ ├── bg_translucent_border_0_blue_blue.xml
│ │ │ ├── bg_transparent_border_0_nil_black.xml
│ │ │ ├── bg_transparent_border_0_nil_default.xml
│ │ │ └── bg_transparent_border_0_nil_ready.xml
│ │ ├── drawable-anydpi/
│ │ │ ├── icon_delete.xml
│ │ │ ├── icon_edit.xml
│ │ │ └── icon_swap.xml
│ │ ├── layout/
│ │ │ ├── activity_beta.xml
│ │ │ ├── activity_main.xml
│ │ │ ├── activity_passthrough.xml
│ │ │ ├── activity_tutorial.xml
│ │ │ ├── dialog_rating_stars.xml
│ │ │ ├── fragment_end.xml
│ │ │ ├── fragment_start.xml
│ │ │ ├── fragment_tutorial.xml
│ │ │ ├── fragment_welcome.xml
│ │ │ ├── window.xml
│ │ │ ├── window_capture.xml
│ │ │ ├── window_edit.xml
│ │ │ ├── window_history.xml
│ │ │ ├── window_info.xml
│ │ │ ├── window_instant_info.xml
│ │ │ ├── window_instant_kanji.xml
│ │ │ └── window_kanji_choice.xml
│ │ ├── mipmap-anydpi-v26/
│ │ │ ├── ic_launcher.xml
│ │ │ └── ic_launcher_round.xml
│ │ ├── values/
│ │ │ ├── colors.xml
│ │ │ ├── dimens.xml
│ │ │ ├── strings.xml
│ │ │ └── styles.xml
│ │ └── values-w820dp/
│ │ └── dimens.xml
│ └── test/
│ └── java/
│ └── ca/
│ └── fuwafuwa/
│ └── kaku/
│ ├── ExampleUnitTest.java
│ └── GenerateDictionary.java
├── build.gradle
├── fastlane/
│ └── metadata/
│ └── android/
│ └── en-US/
│ ├── full_description.txt
│ └── short_description.txt
├── gradle/
│ └── wrapper/
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradle.properties
├── gradlew
├── gradlew.bat
├── projectFilesBackup/
│ └── .idea/
│ └── workspace.xml
└── settings.gradle
================================================
FILE CONTENTS
================================================
================================================
FILE: .gitattributes
================================================
# Auto detect text files and perform LF normalization
* text=auto
# Custom for Visual Studio
*.cs diff=csharp
*.sln merge=union
*.csproj merge=union
*.vbproj merge=union
*.fsproj merge=union
*.dbproj merge=union
# Standard to msysgit
*.doc diff=astextplain
*.DOC diff=astextplain
*.docx diff=astextplain
*.DOCX diff=astextplain
*.dot diff=astextplain
*.DOT diff=astextplain
*.pdf diff=astextplain
*.PDF diff=astextplain
*.rtf diff=astextplain
*.RTF diff=astextplain
================================================
FILE: .gitignore
================================================
# Ignore data files for Kaku - these shouldn't be checked in
app/src/main/assets/*
app/src/main/res/raw/*
# Ignore private and sensitive configuration files for Kaku
# If you pull the repo, you will need to create and populate these files yourself
# !!!! DO NOT EVER COMMIT THESE FILES AS THEY CONTAIN EXTREMELY SENSITIVE INFORMATION !!!!
app/src/main/res/values/private_strings.xml
keystore.properties
service_account.json
# Created by https://www.gitignore.io/api/android
# Edit at https://www.gitignore.io/?templates=android
### Android ###
# Built application files
*.apk
*.ap_
*.aab
# Release files
app/release/*
app/debug/*
# Files for the ART/Dalvik VM
*.dex
# Java class files
*.class
# Generated files
bin/
gen/
out/
# Gradle files
.gradle/
build/
# Local configuration file (sdk path, etc)
local.properties
# Proguard folder generated by Eclipse
proguard/
# Log Files
*.log
# Android Studio Navigation editor temp files
.navigation/
# Android Studio captures folder
captures/
# IntelliJ
*.iml
.idea/workspace.xml
.idea/tasks.xml
.idea/gradle.xml
.idea/assetWizardSettings.xml
.idea/dictionaries
.idea/libraries
.idea/caches
# Keystore files
# Uncomment the following lines if you do not want to check your keystore files in.
#*.jks
#*.keystore
# External native build folder generated in Android Studio 2.2 and later
.externalNativeBuild
# Google Services (e.g. APIs or Firebase)
google-services.json
# Freeline
freeline.py
freeline/
freeline_project_description.json
# fastlane
fastlane/report.xml
fastlane/Preview.html
fastlane/screenshots
fastlane/test_output
fastlane/readme.md
### Android Patch ###
gen-external-apklibs
# End of https://www.gitignore.io/api/android
================================================
FILE: .idea/encodings.xml
================================================
================================================
FILE: .idea/misc.xml
================================================
================================================
FILE: .idea/modules.xml
================================================
================================================
FILE: .idea/vcs.xml
================================================
================================================
FILE: LICENSE
================================================
BSD 3-Clause License
Copyright (c) 2016, 0xbad1d3a5
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
================================================
FILE: README.md
================================================
Kaku: 画 (かく) - stroke (of a kanji, etc.), picture, drawing
https://kaku.fuwafuwa.ca/
Kaku is a fast, powerful Japanese dictionary that stays on top of all your apps. It uses optical character recognition (OCR) technology to recognize kanji on the device screen for you (rather than the slowww tedious process of looking up individual characters manually), making it perfect for Japanese learners who want to study by reading raw manga, play untranslated games, and so on without the hassle of switching apps.
[
](https://f-droid.org/packages/ca.fuwafuwa.kaku/)
[
](https://play.google.com/store/apps/details?id=ca.fuwafuwa.kaku)
================================================
FILE: app/.gitignore
================================================
/build
================================================
FILE: app/build.gradle
================================================
plugins {
id 'com.android.application'
}
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
android {
compileSdkVersion 31
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
def versionPrefix = "1.3"
defaultConfig {
applicationId "ca.fuwafuwa.kaku"
minSdkVersion 21
targetSdkVersion 31
versionCode 78
versionName "$versionPrefix.$versionCode"
}
buildFeatures {
viewBinding true
}
buildTypes {
release {
debuggable false
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
debug {
debuggable true
}
}
packagingOptions {
resources {
excludes += ['META-INF/DEPENDENCIES', 'META-INF/LICENSE', 'META-INF/LICENSE.txt', 'META-INF/license.txt', 'META-INF/NOTICE', 'META-INF/NOTICE.txt', 'META-INF/notice.txt', 'META-INF/ASL2.0', 'META-INF/CONTRIBUTORS.md', 'META-INF/LICENSE.md']
}
}
testOptions {
unitTests.returnDefaultValues = true
}
}
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'com.rmtheis:tess-two:9.0.0'
implementation 'com.google.guava:guava:31.0.1-android'
implementation 'com.google.code.gson:gson:2.8.9'
implementation 'androidx.appcompat:appcompat:1.4.1'
implementation 'com.google.android.material:material:1.6.0'
implementation 'com.j256.ormlite:ormlite-android:5.1'
implementation 'com.google.android.gms:play-services-ads:20.6.0'
implementation 'com.atilika.kuromoji:kuromoji-core:0.9.0'
implementation 'com.atilika.kuromoji:kuromoji-ipadic:0.9.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.3'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
testImplementation 'junit:junit:4.13.2'
// Probably just delete all these was trying to get GenerateDictionary to work as a Unit Test
testImplementation 'com.j256.ormlite:ormlite-core:5.1'
testImplementation 'com.j256.ormlite:ormlite-jdbc:5.1'
testImplementation 'org.xerial:sqlite-jdbc:3.25.2'
testImplementation 'xmlpull:xmlpull:1.1.3.1'
testImplementation 'kxml2:kxml2:2.3.0'
}
================================================
FILE: app/proguard-rules.pro
================================================
# Add project specific ProGuard rules here.
# By default, the flags in this file are appended to flags specified
# in D:\Android\AndroidSDK/tools/proguard/proguard-android.txt
# You can edit the include path and order by changing the proguardFiles
# directive in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# Add any project specific keep options here:
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
================================================
FILE: app/src/main/AndroidManifest.xml
================================================
================================================
FILE: app/src/main/java/ca/fuwafuwa/kaku/BetaActivity.kt
================================================
package ca.fuwafuwa.kaku
import android.content.Intent
import android.net.Uri
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.widget.Button
class BetaActivity : AppCompatActivity()
{
override fun onCreate(savedInstanceState: Bundle?)
{
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_beta)
findViewById