1
0
mirror of https://github.com/kellyjonbrazil/jc.git synced 2025-06-21 00:19:42 +02:00
Files
.github
completions
docs
jc
man
templates
tests
.gitignore
CHANGELOG
CONTRIBUTING.md
EXAMPLES.md
LICENSE.md
MANIFEST.in
README.md
_config.yml
build-completions.py
build-package.sh
docgen.sh
install.sh
mangen.py
pypi-upload.sh
readmegen.py
requirements.txt
runtests.sh
setup.cfg
setup.py
updatedocs.sh
jc/mangen.py

15 lines
456 B
Python
Raw Normal View History

2021-04-02 17:40:09 -07:00
#!/usr/bin/env python3
# Genereate man page from jc metadata using jinja2 templates
from datetime import date
import jc.cli
from jinja2 import Environment, FileSystemLoader
file_loader = FileSystemLoader('templates')
2021-04-02 17:40:09 -07:00
env = Environment(loader=file_loader)
template = env.get_template('manpage_template')
2021-04-02 18:04:55 -07:00
output = template.render(today=date.today(),
2022-10-08 09:04:04 -07:00
jc=jc.cli.JcCli.about_jc())
2021-04-02 17:40:09 -07:00
with open('man/jc.1', 'w') as f:
f.write(output)