Giter Site home page Giter Site logo

kmutil's Introduction

Kotlin multi-platform utilities for scripts and command line utilities

Provide some useful classes and functions for Kotlin multiplatform utilities Based on de.rdvsb.kmapi

Preliminary version 0.2.2

0.2.1

  • added KmProc.pipeSystem()
  • added KmProc system()/pipeSystem() make last call to processLine() with LineFrom.EOP (EndOfProcess)

0.1.24

  • added String.abbreviate((maxLen: Int, appendIfLonger: String = "...")

0.1.23

  • added Collection.padStart(minSize: Int, padWith: T): List
  • added String.parseMMSS(): Duration?
  • added String.parseHHMM(): Duration? ``### 0.1.21
  • added Collection.padEnd(minSize: Int, padWith: T): List

0.1.20

  • added tag parameter to logMessageNested(): Boolean

0.1.19

  • logMessageNestedLine(): Boolean // extract timestamp msgId and separator from single line msg (log stdout from an external command call)
  • logMessageNested(): Boolean // extract timestamp msgId and separator from possibly multiline msg (log stdout from an external command call)

0.1.16

  • logMessage.isStdWithTimestamp: Boolean // emit log to stdout/stderr with timestamp
  • de.rdvsb.kmapi.File renamed to de.rdvsb.kmapi.KmFile

parts working (using kmutil and kmapi):

Module Common JVM NativeLinux NativeMingw
Args x x x x
logMessage x x x x
KmFile x x x x
InputStream x x - -
OutputStream x x - -
KmProcess x x - -
StringUtil x x x x
DateTime x x x x

Goals

  • Ability to write these utilities in a platform independent fashion
  • Facilitate the creation of script like utilities (e.g. alternative or replacement of Bash, Perl, Python scripts)
  • Develop using the JVM, deploy as native

Non goals

  • Support mobile platforms
  • Support Web platforms

Use for

  • Native
  • JVM
  • Server
  • Desktop

Classes, singletons and extensions

  • BasicGetArgs
  • logMessage
  • String extensions

Note

  • This is a work in progress. Functionality will be added when needed
  • Prefer functionality of the Kotlin standard library, as long as it is implemented for the JVM and Native target

Licence

Apache 2.0

kmutil's People

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.