# Complementary User Guide See [README](../README.md) for general instructions about how to use `kscript. In here more specific use-cases are discussed. __{work in progress}__ Feel welcome to submit a [ticket](https://github.com/holgerbrandl/kscript/issues) if you think something should be detailed out better in here. [TOC levels=3]: # " " - [Requirements for running `kscript`](#requirements-for-running-kscript) - [Create interpreters for custom DSLs](#create-interpreters-for-custom-dsls) - [Tips and tricks](#tips-and-tricks) - [Display images inline and open other files](#display-images-inline-and-open-other-files) - [Testing](#testing) - [Text Processing](#text-processing) - [Examples](#examples) - [Bioinformatics](#bioinformatics) ## Requirements for running `kscript` Always needed when running `kscript`: * `jar` (not sure if this is part of jre or just jdk; * `kotlinc` to compile the script and a wrapper class * `kotlin` to run the user application (and to run itself) which itself requires a jre * `bash` is used for the launcher optional dependencies * `mvn` to resolve dependencies if present in the script Actually the repo contains a docker container spec that details out what is needed to run kscript. See https://github.com/holgerbrandl/kscript/blob/master/misc/Dockerfile ## Create interpreters for custom DSLs `kscript` makes it easy to derive custom interpreters. All you need to do is to write a wrapper that declares a preamble. See [`mydsl`](https://github.com/holgerbrandl/kscript/tree/master/test/resources/custom_dsl/mydsl) for an example interpreter called `mydsl`. Before you can start using `mydsl` you need to add it to it to your `$PATH` ``` export PATH=${PATH}:${KSCRIPT_HOME}/test/resources/custom_dsl ``` It can be used in the same way as `kscript` including all command-line arguments: ```bash mydsl "1+1" ``` Usage help is customized (within some limits). For more customizability you could for sure also fork the repo, and take it from there. :-) ```bash mydsl --help ``` ``` mydsl - Enhanced scripting support for Kotlin on *nix-based systems. Usage: mydsl [options]