changed from txt file to a MD format for the CLI display
This commit is contained in:
parent
9a2ef14320
commit
2c667c07d4
@ -1 +1 @@
|
||||
include kpr_docs/kpr_docs.txt
|
||||
include kpr_docs/kpr_docs.md
|
||||
|
||||
@ -1,12 +1,13 @@
|
||||
#!/usr/bin/env python3
|
||||
~#!/usr/bin/env python3
|
||||
from rich.console import Console
|
||||
from rich.markdown import Markdown
|
||||
import importlib.resources
|
||||
|
||||
def main():
|
||||
|
||||
console = Console
|
||||
try:
|
||||
with importlib.resources.open_text('kpr_docs', 'kpr_docs.txt') as f:
|
||||
print(f.read())
|
||||
with importlib.resources.open_text('kpr_docs', 'kpr_docs.md') as f:
|
||||
md = Markdown(f.read())
|
||||
console.print(md)
|
||||
except FileNotFoundError:
|
||||
print("Documentation file not found.")
|
||||
console.print("[bold red]Documentation file not found.[/bold red]")
|
||||
|
||||
@ -1,12 +1,12 @@
|
||||
KPR_Man User Manuals KPR_Man
|
||||
|
||||
NAME
|
||||
KPR Man - display helpful information about my tool
|
||||
## NAME
|
||||
**KPR Man** - display helpful information about my tool
|
||||
|
||||
SYNOPSIS
|
||||
## SYNOPSIS
|
||||
Test
|
||||
|
||||
DESCRIPTION
|
||||
## DESCRIPTION
|
||||
This is a fake man page to demonstrate packaging a CLI app.
|
||||
|
||||
It can be extended to show multiple pages, handle arguments, etc.
|
||||
Loading…
Reference in New Issue
Block a user