MartinPacker / mdpre

mdpre - Markdown Preprocessor
MIT License
5 stars 2 forks source link

Improve: More Cleaner Code WITH Output Helper Functions (low priority) #8

Open 42sol-eu opened 3 years ago

42sol-eu commented 3 years ago

add helper functions to change this

sys.stderr.write(
            "\n" + BOLD + "Usage:" + END + "\n\nmdpre < inputfile > outputfile\n\n"
        )

if wantVerbose is True:
        sys.stderr.write("Writing to Textbundle " + realpath + "\n\n")

to


log( bold( "Usage:") + "\n\nmdpre < inputfile > outputfile\n\n" )

# remove if blocks from verbose checking by creating a new log_detail method
log_detail("Writing to Textbundle " + realpath + "\n\n")

# this would be bold ;-)
def bold( p_text ):
    return BOLD + p_text + END
MartinPacker commented 2 months ago

Looks like we have a few sys.stderr.write() incantations left. Leaving open so this can be fixed.