- Ensure the bank API details are saved in the
products_master.txt
file and run the python script namedscript.py
.
- Add your csv files to be tagged to the
tagger
directory and run thedata_tagger.py
script.
-
Follow the steps given in the Google Cloud documentation for (getting started with authentication)[https://cloud.google.com/docs/authentication/getting-started#auth-cloud-implicit-python] and set up a service account. This service account will be used by the script to authenticate to the Google Sheet.
-
Set an environment variable called
GOOGLE_APPLICATION_CREDENTIALS
with the file path to the service account authentication file. -
Specify the following configs in the
config.yaml
file.spreadsheetId
- This is the id of the Google Sheet to be updated. This is mandatory. The id of a Google Sheet can be found in the sheet's url as shown here:https://docs.google.com/spreadsheets/d/{spreadsheetId}/
nameOfSheetToBeUpdated
- This is the name of the specific sheet to be updated in our Google Sheet.uploadMode
- If this is set tooverwrite
, all data in the sheet will be overwritten with the new data. If it is set toappend
, which is the default, only the new lines of data will be appended to the sheet.historicalData
- If this is set to true, the sheet to be uploaded can be specified using thepathToSheetToBeUploaded
config described below. By default, this is false, which means the script will look for the tagged script for the date the script is run in thetagger/tagged
directory in the project. Therefore, ensure the tagged file for the day is available in thetagged
directory when running the script in the default mode.pathToSheetToBeUploaded
- This is necessary only if thehistoricalData
config is set to true Here, we specify the file path of the sheet to be uploaded.
- This bash script will run all of the above 3 scripts consecutively.