diff --git a/crawler.py b/crawler.py index 54e2861..6074fa8 100644 --- a/crawler.py +++ b/crawler.py @@ -156,6 +156,9 @@ def main(): if args.no_git: return + if repo.git.diff(name_only=True) == "": + return + repo.git.add("*") repo.index.commit(datetime.now().strftime("%Y-%m-%d %H:%M:%S")) origin = repo.remote(name="origin") @@ -347,7 +350,7 @@ def get_functions(elem): if grandchild.text.strip() != "" ) out.append((current_heading, sorted(current_body))) - return out + return sorted(out) def parse_speech(page):