Skip to content

Commit a0b124b

Browse files
committed
docs: changes to tools markdown docs
Improved markdown documentation for the first two tools base64 and datefmt
1 parent 56020d5 commit a0b124b

2 files changed

Lines changed: 32 additions & 3 deletions

File tree

tools/base64.md

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,36 @@
1-
# Tool `-base64`
1+
# Tool base64
2+
3+
base64 utility acts as a base64 decoder when passed the --decode (or -d) flag and as a base64 encoder
4+
otherwise. As a decoder it only accepts raw base64 input and as an encoder it does not produce the framing
5+
lines. base64 reads standard input or file if it is provided and writes to standard output. Options
6+
--wrap (or -w) and --ignore-garbage (or -i) are accepted for compatibility with GNU base64, but the latter
7+
is unimplemented and silently ignored.
28

39
```text
410
Usage:
511
ops -base64 [options] <string>
612
```
713

8-
# Options
14+
## Options
915

1016
```
1117
-h, --help Display this help message
1218
-e, --encode <string> Encode a string to base64
1319
-d, --decode <string> Decode a base64 string
20+
```
21+
22+
## Examples
23+
24+
### Encoding:
25+
26+
```bash
27+
ops -base64 -e "OpenServerless is wonderful"
28+
T3BlblNlcnZlcmxlc3MgaXMgd29uZGVyZnVs
29+
```
30+
31+
### Decoding:
32+
33+
```bash
34+
$ ops -base64 -d "T3BlblNlcnZlcmxlc3MgaXMgd29uZGVyZnVs"
35+
OpenServerless is wonderful
1436
```

tools/datefmt.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Usage:
77
ops -datefmt [options] [arguments]
88
```
99

10-
# Options
10+
## Options
1111

1212
```
1313
-h, --help print this help info
@@ -40,3 +40,10 @@ Possible formats (they follows the standard naming of go time formats, with the
4040
- TimeOnly
4141
- Milliseconds
4242
- ms
43+
44+
## Example
45+
46+
```bash
47+
$ ops -datefmt -f DateTime
48+
2024-08-11 03:00:34
49+
```

0 commit comments

Comments
 (0)