From 3d22cf5fe5f0872cef938b2b9e408ae168c01c1e Mon Sep 17 00:00:00 2001 From: Jeffrey Serio Date: Sun, 6 Apr 2025 06:48:46 -0500 Subject: [PATCH] Use uv in shebang --- dayofweek | 2 +- myip | 7 ++++++- nerdfont_installer | 2 +- oci_reg_helper | 8 +++++++- resend_borg_error.py | 24 ------------------------ 5 files changed, 15 insertions(+), 28 deletions(-) delete mode 100755 resend_borg_error.py diff --git a/dayofweek b/dayofweek index c2995cf..24fc9ee 100755 --- a/dayofweek +++ b/dayofweek @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env -S uv run --script # # Usage: dayofweek # diff --git a/myip b/myip index d752ebe..07ae1b4 100755 --- a/myip +++ b/myip @@ -1,4 +1,9 @@ -#!/usr/bin/python3 +#!/usr/bin/env -S uv run --script +# /// script +# dependencies = [ +# "requests", +# ] +# /// """ myip - Fetch and display public IP information from ipinfo.io diff --git a/nerdfont_installer b/nerdfont_installer index 0e2cdcc..5512aa0 100755 --- a/nerdfont_installer +++ b/nerdfont_installer @@ -1,7 +1,7 @@ #!/usr/bin/env bash # LICENSE -# Copyright 2022 Jeffrey Serio +# Copyright 2022 Jeffrey Serio # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/oci_reg_helper b/oci_reg_helper index 2204ee7..714aee9 100755 --- a/oci_reg_helper +++ b/oci_reg_helper @@ -1,4 +1,10 @@ -#!/usr/bin/env python3 +#!/usr/bin/env -S uv run --script +# /// script +# dependencies = [ +# "docopt", +# "rich", +# ] +# /// """OCI Registry Helper diff --git a/resend_borg_error.py b/resend_borg_error.py deleted file mode 100755 index cf89e49..0000000 --- a/resend_borg_error.py +++ /dev/null @@ -1,24 +0,0 @@ -# /// script -# dependencies = [ -# "resend", -# ] -# /// - -import subprocess -from pathlib import Path - -import resend - -resend.api_key = ( - Path("/usr/local/etc/resend_api_key.txt").read_text().strip("\n") -) - -params: resend.Emails.SendParams = { - "from": "Borgmatic ", - "to": ["hyperreal@moonshadow.dev"], - "subject": "[moonshadow] Error running Borgmatic", - "text": "There was an error running your Borgmatic backup on moonshadow. Please investigate.", -} - -email = resend.Emails.send(params) -print(email)