Beispiel #1
0
def load_debug_deps():
    """ Try loading printdebug.DebugColrPrinter. If successful, replace
        the global `debug` function with DebugColrPrinter.debug.
    """
    global debug
    try:
        from printdebug import DebugColrPrinter
    except ImportError:
        return None
    debug = DebugColrPrinter().debug
Beispiel #2
0
    Converts doxygen-style markdown files to github/normal-style markdown files.
    -Christopher Welborn 08-11-2019
"""

import os
import re
import sys

from colr import (
    Colr as C,
    auto_disable as colr_auto_disable,
    docopt,
)

from printdebug import DebugColrPrinter
debugprinter = DebugColrPrinter()
debugprinter.enable(('-D' in sys.argv) or ('--debug' in sys.argv))
debug = debugprinter.debug
debug_err = debugprinter.debug_err

colr_auto_disable()

NAME = 'ColrC - Markdown Generator'
VERSION = '0.0.2'
VERSIONSTR = f'{NAME} v. {VERSION}'
SCRIPT = os.path.split(os.path.abspath(sys.argv[0]))[1]
SCRIPTDIR = os.path.abspath(sys.path[0])
COLRDIR = os.path.abspath(os.path.join(SCRIPTDIR, '..'))
USAGESTR = f"""{VERSIONSTR}
    Usage:
        {SCRIPT} -h | -v