Use uv in shebang

This commit is contained in:
Jeffrey Serio 2025-04-06 06:48:46 -05:00
parent 68fa93f34f
commit 3d22cf5fe5
5 changed files with 15 additions and 28 deletions

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env -S uv run --script
#
# Usage: dayofweek <year> <month> <day>
#

7
myip
View File

@ -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

View File

@ -1,7 +1,7 @@
#!/usr/bin/env bash
# LICENSE
# Copyright 2022 Jeffrey Serio <hyperreal@fedoraproject.org>
# Copyright 2022 Jeffrey Serio <hyperreal@moonshadow.dev>
#
# 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

View File

@ -1,4 +1,10 @@
#!/usr/bin/env python3
#!/usr/bin/env -S uv run --script
# /// script
# dependencies = [
# "docopt",
# "rich",
# ]
# ///
"""OCI Registry Helper

View File

@ -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 <admin@hyperreal.coffee>",
"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)