Skip to content

Commit

Permalink
First commit for open publicly
Browse files Browse the repository at this point in the history
  • Loading branch information
keshihoriuchi committed Jan 3, 2021
0 parents commit aaab672
Show file tree
Hide file tree
Showing 50 changed files with 11,919 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/win.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Release Build

on: [push]

jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Build with Gradle
run: cd cli && .\gradlew.bat distZip
- uses: actions/setup-node@v2
with:
node-version: '14'
- name: Release GUI
run: cd gui && npm install && npm run copy-cli && npm run release
- name: Archive a zip for releasing
uses: actions/upload-artifact@v2
with:
name: Gahi-0.0.1-win.zip
path: gui/releases/Gahi-0.0.1-win.zip
342 changes: 342 additions & 0 deletions LICENSE

Large diffs are not rendered by default.

47 changes: 47 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Gahi

[English](#readme-english) | [日本語](#readme-日本語)

## Readme (English)

This application finds duplicated images in a directory. And you can select and delete some found images.

![](./demo_en.gif)

### Requirements

* Windows
* Java 1.8 or later is installed

### Internal Design

* cli
* CLI written by Java powered by [LIRE](https://github.com/dermotte/LIRE)
* gui
* Electron + React + TypeScript. It executes the CLI on relative path internally.

### Download

https://github.com/keshihoriuchi/gahi/releases

## Readme (日本語)

ディレクトリの中から重複した画像を自動で探して表示し、選択した画像をゴミ箱に移動できるアプリケーション。

![](./demo.gif)

### 実行要件

* Windows
* Java1.8以上がインストールされている

### ダウンロード

https://github.com/keshihoriuchi/gahi/releases

### 内部設計

* cli
* [LIRE](https://github.com/dermotte/LIRE) を利用したJavaのCLI
* gui
* Electron+React+TypeScript。相対パスのCLIを内部的に実行する
137 changes: 137 additions & 0 deletions cli/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,137 @@

# Created by https://www.gitignore.io/api/java,gradle,intellij
# Edit at https://www.gitignore.io/?templates=java,gradle,intellij

### Intellij ###
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839

# User-specific stuff
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/**/usage.statistics.xml
.idea/**/dictionaries
.idea/**/shelf

# Generated files
.idea/**/contentModel.xml

# Sensitive or high-churn files
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml
.idea/**/dbnavigator.xml

# Gradle
.idea/**/gradle.xml
.idea/**/libraries

# Gradle and Maven with auto-import
# When using Gradle or Maven with auto-import, you should exclude module files,
# since they will be recreated, and may cause churn. Uncomment if using
# auto-import.
# .idea/modules.xml
# .idea/*.iml
# .idea/modules
# *.iml
# *.ipr

# CMake
cmake-build-*/

# Mongo Explorer plugin
.idea/**/mongoSettings.xml

# File-based project format
*.iws

# IntelliJ
out/

# mpeltonen/sbt-idea plugin
.idea_modules/

# JIRA plugin
atlassian-ide-plugin.xml

# Cursive Clojure plugin
.idea/replstate.xml

# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties

# Editor-based Rest Client
.idea/httpRequests

# Android studio 3.1+ serialized cache file
.idea/caches/build_file_checksums.ser

### Intellij Patch ###
# Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721

# *.iml
# modules.xml
# .idea/misc.xml
# *.ipr

# Sonarlint plugin
.idea/**/sonarlint/

# SonarQube Plugin
.idea/**/sonarIssues.xml

# Markdown Navigator plugin
.idea/**/markdown-navigator.xml
.idea/**/markdown-navigator/

### Java ###
# Compiled class file
*.class

# Log file
*.log

# BlueJ files
*.ctxt

# Mobile Tools for Java (J2ME)
.mtj.tmp/

# Package Files #
# *.jar
*.war
*.nar
*.ear
*.zip
*.tar.gz
*.rar

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*

### Gradle ###
.gradle
build/

# Ignore Gradle GUI config
gradle-app.setting

# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
!gradle-wrapper.jar

# Cache of project
.gradletasknamecache

# # Work around https://youtrack.jetbrains.com/issue/IDEA-116898
# gradle/wrapper/gradle-wrapper.properties

### Gradle Patch ###
**/build/

# End of https://www.gitignore.io/api/java,gradle,intellij
2 changes: 2 additions & 0 deletions cli/.idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions cli/.idea/.name

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions cli/.idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 20 additions & 0 deletions cli/.idea/jarRepositories.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions cli/.idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions cli/.idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

37 changes: 37 additions & 0 deletions cli/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Gahi CLI

A command-line image simirality checker powered by LIRE.

## Usage (On Windows)

### Build

```
> .\gradlew.bat distZip
```

Artifacts are built in `.\build\distributions`

### Running

```
> .\gahi-cli.bat dup C:\images\
[["C:\images\001.png","C:\images\002.png"],["C:\images\101.png","C:\images\102.png","C:\images\103.png"]
```

#### Side effects

`temp_index` direactory is created at the current directory. Indexing data are in the directory.

## LICENSE

GPL v2.0

Because the license of LIRE is GPL v2.0.

## Internal steps

1. Gahi creates `temp_index` at the current directory if it doesn' exist.
2. Gahi removes all files in `temp_index`.
3. Gahi creates index files for target dir.
4. Gahi applies `dup` or `search` to index files.
40 changes: 40 additions & 0 deletions cli/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
plugins {
id 'java'
id 'application'
}

group 'io.github.keshihoriuchi'
version '0.0.1'

sourceCompatibility = 1.8

repositories {
mavenCentral()
}

dependencies {
compile group: 'org.apache.lucene', name: 'lucene-core', version: '8.0.0'
compile group: 'org.apache.lucene', name: 'lucene-analyzers-common', version: '8.0.0'
compile group: 'org.apache.lucene', name: 'lucene-queryparser', version: '8.0.0'
compile group: 'commons-io', name: 'commons-io', version: '2.6'
compile group: 'org.apache.commons', name: 'commons-math3', version: '3.6.1'
compile group: 'com.sangupta', name: 'jopensurf', version: '1.0.0'
compile group: 'org.json', name: 'json', version: '20160810'
compile group: 'commons-cli', name: 'commons-cli', version: '1.4'

compile fileTree(dir: 'lib', include: '*.jar')
testCompile group: 'junit', name: 'junit', version: '4.12'
}

tasks.withType(JavaCompile) {
options.compilerArgs << '-Xlint:unchecked'
options.compilerArgs << '-Xlint:deprecation'
}

task copyTestResources(type: Copy) {
from "${projectDir}/src/test/resources"
into "${buildDir}/classes/java/test/io/github/keshihoriuchi/gahi"
}
processTestResources.dependsOn copyTestResources

mainClassName = 'io.github.keshihoriuchi.gahi.Cli'
Binary file added cli/gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
6 changes: 6 additions & 0 deletions cli/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#Sun Dec 29 15:08:22 JST 2019
distributionUrl=https\://services.gradle.org/distributions/gradle-5.2.1-all.zip
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
Loading

0 comments on commit aaab672

Please sign in to comment.