From 3d10a07ab9ca281dca96a5d57e4281bd5f307494 Mon Sep 17 00:00:00 2001 From: Jeffrey Serio Date: Fri, 8 Nov 2024 08:04:23 -0600 Subject: [PATCH] Use embedded dependencies --- .envrc | 1 - calculate_mirror_size.py | 9 ++++++++- fetch_combined_trackers_list.py | 9 +++++++-- fetch_scihub_infohashes.py | 7 ++++++- list_torrents.py | 7 ++++++- qbt_sum_size.py | 7 ++++++- qbth.py | 9 ++++++++- requirements.txt | 24 ------------------------ scihub_knapsack.py | 8 +++++++- sync_from_remotes.py | 7 +++++-- sync_to_remotes.py | 8 ++++++-- update_tracker.py | 8 +++++++- 12 files changed, 66 insertions(+), 38 deletions(-) delete mode 100644 .envrc delete mode 100644 requirements.txt diff --git a/.envrc b/.envrc deleted file mode 100644 index 94840b3..0000000 --- a/.envrc +++ /dev/null @@ -1 +0,0 @@ -layout python3 diff --git a/calculate_mirror_size.py b/calculate_mirror_size.py index 86cecba..471c9c5 100755 --- a/calculate_mirror_size.py +++ b/calculate_mirror_size.py @@ -1,4 +1,11 @@ -#!/usr/bin/env python3 +# /// script +# dependencies = [ +# "requests", +# "bs4", +# "docopt", +# "rich", +# ] +# /// """calculate_mirror_size.py diff --git a/fetch_combined_trackers_list.py b/fetch_combined_trackers_list.py index 0c71b5b..ab07c9a 100755 --- a/fetch_combined_trackers_list.py +++ b/fetch_combined_trackers_list.py @@ -1,4 +1,9 @@ -#!/usr/bin/env python3 +# /// script +# dependencies = [ +# "requests", +# "docopt", +# ] +# /// """fetch_combined_trackers_list.py @@ -20,7 +25,7 @@ import requests from docopt import docopt if __name__ == "__main__": - args = docopt(__doc__) # type: ignore + args = docopt(__doc__) # type: ignore live_trackers_list_urls = [ "https://newtrackon.com/api/stable", diff --git a/fetch_scihub_infohashes.py b/fetch_scihub_infohashes.py index bd1d1f9..84fdb7f 100755 --- a/fetch_scihub_infohashes.py +++ b/fetch_scihub_infohashes.py @@ -1,4 +1,9 @@ -#!/usr/bin/env python3 +# /// script +# dependencies = [ +# "requests", +# "docopt", +# ] +# /// """fetch_scihub_infohashes.py diff --git a/list_torrents.py b/list_torrents.py index 9d8e0f8..179ecd6 100755 --- a/list_torrents.py +++ b/list_torrents.py @@ -1,4 +1,9 @@ -#!/home/jas/virtualenvs/list_torrents/bin/python3 +# /// script +# dependencies = [ +# "qbittorrent-api", +# "docopt", +# ] +# /// """list_torrents.py diff --git a/qbt_sum_size.py b/qbt_sum_size.py index 39f1edf..f5fd7b7 100755 --- a/qbt_sum_size.py +++ b/qbt_sum_size.py @@ -1,4 +1,9 @@ -#!/usr/bin/env python3 +# /// script +# dependencies = [ +# "qbittorrent-api", +# "docopt", +# ] +# /// """qbt_sum_size.py diff --git a/qbth.py b/qbth.py index 2d39e7c..d1618ce 100755 --- a/qbth.py +++ b/qbth.py @@ -1,4 +1,11 @@ -#!/usr/bin/env python3 +# /// script +# dependencies = [ +# "qbittorrent-api", +# "requests", +# "bs4", +# "docopt", +# ] +# /// """qbth.py - qbittorrent helper diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index e123802..0000000 --- a/requirements.txt +++ /dev/null @@ -1,24 +0,0 @@ -attr==0.3.2 -beautifulsoup4==4.12.3 -colorama==0.4.6 -ConfigParser==7.1.0 -cryptography==43.0.3 -docopt==0.6.2 -docutils==0.21.2 -filelock==3.16.1 -HTMLParser==0.0.2 -ipython==8.29.0 -ipywidgets==8.1.5 -jnius==1.1.0 -keyring==25.5.0 -pandas==2.2.3 -Pillow==11.0.0 -protobuf==5.28.3 -pyOpenSSL==24.2.1 -qbittorrent==0.1.6 -redis==5.2.0 -resend==2.4.0 -Sphinx==8.1.3 -thread==2.0.5 -urllib3_secure_extra==0.1.0 -xmlrpclib==1.0.1 diff --git a/scihub_knapsack.py b/scihub_knapsack.py index 1c6858c..49d2661 100755 --- a/scihub_knapsack.py +++ b/scihub_knapsack.py @@ -1,4 +1,10 @@ -#!/usr/bin/env python3 +# /// script +# dependencies = [ +# "qbittorrent-api", +# "requests", +# "docopt", +# ] +# /// """scihub_knapsack.py diff --git a/sync_from_remotes.py b/sync_from_remotes.py index 44725dd..3bf86dd 100755 --- a/sync_from_remotes.py +++ b/sync_from_remotes.py @@ -1,5 +1,8 @@ -#!/usr/bin/env nix-shell -#! nix-shell -i python3 --packages python3 python312Packages.resend +# /// script +# dependencies = [ +# "resend", +# ] +# /// import socket import subprocess diff --git a/sync_to_remotes.py b/sync_to_remotes.py index 53192dd..c4f6a8f 100755 --- a/sync_to_remotes.py +++ b/sync_to_remotes.py @@ -1,5 +1,9 @@ -#!/usr/bin/env nix-shell -#! nix-shell -i python3 --packages python3 python312Packages.resend +# /// script +# dependencies = [ +# "resend", +# ] +# /// + import socket import subprocess diff --git a/update_tracker.py b/update_tracker.py index 49a4f37..c19c482 100755 --- a/update_tracker.py +++ b/update_tracker.py @@ -1,4 +1,10 @@ -#!/usr/bin/env python3 +# /// script +# dependencies = [ +# "qbittorrent-api", +# "docopt", +# "rich", +# ] +# /// """update_tracker.py