Skip to content

Commit

Permalink
Fix JDK version and OkHttp update
Browse files Browse the repository at this point in the history
  • Loading branch information
af-a1997 committed Jun 5, 2023
1 parent 1131183 commit 6f91184
Show file tree
Hide file tree
Showing 6 changed files with 48 additions and 35 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## 1.2.0

* Fixed JDK version, as well as any relevant code to this change.
* Updated OkHttp to version 4.11.0.

## 1.1.1

* Fixed sorting criteria detection.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Refer to the TODOs project for more details on the list of missing features to b
***GeoPicSorter*** currently detects only `.jpg` and `.jpeg` files, conducting tests with other formats that support geotags in one way or another is planned.

### :white_check_mark: Tested on
> :information_source: ***GeoPicSorter*** is known to work on the following OSes and versions, it may not work as intended on other OSes. Please note Java SE is required to run the program.
> :information_source: ***GeoPicSorter*** has been tested to work on the following OSes and architectures.
* Windows 10 x64.

Expand Down
6 changes: 3 additions & 3 deletions dependency-reduced-pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<groupId>com.afa1997</groupId>
<artifactId>GeoPicSorter</artifactId>
<name>GeoPicSorter</name>
<version>1.1.1</version>
<version>1.2.0</version>
<description>GeoPicSorter is a tool written in Java by Aldo Franquez &lt; af-a1997.github.io &gt;, licensed under GNU AGPL 3.0.

Its goal is to help the user automate the process of organizing geotagged pictures based on groups of locations such as streets, cities, etc.
Expand Down Expand Up @@ -34,9 +34,9 @@ Home page: https://af-a1997.github.io/pages/programs/GeoPicSorter/</description>
</plugins>
</build>
<properties>
<maven.compiler.target>19</maven.compiler.target>
<exec.mainClass>com.afa1997.geopicsorter.GeoPicSorter</exec.mainClass>
<maven.compiler.source>19</maven.compiler.source>
<maven.compiler.source>1.8</maven.compiler.source>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>
</project>
19 changes: 4 additions & 15 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,51 +9,40 @@
Its goal is to help the user automate the process of organizing geotagged pictures based on groups of locations such as streets, cities, etc.

Home page: https://af-a1997.github.io/pages/programs/GeoPicSorter/</description>
<version>1.1.1</version> <!-- Version of GeoPicSorter: x.y.z ; where: x = major release, y = minor release, z = hotfix -->
<version>1.2.0</version> <!-- Version of GeoPicSorter: x.y.z ; where: x = major release, y = minor release, z = hotfix -->
<packaging>jar</packaging>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>19</maven.compiler.source>
<maven.compiler.target>19</maven.compiler.target>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<exec.mainClass>com.afa1997.geopicsorter.GeoPicSorter</exec.mainClass>
</properties>
<dependencies>
<!-- https://github.com/drewnoakes/metadata-extractor -->
<dependency>
<groupId>com.drewnoakes</groupId>
<artifactId>metadata-extractor</artifactId>
<version>2.18.0</version>
</dependency>

<!-- https://mvnrepository.com/artifact/org.xerial/sqlite-jdbc -->
<dependency>
<groupId>org.xerial</groupId>
<artifactId>sqlite-jdbc</artifactId>
<version>3.42.0.0</version>
</dependency>

<!-- https://square.github.io/okhttp/ -->
<dependency>
<groupId>com.squareup.okhttp3</groupId>
<artifactId>okhttp</artifactId>
<version>4.10.0</version>
<version>4.11.0</version>
</dependency>

<!-- https://mvnrepository.com/artifact/org.json/json -->
<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>20230227</version>
</dependency>

<!-- https://search.maven.org/artifact/commons-io/commons-io/2.11.0/jar -->
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.12.0</version>
</dependency>

<!-- https://github.com/srikanth-lingala/zip4j -->
<dependency>
<groupId>net.lingala.zip4j</groupId>
<artifactId>zip4j</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,25 @@ public List<String[]> RG_SRC0_GetLocNames(int organization_criteria) throws SQLE

// Keywords related to sorting criterias, most of them are actual API body response keys (in the JSON object) but a few like [continent] aren't, they're here for ease of readability and make the logic below easier to mantain/update.
String org_crit_str;
switch (organization_criteria) {
case 0 -> org_crit_str = "street";
case 1 -> org_crit_str = "city";
case 2 -> org_crit_str = "state";
case 3 -> org_crit_str = "country";
case 4 -> org_crit_str = "continent";
default -> {
switch (organization_criteria){
case 0:
org_crit_str = "street";
break;
case 1:
org_crit_str = "city";
break;
case 2:
org_crit_str = "state";
break;
case 3:
org_crit_str = "country";
break;
case 4:
org_crit_str = "continent";
break;

default:
org_crit_str = "street";
}
}
System.out.println("The sorting criteria is = " + org_crit_str);

Expand Down Expand Up @@ -105,13 +115,22 @@ public List<String[]> RG_SRC0_GetLocNames(int organization_criteria) throws SQLE
else{
String non_ex_var;

switch (org_crit_str) {
case "street" -> non_ex_var = ShStrings.FOLDER_NO_STREET;
case "city" -> non_ex_var = ShStrings.FOLDER_NO_CITY;
case "state" -> non_ex_var = ShStrings.FOLDER_NO_STATE;
case "country" -> non_ex_var = ShStrings.FOLDER_NO_COUNTRY;

default -> non_ex_var = ShStrings.FOLDER_NO_STREET;
switch(org_crit_str){
case "street":
non_ex_var = ShStrings.FOLDER_NO_STREET;
break;
case "city":
non_ex_var = ShStrings.FOLDER_NO_CITY;
break;
case "state":
non_ex_var = ShStrings.FOLDER_NO_STATE;
break;
case "country":
non_ex_var = ShStrings.FOLDER_NO_COUNTRY;
break;

default:
non_ex_var = ShStrings.FOLDER_NO_CITY;
}

save_loc_names.addBatch("UPDATE pictures SET location_name = \"" + non_ex_var + "\" WHERE id = " + rs_sel_fns.getString("id") + ";");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ public class ShStrings {

// Project related values.
public static final String PROG_NAME = "GeoPicSorter";
public static final String PROG_VER = "1.1.1";
public static final String PROG_VER = "1.2.0";
public static final String PROG_NAME_FULL = PROG_NAME + " " + PROG_VER;
public static final String REPO_LOC = "https://github.com/af-a1997/GeoPicSorter";

Expand Down

0 comments on commit 6f91184

Please sign in to comment.