mirror of
https://github.com/wader/fq.git
synced 2024-12-25 22:34:14 +03:00
opentimestamps: add help text.
This commit is contained in:
parent
64a4ff2e7a
commit
912f4116a9
@ -3,6 +3,8 @@ package opentimestamps
|
||||
// https://opentimestamps.org/
|
||||
|
||||
import (
|
||||
"embed"
|
||||
|
||||
"github.com/wader/fq/format"
|
||||
"github.com/wader/fq/pkg/decode"
|
||||
"github.com/wader/fq/pkg/interp"
|
||||
@ -10,6 +12,9 @@ import (
|
||||
"golang.org/x/exp/slices"
|
||||
)
|
||||
|
||||
//go:embed opentimestamps.md
|
||||
var otsFS embed.FS
|
||||
|
||||
func init() {
|
||||
interp.RegisterFormat(
|
||||
format.Opentimestamps,
|
||||
@ -18,6 +23,7 @@ func init() {
|
||||
DecodeFn: decodeOTSFile,
|
||||
Groups: []*decode.Group{format.Probe},
|
||||
})
|
||||
interp.RegisterFS(otsFS)
|
||||
}
|
||||
|
||||
const (
|
24
format/opentimestamps/opentimestamps.md
Normal file
24
format/opentimestamps/opentimestamps.md
Normal file
@ -0,0 +1,24 @@
|
||||
### View a full OpenTimestamps file
|
||||
|
||||
```
|
||||
$ fq dd file.ots
|
||||
```
|
||||
|
||||
### List the names of the Calendar servers used
|
||||
|
||||
```
|
||||
$ fq '.operations | map(select(.attestation_type == "calendar") | .url)' file.ots
|
||||
```
|
||||
|
||||
### Check if there are Bitcoin attestations present
|
||||
|
||||
```
|
||||
$ fq '.operations | map(select(.attestation_type == "bitcoin")) | length > 0' file.ots
|
||||
```
|
||||
|
||||
### Authors
|
||||
- fiatjaf, https://fiatjaf.com
|
||||
|
||||
### References
|
||||
- https://opentimestamps.org/
|
||||
- https://github.com/opentimestamps/python-opentimestamps
|
Loading…
Reference in New Issue
Block a user