From b6f2b60d917e380abbb2868f0e69dffb6318bfc9 Mon Sep 17 00:00:00 2001 From: ibnaleem Date: Wed, 3 Jan 2024 19:57:09 +0000 Subject: [PATCH] add python script to search csv --- .DS_Store | Bin 0 -> 6148 bytes scripts/main.py | 25 +++++++++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 .DS_Store create mode 100644 scripts/main.py diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..ce30cdf93ed5d6da7b0e8fe2a6d1435f1cfe9acc GIT binary patch literal 6148 zcmeHK%Zd|06umW*F&%@Lg#)t@8r+64PR0Ro6Z1d-IfOS9KAQXioe0h$=+npfDD$qq@R)p38>q zm=X39YK`|4(K#K`B@H*&cEBoN75Li};BU7~KJ`daLhIje+>K=~jAaN0Zx4@94u2{` zi?;-yVhZrBOPW$jlN|qRj=x7OdWKb=QYXt4w{y&!U_J-;j83UbO?rV=7yZZBS%%cl zd4JA%7wHMuE$YC-+lcie$1c-|#>ij@L=K41Lw%8rp>qGSmU{_L*1>3-v$^W2h_he! zC}PzfB1Jk*c73J5AK2k+GBR)CTR4iNNm{FY7dyL!y=z6M=#-te-Um7J(jc8qn!)%r z_s*n@!&N&7Uq*wOU%AziNg71SV5}UX{s5FWucD+cXH7Xx`V-~r=?SOgl>ExUe12TN zUv=w8CyS~(e{fW*y2tgC#iHcw-?{tn)c+U{6Zr}G!UWC%Wj742fZtM1g9~q*#4lztLP*e8f|SAunJ@q*wx(% zpZ}fT-~Y2twr3Tv3j9|Jh(g 0: + return result[0] + else: + return f"No prompt found for '{search_string}'." + + +if __name__ == "__main__": + prompt_finder = PromptFinder("../prompts.csv") + if not sys.stdin.isatty(): + act_to_search = sys.stdin.readline().rstrip() + else: + act_to_search = input("Enter the ACT to search for: ") + + prompt_result = prompt_finder.find(act_to_search) + + print(prompt_result) \ No newline at end of file