From 305a7ff3fb03ac5be58d883c536cdd5bb86f2fa2 Mon Sep 17 00:00:00 2001 From: Kaushal Modi Date: Mon, 10 Jun 2019 16:22:49 -0400 Subject: [PATCH] Update ntangle help --- ntangle.nimble | 4 ++-- src/ntangle.nim | 19 ++++++++++++------- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/ntangle.nimble b/ntangle.nimble index 33f4440..88c6eb1 100644 --- a/ntangle.nimble +++ b/ntangle.nimble @@ -1,6 +1,6 @@ # Package -version = "0.6.5" +version = "0.6.6" author = "Kaushal Modi" description = "Command-line utility for Tangling of Org mode documents" license = "MIT" @@ -9,4 +9,4 @@ bin = @["ntangle"] # Dependencies -requires "nim >= 0.19.6", "cligen >= 0.9.28" +requires "nim >= 0.19.6", "cligen >= 0.9.31" diff --git a/src/ntangle.nim b/src/ntangle.nim index 77c6f7f..36a151b 100644 --- a/src/ntangle.nim +++ b/src/ntangle.nim @@ -551,12 +551,17 @@ when isMainModule: result = @["--help"] const - versionString = staticExec("git describe --tags HEAD") + version = staticExec("git describe --tags HEAD") + nimbleData = staticRead("../ntangle.nimble") + uri = "https://github.com/OrgTangle/ntangle" + myUsage = "\nNAME\n ntangle - ${doc}" & + "\nUSAGE\n ${command} ${args}" & + "\n\nOPTIONS\n$options" & + "\nURI\n " & uri & + "\n\nAUTHOR\n " & nimbleData.fromNimble("author") & + "\n\nVERSION\n " & version + # https://github.com/c-blake/cligen/blob/master/RELEASE-NOTES.md#version-0928 - clCfg.version = versionString + clCfg.version = version - dispatch(ntangle, - usage = "\nNAME\n ntangle - $doc\n" & - "USAGE\n $command $args\n\n" & - "OPTIONS\n$options\n" & - "URL\n " & url & "\n") + dispatch(ntangle, usage=myUsage)