diff --git a/Scripts/AE_Reminders/AEMissedMeetingData.js b/Scripts/AE_Reminders/AEMissedMeetingData.js index b76bd306..353c6f7a 100644 --- a/Scripts/AE_Reminders/AEMissedMeetingData.js +++ b/Scripts/AE_Reminders/AEMissedMeetingData.js @@ -214,4 +214,4 @@ function findMeetings() { // Setting up data range and empty arrays //Logger.log(sendMsg); // Debug to confirm send //Logger.log(respCode); // Debug to show errors, if any } -}; \ No newline at end of file +}; diff --git a/Scripts/WCA_Webhook/Code.js b/Scripts/WCA_Webhook/Code.js index e4b628ea..0383c57a 100644 --- a/Scripts/WCA_Webhook/Code.js +++ b/Scripts/WCA_Webhook/Code.js @@ -44,4 +44,4 @@ function doPost(e) { SpreadsheetApp.flush(); return HtmlService.createHtmlOutput("post request received"); -} \ No newline at end of file +} diff --git a/Scripts/WalmartExcel/requirements.txt b/Scripts/WalmartExcel/requirements.txt new file mode 100644 index 00000000..037a2d07 --- /dev/null +++ b/Scripts/WalmartExcel/requirements.txt @@ -0,0 +1,31 @@ +asgineer==0.8.1 +bcrypt==4.0.0 +certifi==2022.6.15.1 +charset-normalizer==2.1.1 +click==8.1.3 +greenlet==1.1.3 +h11==0.13.0 +idna==3.3 +itemdb==1.1.1 +Jinja2==3.1.2 +Levenshtein==0.20.7 +Markdown==3.4.1 +MarkupSafe==2.1.1 +msgpack==1.0.4 +numpy==1.23.4 +pandas==1.5.1 +pscript==0.7.7 +PyJWT==2.4.0 +pynvim==0.4.3 +python-dateutil==2.8.2 +python-Levenshtein==0.20.7 +pytz==2022.5 +rapidfuzz==2.12.0 +requests==2.28.1 +six==1.16.0 +timetagger==22.9.1 +timetagger-cli==21.5.1 +toml==0.10.2 +urllib3==1.26.12 +uvicorn==0.18.3 +XlsxWriter==3.0.3 diff --git a/Scripts/WalmartExcel/walmart.py b/Scripts/WalmartExcel/walmart.py new file mode 100644 index 00000000..ff1da2f0 --- /dev/null +++ b/Scripts/WalmartExcel/walmart.py @@ -0,0 +1,63 @@ +import os +import sys +from datetime import date +import glob +import shutil +import csv +import pandas as pd + +rootdir = "/Users/normrasmussen/Documents/Resources/Walmart/" +downloadir = "/Users/normrasmussen/Google Drive/My Drive/Shared with Clients/Walmart/" +basefile = "WalmartBase.xlsx" + +def copytemplate(rootdir, basefile): + today = date.today() + today = today.strftime("%m.%d.%Y") + template = rootdir+basefile + todayFile = f"Walmart-{today}.xlsx" + if os.path.exists(rootdir): + shutil.copy2(template, rootdir+todayFile) + #dirfiles = os.listdir(rootdir) + #print(dirfiles) + currentDash = rootdir+f"Walmart-{today}.xlsx" + print(currentDash) + findlatestExport(currentDash) + +def findlatestExport(currentDash): + listfiles = glob.glob(downloadir + '*.xlsx') + latestdownload = max(listfiles, key=os.path.getctime) + print(latestdownload) + copytoDash(latestdownload, currentDash) + +def copytoDash(latestdownload, currentDash): + readExport = pd.read_excel(latestdownload, index_col=False) + readExport.drop( + readExport.filter( + regex="Unname" + ),axis=1, + inplace=True) + copiedData = readExport.copy() + #with pd.ExcelWriter("") + +def bringtoExcel(latestdownload, currentDash): + with pd.ExcelWriter( + currentDash, + mode="a", + engine="openpyxl", + if_sheet_exists="overlay", + ) as writer: + copiedData.to_excel( + writer, + sheet_name="Data", + index=False, + ) +# cleanitUp(currentDash) + +def cleanitUp(currentDash): + cleanExcel = pd.read_excel(currentDash, sheet_name="Data", index_col=None) + cleanExcel.columns.values[0] = "tmp" + cleanExcel.drop(columns="tmp", axis=1, inplace=True) + print(cleanExcel) + +if __name__ == "__main__": + copytemplate(rootdir, basefile) diff --git a/Timetagger/_timetagger/users/norm~bm9ybQ==.db b/Timetagger/_timetagger/users/norm~bm9ybQ==.db index efdfa199..c7de1461 100644 Binary files a/Timetagger/_timetagger/users/norm~bm9ybQ==.db and b/Timetagger/_timetagger/users/norm~bm9ybQ==.db differ