From 8e7b96a7c3efc35c60dc081b95aa76c75b451b1a Mon Sep 17 00:00:00 2001 From: Ilya Muradyan Date: Thu, 26 Dec 2019 18:20:56 +0300 Subject: [PATCH] Added documentation --- README.md | 8 ++++++++ src/main/kotlin/org/jetbrains/kotlin/jupyter/magics.kt | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index ae940973d..5b6460298 100644 --- a/README.md +++ b/README.md @@ -92,6 +92,14 @@ The following line magics are supported: - `%use , ...` - injects code for supported libraries: artifact resolution, default imports, initialization code, type renderers - `%trackClasspath` - logs any changes of current classpath. Useful for debugging artifact resolution failures - `%trackExecution` - logs pieces of code that are going to be executed. Useful for debugging of libraries support + - `%output [--max-cell-size=N] [--max-buffer=N] [--max-buffer-newline=N] [--max-time=N] [--no-stdout] [--reset-to-defaults]` - + output capturing settings. + - `max-cell-size` specifies the characters count which may be printed to stdout. Default is 100000. + - `max-buffer` - max characters count stored in internal buffer before being sent to client. Default is 10000. + - `max-buffer-newline` - same as above, but trigger happens only if newline character was encountered. Default is 100. + - `max-time` - max time in milliseconds before the buffer is sent to client. Default is 100. + - `no-stdout` - don't capture output. Default is false. + - `reset-to-defaults` - reset all output settings that were set with magics to defaults ### Supported Libraries diff --git a/src/main/kotlin/org/jetbrains/kotlin/jupyter/magics.kt b/src/main/kotlin/org/jetbrains/kotlin/jupyter/magics.kt index a6c6a7c2f..71b4bc620 100644 --- a/src/main/kotlin/org/jetbrains/kotlin/jupyter/magics.kt +++ b/src/main/kotlin/org/jetbrains/kotlin/jupyter/magics.kt @@ -12,7 +12,7 @@ enum class ReplLineMagics(val desc: String, val argumentsUsage: String? = null, trackClasspath("log current classpath changes"), trackExecution("log code that is going to be executed in repl", visibleInHelp = false), dumpClassesForSpark("stores compiled repl classes in special folder for Spark integration", visibleInHelp = false), - output("setup output settings", "--max 1000 --no-stdout --time-interval-ms 100 --buffer-limit 400") + output("setup output settings", "--max-cell-size=1000 --no-stdout --max-time=100 --max-buffer=400") } fun processMagics(repl: ReplForJupyter, code: String): String {