def github_belspec_files(spec_dir, force: bool = False):
if not force:<EOL><INDENT>dtnow = datetime.datetime.utcnow()<EOL>delta = datetime.timedelta(<NUM_LIT:1>)<EOL>yesterday = dtnow - delta<EOL>for fn in glob.glob(f"<STR_LIT>"):<EOL><INDENT>if datetime.datetime.fromtimestamp(os.path.getmtime(fn)) > yesterday:<EOL><INDENT>log.info("<STR_LIT>")<EOL>return<EOL><DEDENT><DEDENT><DEDENT>repo_url = "<STR_LIT>"<EOL>params = {}<EOL>github_access_token = os.getenv("<STR_LIT>", "<STR_LIT>")<EOL>if github_access_token:<EOL><INDENT>params = {"<STR_LIT>": github_access_token}<EOL><DEDENT>r = requests.get(repo_url, params=params)<EOL>if r.status_code == <NUM_LIT:200>:<EOL><INDENT>results = r.json()<EOL>for f in results:<EOL><INDENT>url = f["<STR_LIT>"]<EOL>fn = os.path.basename(url)<EOL>if "<STR_LIT>" not in fn and "<STR_LIT>" in fn:<EOL><INDENT>fn = fn.replace("<STR_LIT>", "<STR_LIT>")<EOL><DEDENT>r = requests.get(url, params=params, allow_redirects=True)<EOL>if r.status_code == <NUM_LIT:200>:<EOL><INDENT>open(f"<STR_LIT>", "<STR_LIT:wb>").write(r.content)<EOL><DEDENT>else:<EOL><INDENT>sys.exit(<EOL>f"<STR_LIT>"<EOL>)<EOL><DEDENT><DEDENT><DEDENT>else:<EOL><INDENT>sys.exit(<EOL>f"<STR_LIT>"<EOL>)<EOL><DEDENT>
Get belspec files from Github repo


    Args:
        spec_dir: directory to store the BEL Specification and derived files
        force: force update of BEL Specifications from Github - skipped if local files less than 1 day old