scripts

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit 2a14e7dcdd4fe190fee4117f268937bd15ec5324
parent 7807680b5bbe85017690b802b4afec8bf5fdc60c
Author: Andrew Laack <andrew@laack.co>
Date:   Thu, 12 Feb 2026 20:09:01 -0600

Added and updated a bunch of utility scripts

Diffstat:
Minit-screen.sh | 3++-
Dmessaging.sh | 3---
Anewsboat-urls.sh | 4++++
Apython-files/iterative-lookup.py | 29+++++++++++++++++++++++++++++
Ascreens/dual-g9.sh | 2++
Awork/bump.sh | 6++++++
Ayt-subtitles.sh | 4++++
7 files changed, 47 insertions(+), 4 deletions(-)

diff --git a/init-screen.sh b/init-screen.sh @@ -37,7 +37,8 @@ if [ ! -d "$directory" ]; then exit 1 fi -qutebrowser --target window & +librewolf +#qutebrowser --target window & cd "$directory" st & diff --git a/messaging.sh b/messaging.sh @@ -1,3 +0,0 @@ -#!/bin/bash -librewolf slack.com discord.com calendar.google.com & -thunderbird & diff --git a/newsboat-urls.sh b/newsboat-urls.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +newsboat --cleanup >> /dev/null 2>&1 && newsboat -x reload >> /dev/null 2>&1 +sqlite3 ~/.local/share/newsboat/cache.db "select url from rss_item where unread = '1'" diff --git a/python-files/iterative-lookup.py b/python-files/iterative-lookup.py @@ -0,0 +1,29 @@ +import subprocess +from openai import OpenAI +import requests +import sys +import os + +args = [] +first = True +for arg in sys.argv: + if first: + first = False + continue + args.append(arg) + +print(args) + +client = OpenAI( + api_key=os.environ.get("OPENAI_API_KEY"), +) + +for arg in args: + resp = subprocess.run(["lynx", '--dump', arg], stdout=subprocess.PIPE) + response = client.responses.create( + model="gpt-5.2", + instructions="You are a summarization agent for a mid career software engineer with ML research experience.", + input="Summarize this article: " + resp.stdout.decode('utf-8', 'ignore'), + ) + + print(response.output_text) diff --git a/screens/dual-g9.sh b/screens/dual-g9.sh @@ -0,0 +1,2 @@ +#!/bin/sh +xrandr --output eDP-1 --primary --mode 1920x1200 --pos 1539x1440 --rotate normal --output DP-3 --mode 5120x1440 --pos 0x0 --rotate normal --output HDMI-1 --off --output DP-2 --off --output DP-1 --off --output DP-4 --off diff --git a/work/bump.sh b/work/bump.sh @@ -0,0 +1,6 @@ +git branch andrew/bump-vet-v$1 +git checkout andrew/bump-vet-v$1 +vim .github/workflows/vet.yml +sendit "Bumped vet version to v$1" +git push --set-upstream origin andrew/bump-vet-v$1 +echo "Comment to post: Bumped vet to v$1" diff --git a/yt-subtitles.sh b/yt-subtitles.sh @@ -0,0 +1,4 @@ +#!/bin/bash +yt-dlp --write-auto-subs --sub-format vtt --skip-download -o - "$1" +cat ./-.en.vtt | sed '/^[0-9]/d; /^$/d; /-->/d; /WEBVTT/d' > transcript.txt +rm ./-.en.vtt