Skip to content

Commit 2ad5229

Browse files
committed
updated README.md
1 parent bf2d4f1 commit 2ad5229

File tree

2 files changed

+35
-1
lines changed

2 files changed

+35
-1
lines changed

README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ Usage: jsonlite command <command-specific-options>
113113
drop (--force) Drops the database
114114
help Displays help
115115
version Displays the current version
116+
116117
````
117118

118119
### version
@@ -124,6 +125,29 @@ Usage: jsonlite command <command-specific-options>
124125
1.0.0
125126
````
126127

128+
### default
129+
130+
> default - Displays the current version, configuration, and help
131+
132+
```
133+
➜ jsonlite
134+
JSONlite 1.0.0
135+
[using] json_reformat (fast)
136+
137+
Data directory path: /tmp/jsonlite.data
138+
139+
Usage: jsonlite command <command-specific-options>
140+
141+
set <json> Writes a json document and returns a document id
142+
get <document-id> Retrieves a json document by document id
143+
count Total number of json documents in the database
144+
delete <document-id> Deletes a json document by document id
145+
drop (--force) Drops the database
146+
help Displays help
147+
version Displays the current version
148+
149+
```
150+
127151
## Changelog
128152

129153
https://github.com/nodesocket/jsonlite/blob/master/CHANGELOG.md

jsonlite.bash

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,17 @@ jsonlite_version() {
2727

2828
jsonlite_info() {
2929
jsonlite_version
30-
echo "JSONLITE_DATA_DIR=$JSONLITE_DATA_DIR"
30+
31+
if command -v json_reformat > /dev/null 2>&1; then
32+
echo " [using] json_reformat (fast)"
33+
elif command -v jq > /dev/null 2>&1; then
34+
echo " [using] jq (fast)"
35+
else
36+
echo " [using] python -m json.tool (slow)"
37+
fi
38+
39+
echo
40+
echo "Data directory path: $JSONLITE_DATA_DIR"
3141
echo
3242
}
3343

0 commit comments

Comments
 (0)