From a13203c477bf32822453883895dcf7858c86017c Mon Sep 17 00:00:00 2001
From: Seil0 <seil0@mosad.xyz>
Date: Wed, 15 Jan 2020 13:42:40 +0100
Subject: [PATCH] use the current directory to store the config.xml and cached
 timetables

---
 .gitignore                                                  | 6 +++++-
 build.gradle                                                | 2 +-
 .../kotlin/org/mosad/thecitadelofricks/APIController.kt     | 4 ++--
 src/main/kotlin/org/mosad/thecitadelofricks/Application.kt  | 2 +-
 src/main/kotlin/org/mosad/thecitadelofricks/DataTypes.kt    | 2 +-
 .../mosad/thecitadelofricks/controller/CacheController.kt   | 4 ++--
 .../thecitadelofricks/controller/CachetAPIController.kt     | 2 +-
 .../mosad/thecitadelofricks/controller/StartupController.kt | 6 +++---
 .../mosad/thecitadelofricks/controller/StatusController.kt  | 2 +-
 .../mosad/thecitadelofricks/hsoparser/CourseListParser.kt   | 2 +-
 .../org/mosad/thecitadelofricks/hsoparser/MensaParser.kt    | 2 +-
 .../mosad/thecitadelofricks/hsoparser/TimetableParser.kt    | 2 +-
 12 files changed, 20 insertions(+), 16 deletions(-)

diff --git a/.gitignore b/.gitignore
index f2ea75f..310f618 100644
--- a/.gitignore
+++ b/.gitignore
@@ -35,6 +35,7 @@ captures/
 
 # Intellij
 *.iml
+.idea/
 .idea/workspace.xml
 .idea/tasks.xml
 .idea/gradle.xml
@@ -55,6 +56,9 @@ freeline.py
 freeline/
 freeline_project_description.json
 
+# KDE
 .directory
-.idea/
+
+# tcor
+tcor/
 
diff --git a/build.gradle b/build.gradle
index 8e7f571..0413694 100644
--- a/build.gradle
+++ b/build.gradle
@@ -49,4 +49,4 @@ compileTestKotlin {
 }
 
 group 'org.mosad'
