1
0
mirror of https://github.com/kellyjonbrazil/jc.git synced 2025-08-06 22:32:54 +02:00

manpage updates

This commit is contained in:
Kelly Brazil
2021-04-02 18:04:55 -07:00
parent fd254d99b7
commit 09c1fccc58
3 changed files with 4 additions and 6 deletions

View File

@ -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

View File

@ -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

View File

@ -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: