diff --git a/esv_api.nimble b/bibleref.nimble similarity index 74% rename from esv_api.nimble rename to bibleref.nimble index 1651a89..95ef32a 100644 --- a/esv_api.nimble +++ b/bibleref.nimble @@ -2,10 +2,10 @@ version = "0.3.0" author = "Jonathan Bernard" -description = "Simple Nim CLI wrapper around the ESV API (api.esv.org)" +description = "Simple Nim CLI for retrieving Biblical passages" license = "MIT" srcDir = "src" -bin = @["esv_api"] +bin = @["bibleref"] # Dependencies diff --git a/src/esv_api.nim b/src/bibleref.nim similarity index 93% rename from src/esv_api.nim rename to src/bibleref.nim index 28849df..a6856a5 100644 --- a/src/esv_api.nim +++ b/src/bibleref.nim @@ -1,7 +1,7 @@ -# Nim CLI Wrapper for the ESV API +# Nim CLI for retrieving Biblical passages # © 2023 Jonathan Bernard -## Simple command-line wrapper around the ESV API. +## Simple command-line tool for retrieving Biblical passages. import std/[httpclient, json, logging, os, re, strutils, uri, wordwrap] import cliutils, docopt, zero_functional @@ -64,7 +64,7 @@ proc formatPlain(raw: string, keepVerseNumbers = true): string = when isMainModule: const USAGE = """Usage: - esv_api [options] + bibleref [options] Options: @@ -78,13 +78,13 @@ Options: -t, --esv-api-token Provide the API token on the command line. By default this will be read either from the - .esv_api.cfg.json file or the ESV_API_TOKEN + .bibleref.cfg.json file or the ESV_API_TOKEN envionment variable. """ let consoleLogger = newConsoleLogger( levelThreshold=lvlInfo, - fmtStr="esv_api - $levelname: ") + fmtStr="bibleref - $levelname: ") logging.addHandler(consoleLogger) try: @@ -96,7 +96,7 @@ Options: if args["--echo-args"]: stderr.writeLine($args) - let cfgFilePath = getEnv("HOME") / ".esv_api.cfg.json" + let cfgFilePath = getEnv("HOME") / ".bibleref.cfg.json" var cfgFileJson = newJObject() if fileExists(cfgFilePath): debug "Loading config from " & cfgFilePath