-version '1.2.0'
+version '1.2.1'
diff --git a/src/main/kotlin/org/mosad/thecitadelofricks/APIController.kt b/src/main/kotlin/org/mosad/thecitadelofricks/APIController.kt
index 8606f95..2893327 100644
--- a/src/main/kotlin/org/mosad/thecitadelofricks/APIController.kt
+++ b/src/main/kotlin/org/mosad/thecitadelofricks/APIController.kt
@@ -1,7 +1,7 @@
 /**
  * TheCitadelofRicks
  *
- * Copyright 2019  <seil0@mosad.xyz>
+ * Copyright 2019-2020  <seil0@mosad.xyz>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -48,7 +48,7 @@ class APIController {
 
     companion object {
         const val apiVersion = "1.1.4"
-        const val softwareVersion = "1.2.0"
+        const val softwareVersion = "1.2.1"
         val startTime = System.currentTimeMillis() / 1000
     }
 
diff --git a/src/main/kotlin/org/mosad/thecitadelofricks/Application.kt b/src/main/kotlin/org/mosad/thecitadelofricks/Application.kt
index 1175b98..be37b2f 100644
--- a/src/main/kotlin/org/mosad/thecitadelofricks/Application.kt
+++ b/src/main/kotlin/org/mosad/thecitadelofricks/Application.kt
@@ -1,7 +1,7 @@
 /**
  * TheCitadelofRicks
  *
- * Copyright 2019  <seil0@mosad.xyz>
+ * Copyright 2019-2020 <seil0@mosad.xyz>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
diff --git a/src/main/kotlin/org/mosad/thecitadelofricks/DataTypes.kt b/src/main/kotlin/org/mosad/thecitadelofricks/DataTypes.kt
index 684c4ee..64cec92 100644
--- a/src/main/kotlin/org/mosad/thecitadelofricks/DataTypes.kt
+++ b/src/main/kotlin/org/mosad/thecitadelofricks/DataTypes.kt
@@ -1,7 +1,7 @@
 /**
  * TheCitadelofRicks
  *
- * Copyright 2019  <seil0@mosad.xyz>
+ * Copyright 2019-2020  <seil0@mosad.xyz>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
diff --git a/src/main/kotlin/org/mosad/thecitadelofricks/controller/CacheController.kt b/src/main/kotlin/org/mosad/thecitadelofricks/controller/CacheController.kt
index fd3466a..ea5bc68 100644
--- a/src/main/kotlin/org/mosad/thecitadelofricks/controller/CacheController.kt
+++ b/src/main/kotlin/org/mosad/thecitadelofricks/controller/CacheController.kt
@@ -1,7 +1,7 @@
 /**
  * TheCitadelofRicks
  *
- * Copyright 2019  <seil0@mosad.xyz>
+ * Copyright 2019-2020  <seil0@mosad.xyz>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -116,7 +116,7 @@ class CacheController {
         }
 
         /**
-         * get every explicit lesson in a week
+         * get every lesson of a subject in a week
          * @param courseName the name of the course to be requested
          * @param lessonSubject the lesson subject to be requested
          * @param weekIndex request week number (current week = 0)
diff --git a/src/main/kotlin/org/mosad/thecitadelofricks/controller/CachetAPIController.kt b/src/main/kotlin/org/mosad/thecitadelofricks/controller/CachetAPIController.kt
index 0b6b87d..a424572 100644
--- a/src/main/kotlin/org/mosad/thecitadelofricks/controller/CachetAPIController.kt
+++ b/src/main/kotlin/org/mosad/thecitadelofricks/controller/CachetAPIController.kt
@@ -1,7 +1,7 @@
 /**
  * TheCitadelofRicks
  *
- * Copyright 2019  <seil0@mosad.xyz>
+ * Copyright 2019-2020  <seil0@mosad.xyz>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
diff --git a/src/main/kotlin/org/mosad/thecitadelofricks/controller/StartupController.kt b/src/main/kotlin/org/mosad/thecitadelofricks/controller/StartupController.kt
index 704670b..a1ea6e5 100644
--- a/src/main/kotlin/org/mosad/thecitadelofricks/controller/StartupController.kt
+++ b/src/main/kotlin/org/mosad/thecitadelofricks/controller/StartupController.kt
@@ -1,7 +1,7 @@
 /**
  * TheCitadelofRicks
  *
- * Copyright 2019  <seil0@mosad.xyz>
+ * Copyright 2019-2020  <seil0@mosad.xyz>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -35,8 +35,8 @@ class StartupController {
     private val logger: Logger = LoggerFactory.getLogger(CacheController::class.java)
 
     companion object {
-        val userHome: String = System.getProperty("user.home")
-        val tcorHome = "$userHome/.tcor"
+        val userHome: String = System.getProperty("user.dir")
+        val tcorHome = "$userHome/tcor"
         val dirTcorHome = File(tcorHome)
         val dirTcorCache = File("$tcorHome/cache")
         val fileConfig = File("$tcorHome/config.xml")
diff --git a/src/main/kotlin/org/mosad/thecitadelofricks/controller/StatusController.kt b/src/main/kotlin/org/mosad/thecitadelofricks/controller/StatusController.kt
index 06aa7d3..abff172 100644
--- a/src/main/kotlin/org/mosad/thecitadelofricks/controller/StatusController.kt
+++ b/src/main/kotlin/org/mosad/thecitadelofricks/controller/StatusController.kt
@@ -1,7 +1,7 @@
 /**
  * TheCitadelofRicks
  *
- * Copyright 2019  <seil0@mosad.xyz>
+ * Copyright 2019-2020  <seil0@mosad.xyz>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
diff --git a/src/main/kotlin/org/mosad/thecitadelofricks/hsoparser/CourseListParser.kt b/src/main/kotlin/org/mosad/thecitadelofricks/hsoparser/CourseListParser.kt
index 29d6635..6aacf33 100644
--- a/src/main/kotlin/org/mosad/thecitadelofricks/hsoparser/CourseListParser.kt
+++ b/src/main/kotlin/org/mosad/thecitadelofricks/hsoparser/CourseListParser.kt
@@ -1,7 +1,7 @@
 /**
  * TheCitadelofRicks
  *
- * Copyright 2019  <seil0@mosad.xyz>
+ * Copyright 2019-2020  <seil0@mosad.xyz>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
diff --git a/src/main/kotlin/org/mosad/thecitadelofricks/hsoparser/MensaParser.kt b/src/main/kotlin/org/mosad/thecitadelofricks/hsoparser/MensaParser.kt
index 6655b55..4ff1c7d 100644
--- a/src/main/kotlin/org/mosad/thecitadelofricks/hsoparser/MensaParser.kt
+++ b/src/main/kotlin/org/mosad/thecitadelofricks/hsoparser/MensaParser.kt
@@ -1,7 +1,7 @@
 /**
  * TheCitadelofRicks
  *
- * Copyright 2019  <seil0@mosad.xyz>
+ * Copyright 2019-2020  <seil0@mosad.xyz>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
diff --git a/src/main/kotlin/org/mosad/thecitadelofricks/hsoparser/TimetableParser.kt b/src/main/kotlin/org/mosad/thecitadelofricks/hsoparser/TimetableParser.kt
index d7bf9e9..36708e9 100644
--- a/src/main/kotlin/org/mosad/thecitadelofricks/hsoparser/TimetableParser.kt
+++ b/src/main/kotlin/org/mosad/thecitadelofricks/hsoparser/TimetableParser.kt
@@ -1,7 +1,7 @@
 /**
  * TheCitadelofRicks
  *
- * Copyright 2019  <seil0@mosad.xyz>
+ * Copyright 2019-2020  <seil0@mosad.xyz>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by