Move static assets into the src directory

This commit is contained in:
Gustavo Cordova Avila
2022-12-08 14:10:34 -08:00
parent c5d61744d1
commit 005159a89c
2 changed files with 1 additions and 1 deletions

View File

@@ -7,7 +7,7 @@ var
verbose: bool = false
const
USAGE_DOC = staticRead("../static/usage.txt")
USAGE_DOC = staticRead("static/usage.txt")
proc showUsage(msg = "") =
## Display a usage message and quit

66
src/static/usage.txt Normal file
View File

@@ -0,0 +1,66 @@
Usage:
======
${app} ping
${app} push <collection> <bucket> <object> "data|@filename|-"
${app} pop <collection> <bucket> <object> "search data to pop"
${app} query <collection> <bucket> "search terms" [limit] [offset]
${app} suggest <collection> <bucket> "word" [limit]
${app} flush <collection> [ bucket [object] ]
Commands:
=========
ping - Verify server is connected, returns "PONG"
count - Return the count of indexed data, requires:
+ collection
+ bucket; optional
+ object; optional
push - Ingest search data into the server, requires:
+ collection
+ bucket
+ object
+ "quoted text on the command line"
-or-
"@filename.ext" where to read the text
-or-
"-" to read from stdin
pop - Pop data from the search indexes, requires:
+ collection
+ bucket
+ object
+ "quoted text on the command line"
query - Query the indexes for information, requires:
+ collection
+ bucket
+ "search terms"
+ limit, optional; default: 10
+ offset, optional; default: 0
Outputs the object IDs that match the given search terms
suggest - Request suggestions for a given word, requires:
+ collection
+ bucket
+ "word"
+ limit, optional; default: 10
Outputs the suggestions to stdout
flush - Flush all index data for the given collection, bucket or object
+ collection
+ bucket; optional
+ object; optional
Environment variables:
======================
These variables point to the Sonic service the application
will be connecting to:
+ SONIC_HOST: Hostname or ip address of the service
+ SONIC_PORT: Port that the service is listening on
+ SONIC_SECRET: Password required to connect to sonic