diff --git a/README.md b/README.md index 6532a50..bc56382 100644 --- a/README.md +++ b/README.md @@ -32,6 +32,14 @@ Next modify the `source.R` as your wish and convert it into your Hiplot plugin. ./hisub.R source.R ``` +For better use this tools, I recommend you to generate a soft link to the `hisub.R` with command similar to + +```sh +ln -s ~/Documents/GitHub/hiplot-plugin-generator/hisub.R ~/.local/bin/hisub +``` + +Change the first path to your clone `hisub.R` path and change the second path to a path store executable file. +NOTE, the second path should be in system `PATH` variable so you can call **HiSub** with `hisub`. ### Hello World diff --git a/hisub.R b/hisub.R index f14881b..78dab78 100755 --- a/hisub.R +++ b/hisub.R @@ -94,6 +94,15 @@ if (length(Args) == 1) { } } +if (length(Args) == 0) { + message("No operations detected.") + message("Usage:") + message("\t[hisub template] to generate a template.") + message("\t[hisub source.R ... outdir] to convert R script to Hiplot plugin.") + message("\nDetails see ") + quit("no", -1) +} + # 如果传入的不是 2 个参数,中间的文件原样拷贝到插件目录以支持 # 已准备好的数据文件或其他所需脚本 fc <- file_content <- read_lines(Args[1])