a lib just package the process for unnecessary things etc. Async Flow and Coroutines.
yes, it could be more powerful some how #2
it's a veeeeery simple lib with JUST 1 CORE FILE, and it's 200 lines code only. so just read it
Shell("echo hello world").await() {
if (it is CommandResult.Success) it.let(::println)
}
Shell("ping xvidoes.com")
.collect(::println)
val req = Shell {
if ( foo )
run("bar")
if ( foo2 ){
write("bar2")
run()
}
}
delay(3000)
req
.await()
.let(::doSth)
import me.heizi.koltinx.loggger.error
import me.heizi.koltinx.loggger.println
class `class name as tag` {
fun log(msg:String)
= this.println("msg-log",msg)
fun err(msg:String)
= this.error("msg-log",msg)
}
maven { url = uri("https://jitpack.io")}
// required: coroutine
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4")
// gradle.properties if you're
val khellVersion = extra["khell.version"] as String
// Khell
implementation("com.github.ElisaMin:khell:$khellVersion")
// or Khell Android
implementation("com.github.ElisaMin:khell-android:$khellVersion")
// or Khell JVM
implementation("com.github.ElisaMin:khell-jvm:$khellVersion")
// option: but JVM log impl must be
implementation("org.slf4j:slf4j-log4j12:+")
// option: the LOG lib
//implementation("com.github.ElisaMin:khell-log:$khellVersion")
.....