1
0
mirror of https://github.com/kellyjonbrazil/jc.git synced 2025-06-17 00:07:37 +02:00

Merge branch 'master' into dev

# Conflicts:
#	man/jc.1
This commit is contained in:
Kelly Brazil
2021-04-08 11:33:50 -07:00
5 changed files with 18 additions and 10 deletions

View File

@ -714,7 +714,6 @@ dig -x 1.1.1.1 | jc --dig -p # or: jc -p dig -x 1.1.1.1
dir | jc --dir -p # or: jc -p dir
```
```json
[
{
"date": "03/24/2021",
@ -2479,7 +2478,7 @@ route -ee | jc --route -p # or: jc -p route -ee
}
]
```
### rpm -qai
### rpm -qi
```bash
rpm_qia | jc --rpm_qi -p # or: jc -p rpm -qia
```

View File

@ -12,11 +12,11 @@ The `epoch` calculated timestamp field is naive (i.e. based on the local time of
Usage (cli):
$ dir | jc --dir
C:> dir | jc --dir
or
$ jc dir
C:> jc dir
Usage (module):
@ -29,7 +29,7 @@ Compatibility:
Examples:
$ dir | jc --dir -p
C:> dir | jc --dir -p
[
{
"date": "03/24/2021",
@ -70,7 +70,7 @@ Examples:
...
]
$ dir | jc --dir -p -r
C:> dir | jc --dir -p -r
[
{
"date": "03/24/2021",

View File

@ -10,11 +10,11 @@ The `epoch` calculated timestamp field is naive (i.e. based on the local time of
Usage (cli):
$ dir | jc --dir
C:> dir | jc --dir
or
$ jc dir
C:> jc dir
Usage (module):
@ -27,7 +27,7 @@ Compatibility:
Examples:
$ dir | jc --dir -p
C:> dir | jc --dir -p
[
{
"date": "03/24/2021",
@ -68,7 +68,7 @@ Examples:
...
]
$ dir | jc --dir -p -r
C:> dir | jc --dir -p -r
[
{
"date": "03/24/2021",

BIN
man/jc.1.gz Normal file

Binary file not shown.

View File

@ -1,6 +1,9 @@
#!/usr/bin/env python3
# Genereate man page from jc metadata using jinja2 templates
from datetime import date
import os
import gzip
import shutil
import jc.cli
from jinja2 import Environment, FileSystemLoader
@ -12,3 +15,9 @@ output = template.render(today=date.today(),
with open('man/jc.1', 'w') as f:
f.write(output)
with open('man/jc.1', 'rb') as f_in:
with gzip.open('man/jc.1.gz', 'wb') as f_out:
shutil.copyfileobj(f_in, f_out)
os.remove('man/jc.1')