Skip to content

Commit 305a7ff

Browse files
committed
Update ntangle help
1 parent b0d91a1 commit 305a7ff

File tree

2 files changed

+14
-9
lines changed

2 files changed

+14
-9
lines changed

ntangle.nimble

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Package
22

3-
version = "0.6.5"
3+
version = "0.6.6"
44
author = "Kaushal Modi"
55
description = "Command-line utility for Tangling of Org mode documents"
66
license = "MIT"
@@ -9,4 +9,4 @@ bin = @["ntangle"]
99

1010
# Dependencies
1111

12-
requires "nim >= 0.19.6", "cligen >= 0.9.28"
12+
requires "nim >= 0.19.6", "cligen >= 0.9.31"

src/ntangle.nim

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -551,12 +551,17 @@ when isMainModule:
551551
result = @["--help"]
552552

553553
const
554-
versionString = staticExec("git describe --tags HEAD")
554+
version = staticExec("git describe --tags HEAD")
555+
nimbleData = staticRead("../ntangle.nimble")
556+
uri = "https://github.com/OrgTangle/ntangle"
557+
myUsage = "\nNAME\n ntangle - ${doc}" &
558+
"\nUSAGE\n ${command} ${args}" &
559+
"\n\nOPTIONS\n$options" &
560+
"\nURI\n " & uri &
561+
"\n\nAUTHOR\n " & nimbleData.fromNimble("author") &
562+
"\n\nVERSION\n " & version
563+
555564
# https://github.com/c-blake/cligen/blob/master/RELEASE-NOTES.md#version-0928
556-
clCfg.version = versionString
565+
clCfg.version = version
557566

558-
dispatch(ntangle,
559-
usage = "\nNAME\n ntangle - $doc\n" &
560-
"USAGE\n $command $args\n\n" &
561-
"OPTIONS\n$options\n" &
562-
"URL\n " & url & "\n")
567+
dispatch(ntangle, usage=myUsage)

0 commit comments

Comments
 (0)