From 301973d8229a4524d5c6dd0f2ccb2256032b452e Mon Sep 17 00:00:00 2001 From: Matthew Gaughan Date: Mon, 18 Dec 2023 20:43:39 -0600 Subject: [PATCH] expanding the measures studied --- non_coding_measures_scrape.py | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 non_coding_measures_scrape.py diff --git a/non_coding_measures_scrape.py b/non_coding_measures_scrape.py new file mode 100644 index 0000000..b9a2824 --- /dev/null +++ b/non_coding_measures_scrape.py @@ -0,0 +1,33 @@ +import pexpect +import os +import json +import sys +import subprocess +import csv + + +#sys.path.append('../octohatrack') +#import octohatrack.__main__ as oh + + +def main(): + wd = os.getcwd() + with open("expanded_data_final.csv", "r") as file: + reader = csv.reader(file) + for i, line in enumerate(reader): + if "github" not in line[5]: + continue + repo_name = line[5].strip()[19:] + print(repo_name) + os.chdir("../octohatrack") + try: + subprocess.run(['python3', '-m', 'octohatrack', repo_name]) + except: + print("issue with the repository, string indices must be integers") + os.chdir(wd) + #os.chdir("../octohatrack") + #subprocess.run(['python3', '-m', 'octohatrack', 'bluesky-social/atproto']) + #os.chdir(wd) + +if __name__ == "__main__": + main() \ No newline at end of file