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:
@ -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
|
dir | jc --dir -p # or: jc -p dir
|
||||||
```
|
```
|
||||||
```json
|
```json
|
||||||
|
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"date": "03/24/2021",
|
"date": "03/24/2021",
|
||||||
@ -2479,7 +2478,7 @@ route -ee | jc --route -p # or: jc -p route -ee
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
```
|
```
|
||||||
### rpm -qai
|
### rpm -qi
|
||||||
```bash
|
```bash
|
||||||
rpm_qia | jc --rpm_qi -p # or: jc -p rpm -qia
|
rpm_qia | jc --rpm_qi -p # or: jc -p rpm -qia
|
||||||
```
|
```
|
||||||
|
@ -12,11 +12,11 @@ The `epoch` calculated timestamp field is naive (i.e. based on the local time of
|
|||||||
|
|
||||||
Usage (cli):
|
Usage (cli):
|
||||||
|
|
||||||
$ dir | jc --dir
|
C:> dir | jc --dir
|
||||||
|
|
||||||
or
|
or
|
||||||
|
|
||||||
$ jc dir
|
C:> jc dir
|
||||||
|
|
||||||
Usage (module):
|
Usage (module):
|
||||||
|
|
||||||
@ -29,7 +29,7 @@ Compatibility:
|
|||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
|
|
||||||
$ dir | jc --dir -p
|
C:> dir | jc --dir -p
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"date": "03/24/2021",
|
"date": "03/24/2021",
|
||||||
@ -70,7 +70,7 @@ Examples:
|
|||||||
...
|
...
|
||||||
]
|
]
|
||||||
|
|
||||||
$ dir | jc --dir -p -r
|
C:> dir | jc --dir -p -r
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"date": "03/24/2021",
|
"date": "03/24/2021",
|
||||||
|
@ -10,11 +10,11 @@ The `epoch` calculated timestamp field is naive (i.e. based on the local time of
|
|||||||
|
|
||||||
Usage (cli):
|
Usage (cli):
|
||||||
|
|
||||||
$ dir | jc --dir
|
C:> dir | jc --dir
|
||||||
|
|
||||||
or
|
or
|
||||||
|
|
||||||
$ jc dir
|
C:> jc dir
|
||||||
|
|
||||||
Usage (module):
|
Usage (module):
|
||||||
|
|
||||||
@ -27,7 +27,7 @@ Compatibility:
|
|||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
|
|
||||||
$ dir | jc --dir -p
|
C:> dir | jc --dir -p
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"date": "03/24/2021",
|
"date": "03/24/2021",
|
||||||
@ -68,7 +68,7 @@ Examples:
|
|||||||
...
|
...
|
||||||
]
|
]
|
||||||
|
|
||||||
$ dir | jc --dir -p -r
|
C:> dir | jc --dir -p -r
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"date": "03/24/2021",
|
"date": "03/24/2021",
|
||||||
|
BIN
man/jc.1.gz
Normal file
BIN
man/jc.1.gz
Normal file
Binary file not shown.
@ -1,6 +1,9 @@
|
|||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
# Genereate man page from jc metadata using jinja2 templates
|
# Genereate man page from jc metadata using jinja2 templates
|
||||||
from datetime import date
|
from datetime import date
|
||||||
|
import os
|
||||||
|
import gzip
|
||||||
|
import shutil
|
||||||
import jc.cli
|
import jc.cli
|
||||||
from jinja2 import Environment, FileSystemLoader
|
from jinja2 import Environment, FileSystemLoader
|
||||||
|
|
||||||
@ -12,3 +15,9 @@ output = template.render(today=date.today(),
|
|||||||
|
|
||||||
with open('man/jc.1', 'w') as f:
|
with open('man/jc.1', 'w') as f:
|
||||||
f.write(output)
|
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')
|
||||||
|
Reference in New Issue
Block a user