File: generate-help.py

package info (click to toggle)
rednotebook 2.42%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 5,976 kB
  • sloc: python: 9,842; javascript: 4,103; xml: 128; sh: 58; makefile: 12
file content (26 lines) | stat: -rwxr-xr-x 506 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#! /usr/bin/env python3

import sys
from pathlib import Path


DIR = Path(__file__).resolve().parent
REPO = DIR.parent
DEFAULT_DATA_DIR = Path.home() / ".rednotebook" / "data"

sys.path.insert(0, str(REPO))

from rednotebook.help import help_text
from rednotebook.info import version
from rednotebook.util import markup


print(
    markup.convert(
        help_text,
        "html",
        DEFAULT_DATA_DIR,
        headers=["RedNotebook Documentation", version, ""],
        options={"toc": 1},
    )
)