fix #24: clarify template use of .Value (#25)

This commit is contained in:
T. von Dein
2026-04-29 08:33:10 +02:00
parent 4fa42e27e4
commit cafc65aea7
4 changed files with 40 additions and 4 deletions

18
anydb.1
View File

@@ -133,7 +133,7 @@
.\" ========================================================================
.\"
.IX Title "ANYDB 1"
.TH ANYDB 1 "2025-11-03" "1" "User Commands"
.TH ANYDB 1 "2026-04-29" "1" "User Commands"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
@@ -613,8 +613,16 @@ The following template variables can be used:
.PD 0
.IP "\fB.Value\fR \- string" 4
.IX Item ".Value - string"
.PD
To be able to use the value in a template, you'll need to add the
\&\f(CW\*(C`\-s\*(C'\fR flag so that values are included in output data
stream. Otherwise you can only use \f(CW\*(C`.Preview\*(C'\fR.
.IP "\fB.Preview\fR string" 4
.IX Item ".Preview string"
First line of entry value (if it is a string).
.IP "\fB.Bin\fR \- []byte" 4
.IX Item ".Bin - []byte"
.PD 0
.IP "\fB.Created\fR \- timestamp.Time" 4
.IX Item ".Created - timestamp.Time"
.PD
@@ -729,7 +737,7 @@ Some curl example calls to the \s-1API:\s0
Post a new key:
curl \-X \s-1PUT\s0 localhost:8787/anydb/v1/ \e
\-H 'Content\-Type: application/json' \e
\-d '{\*(L"key\*(R":\*(L"foo\*(R",\*(L"val\*(R":\*(L"bar\*(R"}'
\-d '{\*(L"key\*(R":\*(L"foo\*(R",\*(L"data\*(R":\*(L"bar\*(R"}'
.PP
Retrieve the value:
.PP
@@ -742,6 +750,12 @@ List all keys:
.Vb 1
\& curl localhost:8787/anydb/v1/
.Ve
.PP
Delete an entry:
.PP
.Vb 1
\& curl \-s \-X DELETE http://localhost:8787/anydb/v1/foo
.Ve
.SH "BUGS"
.IX Header "BUGS"
In order to report a bug, unexpected behavior, feature requests