From 2cc7c87cc5657c0142862d13a39bc7cccf9eea52 Mon Sep 17 00:00:00 2001 From: Andros Fenollosa Date: Tue, 31 Aug 2021 08:36:14 +0200 Subject: [PATCH] Update src folder --- README.md | 4 ++-- .../icons => icons}/battery-status.png | Bin .../__init__.py => src/__main__.py | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) rename {alert_battery_to_maintain_health/icons => icons}/battery-status.png (100%) rename alert_battery_to_maintain_health/__init__.py => src/__main__.py (92%) diff --git a/README.md b/README.md index 5e74bac..3c5c0a9 100755 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ poetry install # Run ```bash -poetry run python3 alert_battery_to_maintain_health/__init__.py +poetry run python3 src ``` # Cron @@ -39,5 +39,5 @@ crontab -e Add the following: ```bash -* * * * * cd [absolute path folder] && poetry run python3 alert_battery_to_maintain_health/__init__.py +* * * * * 'cd [absolute path folder] && poetry run python3 src' ``` diff --git a/alert_battery_to_maintain_health/icons/battery-status.png b/icons/battery-status.png similarity index 100% rename from alert_battery_to_maintain_health/icons/battery-status.png rename to icons/battery-status.png diff --git a/alert_battery_to_maintain_health/__init__.py b/src/__main__.py similarity index 92% rename from alert_battery_to_maintain_health/__init__.py rename to src/__main__.py index 604d5ed..728d2c3 100755 --- a/alert_battery_to_maintain_health/__init__.py +++ b/src/__main__.py @@ -16,7 +16,7 @@ PATH_FILE_NAME_TEMP = os.path.join(gettempdir(), FILE_NAME_TEMP) NOTIFICATION = Notify( default_notification_title="Alert battery", default_application_name="Alert battery", - default_notification_icon=os.path.abspath("alert_battery_to_maintain_health/icons/battery-status.png"), + default_notification_icon=os.path.abspath("icons/battery-status.png"), ) @@ -67,4 +67,4 @@ if __name__ == '__main__': # Unlock to warned elif LIMIT_BELOW_BATTERY < get_battery_percent() < LIMIT_ABOVE_BATTERY: - os.remove(PATH_FILE_NAME_TEMP) \ No newline at end of file + os.remove(PATH_FILE_NAME_TEMP)