mirror of
https://github.com/kellyjonbrazil/jc.git
synced 2025-08-06 22:32:54 +02:00
manpage updates
This commit is contained in:
2
man/jc.1
2
man/jc.1
@ -389,7 +389,7 @@ quiet - suppress warnings
|
|||||||
raw JSON output
|
raw JSON output
|
||||||
.RE
|
.RE
|
||||||
.PP
|
.PP
|
||||||
.SH Example:
|
.SH EXAMPLE:
|
||||||
ls \fB-al\fP | jc \fB--ls\fP \fB-p\fP
|
ls \fB-al\fP | jc \fB--ls\fP \fB-p\fP
|
||||||
|
|
||||||
|
|
||||||
|
@ -54,7 +54,7 @@ quiet - suppress warnings
|
|||||||
raw JSON output
|
raw JSON output
|
||||||
.RE
|
.RE
|
||||||
.PP
|
.PP
|
||||||
.SH Example:
|
.SH EXAMPLE:
|
||||||
ls \fB-al\fP | jc \fB--ls\fP \fB-p\fP
|
ls \fB-al\fP | jc \fB--ls\fP \fB-p\fP
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
#!/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 jc
|
|
||||||
import jc.cli
|
import jc.cli
|
||||||
from jinja2 import Environment, FileSystemLoader
|
from jinja2 import Environment, FileSystemLoader
|
||||||
|
|
||||||
@ -11,9 +10,8 @@ template = env.get_template('manpage_template')
|
|||||||
|
|
||||||
# get parser info from jc.cli.about_jc()
|
# get parser info from jc.cli.about_jc()
|
||||||
# plug it into the man page jinja2 template
|
# plug it into the man page jinja2 template
|
||||||
jcinfo = jc.cli.about_jc()
|
output = template.render(today=date.today(),
|
||||||
today = date.today()
|
jc=jc.cli.about_jc())
|
||||||
output = template.render(today=today, jc=jcinfo)
|
|
||||||
|
|
||||||
# save to man/jc.1
|
# save to man/jc.1
|
||||||
with open('man/jc.1', 'w') as f:
|
with open('man/jc.1', 'w') as f:
|
||||||
|
Reference in New Issue
Block a user