Refactor, Rename, Cleanup

This commit is contained in:
nelle 2024-02-17 04:16:53 -07:00
parent 5c9f29eaaa
commit 888e0ce990
11 changed files with 20 additions and 20 deletions

View file

@ -1 +1 @@
org-data-accessor
KRemoteAccess

View file

@ -3,6 +3,7 @@
<component name="CheckStyle-IDEA" serialisationVersion="2">
<checkstyleVersion>10.12.5</checkstyleVersion>
<scanScope>JavaOnly</scanScope>
<scanBeforeCheckin>true</scanBeforeCheckin>
<option name="thirdPartyClasspath" />
<option name="activeLocationIds" />
<option name="locations">

View file

@ -1,4 +1,4 @@
# KRemoteAccess
# kotRemote
Wrapper for sshfs, built in Kotlin, and utilizes [Jexer](https://git.ouroboros.group/limepotato/jexer)

View file

@ -11,6 +11,5 @@
- Probably should have logging of some sort, if something goes wrong for a board member
~~- Detect system (windows/linux(x11 or wayland?)/terminal?)~~ and environment, ~~then switch Jexers environment based on that~~
~~- Maybe make this not hardcode org servers, rebrand, allow user to customize servers (none at start),~~ and keep them saved, then open-source?
- Rename/Rebrand
- Allow function of a file browser in Jexer?
- Allow function of a terminal/remote terminal in Jexer?

View file

@ -34,14 +34,14 @@ tasks {
named<ShadowJar>("shadowJar") {
mergeServiceFiles()
manifest {
attributes(mapOf("Main-Class" to "org.bm00.kRemoteAccess.MainKt"))
attributes(mapOf("Main-Class" to "xyz.limepot.kotRemote.MainKt"))
}
}
}
val jar by tasks.getting(Jar::class) {
manifest {
attributes["Main-Class"] = "org.bm00.kRemoteAccess.MainKt"
attributes["Main-Class"] = "xyz.limepot.kotRemote.MainKt"
}
}

View file

@ -1,5 +1,5 @@
plugins {
id("org.gradle.toolchains.foojay-resolver-convention") version "0.5.0"
}
rootProject.name = "KRemoteAccess"
rootProject.name = "kotRemote"

View file

@ -1,7 +1,7 @@
package xyz.limepot.kRemoteAccess
package xyz.limepot.kotRemote
import jexer.TApplication
import xyz.limepot.kRemoteAccess.jexerWindow.WelcomeWindow
import xyz.limepot.kotRemote.jexerWindow.WelcomeWindow
import java.util.*
//// OS CHECKER ////

View file

@ -1,4 +1,4 @@
package xyz.limepot.kRemoteAccess
package xyz.limepot.kotRemote
import dev.dirs.ProjectDirectories
import java.io.File
@ -12,9 +12,9 @@ import java.util.*
val prop = Properties()
class Config {
val confDir = ProjectDirectories.from("org", "bm00", "osda")
val confDir = ProjectDirectories.from("limepot", "xyz", "kotRemote")
val runDir = File(confDir.configDir)
val confFile = File(confDir.configDir + "/osda.cfg")
val confFile = File(confDir.configDir + "/kotRemote.cfg")
private val prop = Properties()
private var runDirExists = runDir.exists()
init {
@ -27,13 +27,13 @@ class Config {
}
//Otherwise create the necessary directories
else{
Files.createFile(Paths.get(confDir.configDir + "/osda.cfg"))
Files.createFile(Paths.get(confDir.configDir + "/kotRemote.cfg"))
FileInputStream(confFile).use {
prop.load(it)
prop.setProperty("configVersion", "1")
}
val out: OutputStream = FileOutputStream(confFile)
prop.store(out, "Org Secure Data Accessor - OSDA Config file")
prop.store(out, "kotRemote Config File")
}
//Set Jexer Colors

View file

@ -1,10 +1,10 @@
package xyz.limepot.kRemoteAccess.jexerWindow
package xyz.limepot.kotRemote.jexerWindow
import jexer.TAction
import jexer.TApplication
import jexer.TWindow
import jexer.layout.StretchLayoutManager
import xyz.limepot.kRemoteAccess.osName
import xyz.limepot.kotRemote.osName
import java.util.*
//// OS CHECKER ////

View file

@ -1,4 +1,4 @@
package xyz.limepot.kRemoteAccess.jexerWindow
package xyz.limepot.kotRemote.jexerWindow
import jexer.TAction
import jexer.TApplication
@ -6,7 +6,7 @@ import jexer.TWindow
import jexer.layout.StretchLayoutManager
class WelcomeWindow private constructor(parent: TApplication, flags: Int) :
TWindow(parent, "KRemoteAccess", 0, 0, 46, 8, flags) {
TWindow(parent, "kotRemote", 0, 0, 46, 8, flags) {
constructor(parent: TApplication) : this(parent, CENTERED)
init {
layoutManager = StretchLayoutManager(
@ -25,7 +25,7 @@ class WelcomeWindow private constructor(parent: TApplication, flags: Int) :
addButton("Exit...", CENTERED + 28, CENTERED - 2,
object : TAction() {
override fun DO() {
if (xyz.limepot.kRemoteAccess.osName == "LINUX") {
if (xyz.limepot.kotRemote.osName == "LINUX") {
ProcessBuilder("umount", "/tmp/osda_mount")
.redirectOutput(ProcessBuilder.Redirect.INHERIT)
.redirectError(ProcessBuilder.Redirect.INHERIT)
@ -33,7 +33,7 @@ class WelcomeWindow private constructor(parent: TApplication, flags: Int) :
.waitFor()
System.exit(0)
}
else if (xyz.limepot.kRemoteAccess.osName == "WINDOWS") {
else if (xyz.limepot.kotRemote.osName == "WINDOWS") {
ProcessBuilder("net", "use", "O:", "/delete")
.redirectOutput(ProcessBuilder.Redirect.INHERIT)
.redirectError(ProcessBuilder.Redirect.INHERIT)

View file

@ -1,4 +1,4 @@
package xyz.limepot.kRemoteAccess
package xyz.limepot.kotRemote
import java.util.*