diff --git a/.config/rclone/rclone.conf.example b/.config/rclone/rclone.conf.example index 99b1d7a..a2b3d31 100644 --- a/.config/rclone/rclone.conf.example +++ b/.config/rclone/rclone.conf.example @@ -21,12 +21,4 @@ host = YOUR_HOST user = YOUR_USERNAME port = YOUR_PORT pass = YOUR_ENCRYPTED_HASH -shell_type = cmd - -[digifeeds_reports] -type = alias -remote = digifeeds_dropbox:YOUR_REPORTS_FOLDER - -[digifeeds_dropbox] -type = dropbox -token = {"access_token":"YOUR_ACCESS_TOKEN","token_type":"bearer","expiry":"0001-01-01T00:00:00Z"} +shell_type = cmd \ No newline at end of file diff --git a/aim/cli/digifeeds.py b/aim/cli/digifeeds.py index aadc0af..00d26d0 100644 --- a/aim/cli/digifeeds.py +++ b/aim/cli/digifeeds.py @@ -171,6 +171,6 @@ def generate_barcodes_in_s3_report(): """ Generates a report of barcodes that have been moved to the google pickup location in the last two weeks. It is based on the files in the processed - location in the s3 bucket. This report is sent to a dropbox folder. + location in the s3 bucket. This report is sent to a folder on Mayhem. """ functions.generate_barcodes_added_in_last_two_weeks_report() diff --git a/aim/digifeeds/functions.py b/aim/digifeeds/functions.py index e2c901d..6fa5106 100644 --- a/aim/digifeeds/functions.py +++ b/aim/digifeeds/functions.py @@ -61,8 +61,8 @@ def generate_barcodes_added_in_last_two_weeks_report(): write_barcodes_added_in_last_two_weeks_report(rf) today = datetime.today().strftime("%Y-%m-%d") - S.logger.info("writing report to dropbox") + S.logger.info("writing google delivery report") rclone.copyto( in_path=report_file.name, - out_path=f"{S.digifeeds_reports_rclone_remote}:{today}_barcodes_in_s3_processed.tsv", + out_path=f"{S.digifeeds_google_delivery_reports_rclone_remote}:{today}_barcodes_in_s3_processed.tsv", ) diff --git a/aim/services.py b/aim/services.py index a466d79..561d15d 100644 --- a/aim/services.py +++ b/aim/services.py @@ -89,8 +89,8 @@ class Services: #: The name of the rclone remote for the place where google pickups up the digifeeds files digifeeds_pickup_rclone_remote: str - #: The name of the rclone remote where reports from digifeeds are sent - digifeeds_reports_rclone_remote: str + #: The name of the rclone remote where reports about what has been sent to google are sent + digifeeds_google_delivery_reports_rclone_remote: str #: file path to store of the hathi_file_list update items hathifiles_store_path: str @@ -129,7 +129,9 @@ class Services: or "digifeeds_bucket", digifeeds_pickup_rclone_remote=os.getenv("DIGIFEEDS_PICKUP_RCLONE_REMOTE") or "digifeeds_pickup", - digifeeds_reports_rclone_remote=os.getenv("DIGIFEEDS_REPORTS_RCLONE_REMOTE") + digifeeds_google_delivery_reports_rclone_remote=os.getenv( + "DIGIFEEDS_GOOGLE_DELIVERY_REPORTS_RCLONE_REMOTE" + ) or "digifeeds_reports", hathifiles_store_path=os.getenv("HATHIFILES_STORE_PATH") or "tmp/hathi_file_list_store.json", diff --git a/env.example b/env.example index 067a9a3..9474a40 100644 --- a/env.example +++ b/env.example @@ -2,3 +2,12 @@ UID=YOUR_UID GID=YOUR_GID POETRY_VERSION=1.5.1 DEV=true + +RCLONE_CONFIG_CHAOS_TYPE=smb +RCLONE_CONFIG_CHAOS_HOST=your_smb_host +RCLONE_CONFIG_CHAOS_USER=your_smb_user +RCLONE_CONFIG_CHAOS_PASS=your_smb_password +RCLONE_CONFIG_CHAOS_DOMAIN=your_smb_domain + +RCLONE_CONFIG_DIGIFEEDS_GOOGLE_DELIVERY_REPORTS_TYPE=alias +RCLONE_CONFIG_DIGIFEEDS_GOOGLE_DELIVERY_REPORTS_REMOTE=chaos:your_reports_path \ No newline at end of file