Ñò éíÑXc@sxdZddkZddkZddkZddklZlZlZlZlZdZ de Z d„Z d„Z dS(sÞ COMMAND-LINE SPECIFIC STUFF ============================================================================= The rest of the code is specifically for handling the case where Python Markdown is called from the command line. iÿÿÿÿN(tDEBUGtINFOtWARNtERRORtCRITICALspython markdown.pysˆ Python 2.3 or higher required for advanced command line options. For lower versions of Python use: %s INPUT_FILE > OUTPUT_FILE cCsYytdƒ}Wn[ttiƒdjo5htidd6d5d6td6gd6d5d6tfStGHd6SnX|id d ƒ}|i d d d ddti ddddƒ|i ddd dddƒ|i dddtdddtdd dddƒ|i dd dddt d ddd!ƒ|i d"d#d ddtdd$dd%ƒ|i d&d'd d(dd)dd*dd+ƒ|i d,dddt d ddd-ƒ|i d.d/dd0d ddd1dd2ƒ|i ƒ\}}t|ƒdjp|iƒd7S|d3}|ip g|_nh|d6|id6|id46|id6|id6|id(6|ifS(8sE Define and parse `optparse` options for command-line usage. toptparseiitinputtoutputtsafet extensionstencodingtusages%prog INPUTFILE [options]s-fs--filetdesttfilenametdefaultthelpswrite output to OUTPUT_FILEtmetavart OUTPUT_FILEs-es --encodings#encoding for input and output filess-qs--quiettactiont store_consttconsti tverbosessuppress all messagess-vs --verbosesprint info messagess-ss--safet SAFE_MODEs<safe mode ('replace', 'remove' or 'escape' user's HTML tag)s-os--output_formatt output_formattxhtml1t OUTPUT_FORMATs7Format of output. One of 'xhtml1' (default) or 'html4'.s--noisysprint debug messagess-xs --extensiontappendsload extension EXTENSIONt EXTENSIONit safe_modeN(NN(NN(t __import__tlentsystargvtNonetFalseRtOPTPARSE_WARNINGt OptionParsert add_optiontstdoutRRt parse_argst print_helpR R RR RR(Rtparsertoptionstargst input_file((s8/usr/lib/python2.6/site-packages/markdown/commandline.pyt parse_optionss^            cCsYtƒ\}}|ptidƒn|otidƒi|ƒnti|dS(s#Run Markdown from the command line.itMARKDOWNN(R-Rtexittloggingt getLoggertsetLeveltmarkdowntmarkdownFromFile(R*t logging_level((s8/usr/lib/python2.6/site-packages/markdown/commandline.pytrunWs ( t__doc__R3RR0RRRRRtEXECUTABLE_NAME_FOR_USAGER#R-R6(((s8/usr/lib/python2.6/site-packages/markdown/commandline.pyts   (  <