def initialize():
try:<EOL><INDENT>import multiprocessing<EOL>ncpus = '<STR_LIT>'.format(multiprocessing.cpu_count())<EOL><DEDENT>except (ImportError, NotImplementedError):<EOL><INDENT>ncpus = '<STR_LIT:0>'<EOL><DEDENT>parser = argparse.ArgumentParser(description="<STR_LIT>")<EOL>parser.add_argument("<STR_LIT>",help="<STR_LIT>",<EOL>type=argparse.FileType('<STR_LIT:r>'))<EOL>parser.add_argument("<STR_LIT>","<STR_LIT>",action="<STR_LIT>",help='<STR_LIT>')<EOL>parser.add_argument("<STR_LIT>","<STR_LIT>",help="<STR_LIT>")<EOL>parser.add_argument("<STR_LIT>","<STR_LIT>",help="<STR_LIT>")<EOL>parser.add_argument("<STR_LIT>","<STR_LIT>",help="<STR_LIT>")<EOL>parser.add_argument("<STR_LIT>","<STR_LIT>",dest="<STR_LIT>",help="<STR_LIT>")<EOL>parser.add_argument("<STR_LIT>",action="<STR_LIT>",help="<STR_LIT>")<EOL>parser.add_argument("<STR_LIT>",action="<STR_LIT>",help="<STR_LIT>")<EOL>parser.add_argument("<STR_LIT>","<STR_LIT>",action="<STR_LIT>",help="<STR_LIT>")<EOL>parser.add_argument("<STR_LIT>","<STR_LIT>",action="<STR_LIT>",help="<STR_LIT>")<EOL>parser.add_argument("<STR_LIT>","<STR_LIT>",dest='<STR_LIT>',action='<STR_LIT:store_true>',<EOL>help="<STR_LIT>")<EOL>parser.add_argument("<STR_LIT>",dest='<STR_LIT>',action='<STR_LIT>',<EOL>help="<STR_LIT>")<EOL>parser.add_argument("<STR_LIT>","<STR_LIT>",dest='<STR_LIT>',action='<STR_LIT:store_true>',<EOL>help="<STR_LIT>")<EOL>parser.add_argument("<STR_LIT>", "<STR_LIT>", action="<STR_LIT:version>",<EOL>version="<STR_LIT>".format(__appname__,__version__))<EOL>parser.add_argument("<STR_LIT>",dest="<STR_LIT>",action="<STR_LIT:store_true>",<EOL>help="<STR_LIT>")<EOL>parser.add_argument("<STR_LIT>","<STR_LIT>",action="<STR_LIT>",<EOL>help="<STR_LIT>")<EOL>args = parser.parse_args()<EOL>md_ext = ['<STR_LIT>','<STR_LIT>',<EOL>'<STR_LIT>',MathExtension(),'<STR_LIT>']<EOL>md = markdown.Markdown(extensions=md_ext, output_format="<STR_LIT>",<EOL>extension_configs={})<EOL>proj_docs = args.project_file.read()<EOL>md.convert(proj_docs)<EOL>if '<STR_LIT>' in md.Meta: md_base = md.Meta['<STR_LIT>'][<NUM_LIT:0>] <EOL>else: md_base = os.path.dirname(args.project_file.name)<EOL>md_ext.append('<STR_LIT>')<EOL>if '<STR_LIT>' in md.Meta: md_ext.extend(md.Meta['<STR_LIT>'])<EOL>md = markdown.Markdown(extensions=md_ext, output_format="<STR_LIT>",<EOL>extension_configs={'<STR_LIT>': {'<STR_LIT>': md_base}})<EOL>md.reset()<EOL>proj_docs = md.convert(proj_docs)<EOL>proj_data = md.Meta<EOL>md.reset()<EOL>options = ['<STR_LIT>','<STR_LIT>','<STR_LIT>','<STR_LIT>',<EOL>'<STR_LIT>','<STR_LIT>','<STR_LIT>',<EOL>'<STR_LIT>','<STR_LIT>','<STR_LIT>','<STR_LIT>',<EOL>'<STR_LIT>','<STR_LIT>','<STR_LIT>','<STR_LIT>','<STR_LIT>',<EOL>'<STR_LIT>','<STR_LIT>','<STR_LIT:email>','<STR_LIT>','<STR_LIT>',<EOL>'<STR_LIT>','<STR_LIT>','<STR_LIT>',<EOL>'<STR_LIT>','<STR_LIT>','<STR_LIT>','<STR_LIT>','<STR_LIT:version>',<EOL>'<STR_LIT>','<STR_LIT>','<STR_LIT>','<STR_LIT>','<STR_LIT>',<EOL>'<STR_LIT>','<STR_LIT>','<STR_LIT>','<STR_LIT>','<STR_LIT>',<EOL>'<STR_LIT>',<EOL>'<STR_LIT:source>','<STR_LIT>','<STR_LIT>','<STR_LIT>','<STR_LIT>','<STR_LIT>',<EOL>'<STR_LIT>','<STR_LIT>','<STR_LIT>','<STR_LIT>','<STR_LIT>','<STR_LIT>',<EOL>'<STR_LIT>', '<STR_LIT>',<EOL>'<STR_LIT>','<STR_LIT>','<STR_LIT>','<STR_LIT>',<EOL>'<STR_LIT>','<STR_LIT>','<STR_LIT>',<EOL>'<STR_LIT>','<STR_LIT>','<STR_LIT>','<STR_LIT>',<EOL>'<STR_LIT>', '<STR_LIT>']<EOL>defaults = {'<STR_LIT>':             ['<STR_LIT>'],<EOL>'<STR_LIT>':          ['<STR_LIT>','<STR_LIT>','<STR_LIT>','<STR_LIT>','<STR_LIT>'],<EOL>'<STR_LIT>':      ['<STR_LIT>','<STR_LIT>','<STR_LIT>','<STR_LIT>','<STR_LIT>','<STR_LIT:F>','<STR_LIT>'],<EOL>'<STR_LIT>':    ['<STR_LIT:f>','<STR_LIT>','<STR_LIT:F>','<STR_LIT>'],<EOL>'<STR_LIT>':          '<STR_LIT>',<EOL>'<STR_LIT>':             '<STR_LIT>',<EOL>'<STR_LIT>':         '<STR_LIT>',<EOL>'<STR_LIT>':             ['<STR_LIT>','<STR_LIT>'],<EOL>'<STR_LIT>':          '<STR_LIT:false>',<EOL>'<STR_LIT>':                date.today().year,<EOL>'<STR_LIT>':             [],<EOL>'<STR_LIT>':         [],<EOL>'<STR_LIT>':             '<STR_LIT:!>',<EOL>'<STR_LIT>':         '<STR_LIT:*>',<EOL>'<STR_LIT>':          '<STR_LIT:>>',<EOL>'<STR_LIT>':      '<STR_LIT:|>',<EOL>'<STR_LIT>':             '<STR_LIT>',<EOL>'<STR_LIT>':      [],<EOL>'<STR_LIT>':            '<STR_LIT:true>',<EOL>'<STR_LIT:source>':              '<STR_LIT:false>',<EOL>'<STR_LIT>':               [],<EOL>'<STR_LIT>':             [],<EOL>'<STR_LIT>':          '<STR_LIT:true>',<EOL>'<STR_LIT>':        '<STR_LIT>',<EOL>'<STR_LIT>':      '<STR_LIT:false>',<EOL>'<STR_LIT>':                '<STR_LIT:false>',<EOL>'<STR_LIT>':               '<STR_LIT:false>',<EOL>'<STR_LIT>':              '<STR_LIT:true>',<EOL>'<STR_LIT>':               '<STR_LIT:false>',<EOL>'<STR_LIT>':                '<STR_LIT:src>',<EOL>'<STR_LIT>':          [],<EOL>'<STR_LIT>':                 True,<EOL>'<STR_LIT>':               '<STR_LIT:false>',<EOL>'<STR_LIT>':      '<STR_LIT>',<EOL>'<STR_LIT>':      '<STR_LIT>',<EOL>'<STR_LIT>':             '<STR_LIT>',<EOL>'<STR_LIT>':     [],<EOL>'<STR_LIT>':       '<STR_LIT>',<EOL>'<STR_LIT>': False,<EOL>'<STR_LIT>':      '<STR_LIT:false>',<EOL>'<STR_LIT>':            ncpus,<EOL>'<STR_LIT>':  '<STR_LIT:true>',<EOL>}<EOL>listopts = ['<STR_LIT>','<STR_LIT>','<STR_LIT>','<STR_LIT>',<EOL>'<STR_LIT>','<STR_LIT>','<STR_LIT>','<STR_LIT>',<EOL>'<STR_LIT>','<STR_LIT>','<STR_LIT>','<STR_LIT>']<EOL>if args.warn:<EOL><INDENT>args.warn = '<STR_LIT:true>'<EOL><DEDENT>else:<EOL><INDENT>del args.warn<EOL><DEDENT>if args.quiet:<EOL><INDENT>args.quiet = '<STR_LIT:true>'<EOL><DEDENT>else:<EOL><INDENT>del args.quiet<EOL><DEDENT>if not args.search:<EOL><INDENT>args.search = '<STR_LIT:false>'<EOL><DEDENT>else:<EOL><INDENT>del args.search<EOL><DEDENT>for option in options:<EOL><INDENT>if hasattr(args,option) and getattr(args,option):<EOL><INDENT>proj_data[option] = getattr(args,option)<EOL><DEDENT>elif option in proj_data:<EOL><INDENT>if option not in listopts:<EOL><INDENT>proj_data[option] = '<STR_LIT:\n>'.join(proj_data[option])<EOL><DEDENT><DEDENT>elif option in defaults:<EOL><INDENT>proj_data[option] = defaults[option]<EOL><DEDENT><DEDENT>base_dir = os.path.abspath(os.path.dirname(args.project_file.name))<EOL>proj_data['<STR_LIT>'] = base_dir<EOL>for var in ['<STR_LIT>','<STR_LIT>','<STR_LIT>']:<EOL><INDENT>if var in proj_data:<EOL><INDENT>proj_data[var] = [os.path.normpath(os.path.join(base_dir,os.path.expanduser(os.path.expandvars(p)))) for p in proj_data[var]]<EOL><DEDENT><DEDENT>for var in ['<STR_LIT>','<STR_LIT>','<STR_LIT>','<STR_LIT>','<STR_LIT>','<STR_LIT>']:<EOL><INDENT>if var in proj_data:<EOL><INDENT>proj_data[var] = os.path.normpath(os.path.join(base_dir,os.path.expanduser(os.path.expandvars(proj_data[var]))))<EOL><DEDENT><DEDENT>if proj_data['<STR_LIT>'].strip() != defaults['<STR_LIT>']:<EOL><INDENT>proj_data['<STR_LIT>'] = os.path.normpath(os.path.join(base_dir,os.path.expanduser(os.path.expandvars(proj_data['<STR_LIT>']))))<EOL><DEDENT>proj_data['<STR_LIT>'] = [ item.lower() for item in proj_data['<STR_LIT>'] ]<EOL>proj_data['<STR_LIT>'] = proj_data['<STR_LIT>'].lower()<EOL>proj_data['<STR_LIT>'] = datetime.now().strftime(proj_data['<STR_LIT>'])<EOL>relative = (proj_data['<STR_LIT>'] == '<STR_LIT>')<EOL>proj_data['<STR_LIT>'] = relative<EOL>proj_data['<STR_LIT>'] += [ext for ext in proj_data['<STR_LIT>'] if ext not in proj_data['<STR_LIT>']]<EOL>extdict = {}<EOL>for ext in proj_data['<STR_LIT>']:<EOL><INDENT>sp = ext.split()<EOL>if len(sp) < <NUM_LIT:2>: continue<EOL>if (len(sp)==<NUM_LIT:2>):<EOL><INDENT>extdict[sp[<NUM_LIT:0>]] = (sp[<NUM_LIT:1>])        <EOL><DEDENT>else:<EOL><INDENT>extdict[sp[<NUM_LIT:0>]] = (sp[<NUM_LIT:1>],sp[<NUM_LIT:2>])  <EOL><DEDENT><DEDENT>proj_data['<STR_LIT>'] = extdict<EOL>for projdir in proj_data['<STR_LIT>']:<EOL><INDENT>proj_path = ford.utils.split_path(projdir)<EOL>out_path  = ford.utils.split_path(proj_data['<STR_LIT>'])<EOL>for directory in out_path:<EOL><INDENT>if len(proj_path) == <NUM_LIT:0>:<EOL><INDENT>break<EOL><DEDENT>if directory == proj_path[<NUM_LIT:0>]:<EOL><INDENT>proj_path.remove(directory)<EOL><DEDENT>else:<EOL><INDENT>break<EOL><DEDENT><DEDENT>else:<EOL><INDENT>print('<STR_LIT>'.format(proj_data['<STR_LIT>'],projdir))<EOL>sys.exit(<NUM_LIT:1>)<EOL><DEDENT><DEDENT>if proj_data['<STR_LIT>'] == proj_data['<STR_LIT>'] != '<STR_LIT>':<EOL><INDENT>print('<STR_LIT>')<EOL>sys.exit(<NUM_LIT:1>)<EOL><DEDENT>if proj_data['<STR_LIT>'] == proj_data['<STR_LIT>'] != '<STR_LIT>':<EOL><INDENT>print('<STR_LIT>')<EOL>sys.exit(<NUM_LIT:1>)<EOL><DEDENT>if proj_data['<STR_LIT>'] == proj_data['<STR_LIT>'] != '<STR_LIT>':<EOL><INDENT>print('<STR_LIT>')<EOL>sys.exit(<NUM_LIT:1>)<EOL><DEDENT>if proj_data['<STR_LIT>'] == proj_data['<STR_LIT>'] != '<STR_LIT>':<EOL><INDENT>print('<STR_LIT>')<EOL>sys.exit(<NUM_LIT:1>)<EOL><DEDENT>if proj_data['<STR_LIT>'] == proj_data['<STR_LIT>'] != '<STR_LIT>':<EOL><INDENT>print('<STR_LIT>')<EOL>sys.exit(<NUM_LIT:1>)<EOL><DEDENT>if proj_data['<STR_LIT>'] == proj_data['<STR_LIT>'] != '<STR_LIT>':<EOL><INDENT>print('<STR_LIT>')<EOL>sys.exit(<NUM_LIT:1>)<EOL><DEDENT>if '<STR_LIT>' in proj_data:<EOL><INDENT>proj_docs += '''<STR_LIT>'''.format(proj_data['<STR_LIT>'].strip())<EOL><DEDENT>if proj_data['<STR_LIT>'].lower() == '<STR_LIT:true>':<EOL><INDENT>if proj_data['<STR_LIT>']:<EOL><INDENT>preprocessor = proj_data['<STR_LIT>'].split()<EOL><DEDENT>else:<EOL><INDENT>preprocessor = ['<STR_LIT>','<STR_LIT>','<STR_LIT>', '<STR_LIT>']<EOL><DEDENT>try:<EOL><INDENT>devnull = open(os.devnull)<EOL>subprocess.Popen(preprocessor, stdin=devnull, stdout=devnull,<EOL>stderr=devnull).communicate()<EOL><DEDENT>except OSError as ex:<EOL><INDENT>print('<STR_LIT>')<EOL>print('<STR_LIT>'.format(preprocessor))<EOL>print('<STR_LIT>'.format(ex))<EOL>print('<STR_LIT>')<EOL>proj_data['<STR_LIT>'] = '<STR_LIT:false>'<EOL><DEDENT>else:<EOL><INDENT>proj_data['<STR_LIT>'] = '<STR_LIT:true>'<EOL>proj_data['<STR_LIT>'] = preprocessor<EOL><DEDENT><DEDENT>try:<EOL><INDENT>proj_data['<STR_LIT>'] = LICENSES[proj_data['<STR_LIT>'].lower()]<EOL><DEDENT>except KeyError:<EOL><INDENT>print('<STR_LIT>'.format(proj_data['<STR_LIT>']))<EOL>proj_data['<STR_LIT>'] = '<STR_LIT>'<EOL><DEDENT>md.reset()<EOL>md.Meta = {}<EOL>return (proj_data, proj_docs, md)<EOL>
Method to parse and check configurations of FORD, get the project's 
global documentation, and create the Markdown reader.