auto-update-daily-20260202
1#+TITLE: Tools
2#+AUTHOR: Vincent Demeester
3#+DATE: 2025-11-22
4
5Collection of custom tools and utilities for system management and automation.
6
7* Shell Scripts
8
9** DNS Management
10
11*** show-dns.sh
12
13Display DNS zone configuration from NixOS bind configuration with enhanced formatting.
14
15*Usage:*
16#+begin_src shell
17# Show compact summary view (default)
18./show-dns.sh
19
20# Show full zone files with syntax highlighting
21./show-dns.sh --verbose
22
23# Check zones for specific host
24./show-dns.sh athena
25
26# Or via make target
27make dns-show
28#+end_src
29
30*Features:*
31- Compact summary view with record counts by default
32- Color-coded DNS record types (SOA, NS, A, PTR, etc.)
33- Column-aligned output for easy scanning
34- Groups records by type with spacing
35- Shows TTL values when present
36- Verbose mode for full zone file output
37- Statistics summary at the end
38- Useful for verifying DNS configuration before sync
39
40*** update-gandi-dns.sh
41
42Synchronize DNS records from NixOS configuration to Gandi Live DNS.
43
44*Usage:*
45#+begin_src shell
46# Dry run to preview changes (requires GANDIV5_PERSONAL_TOKEN)
47./update-gandi-dns.sh --dry-run
48
49# Apply changes to Gandi DNS
50./update-gandi-dns.sh
51
52# Or via make targets
53make dns-update-gandi-dry-run
54make dns-update-gandi
55#+end_src
56
57*Features:*
58- Extracts A records from NixOS DNS zone configuration
59- Syncs records to Gandi Live DNS API using Bearer token authentication
60- Dry-run mode for safe preview of changes
61- Skips unchanged records to minimize API calls
62- Supports wildcard DNS records
63
64*Requirements:*
65- =GANDIV5_PERSONAL_TOKEN= environment variable (Gandi Personal Access Token)
66- On rhea: =source /run/agenix/gandi.env= to load token
67
68* Python Scripts
69
70** Media Management (*arr Stack)
71
72*** lidarr-update-paths.py
73
74Update artist paths in Lidarr to use a 'library' subdirectory.
75
76*Usage:*
77#+begin_src shell
78# Dry run to preview changes
79./lidarr-update-paths.py http://localhost:8686 API_KEY /data/music --dry-run
80
81# Apply changes
82./lidarr-update-paths.py http://localhost:8686 API_KEY /data/music
83#+end_src
84
85*Features:*
86- Migrates artists from =/music/<artist>= to =/music/library/<artist>=
87- Dry-run mode for safe preview
88- Categorizes artists by current location
89- Bulk path updates via Lidarr API
90
91*** lidarr-rename-albums.py
92
93Rename albums in Lidarr with interactive confirmation.
94
95*Usage:*
96#+begin_src shell
97# Dry run to preview renames
98./lidarr-rename-albums.py http://localhost:8686 API_KEY --dry-run
99
100# Interactive mode (asks y/n for each artist)
101./lidarr-rename-albums.py http://localhost:8686 API_KEY
102
103# Auto-confirm all renames (--yolo or --no-confirm)
104./lidarr-rename-albums.py http://localhost:8686 API_KEY --yolo
105#+end_src
106
107*Features:*
108- Checks all artists for albums with files needing rename
109- Shows preview of up to 10 file renames per artist
110- Interactive confirmation before applying changes
111- Dry-run and auto-confirm (--yolo/--no-confirm) modes
112
113*** lidarr-retag-albums.py
114
115Retag albums in Lidarr with interactive confirmation.
116
117*Usage:*
118#+begin_src shell
119# Dry run to preview retags
120./lidarr-retag-albums.py http://localhost:8686 API_KEY --dry-run
121
122# Interactive mode (asks y/n for each artist)
123./lidarr-retag-albums.py http://localhost:8686 API_KEY
124
125# Auto-confirm all retags (--yolo or --no-confirm)
126./lidarr-retag-albums.py http://localhost:8686 API_KEY --yolo
127#+end_src
128
129*Features:*
130- Checks all artists for albums with files needing retag
131- Shows preview of up to 5 file retags per artist with tag changes
132- Displays old → new values for each modified tag
133- Interactive confirmation before applying changes
134- Dry-run and auto-confirm (--yolo/--no-confirm) modes
135
136*** sonarr-rename-series.py
137
138Rename TV series episodes in Sonarr with interactive confirmation.
139
140*Usage:*
141#+begin_src shell
142# Dry run to preview renames
143./sonarr-rename-series.py http://localhost:8989 API_KEY --dry-run
144
145# Interactive mode (asks y/n for each series)
146./sonarr-rename-series.py http://localhost:8989 API_KEY
147
148# Auto-confirm all renames (--yolo or --no-confirm)
149./sonarr-rename-series.py http://localhost:8989 API_KEY --yolo
150#+end_src
151
152*Features:*
153- Checks all series for episodes needing rename
154- Shows preview of up to 10 episode renames per series
155- Interactive confirmation before applying changes
156- Dry-run and auto-confirm (--yolo/--no-confirm) modes
157
158*** radarr-rename-movies.py
159
160Rename movies in Radarr with interactive confirmation.
161
162*Usage:*
163#+begin_src shell
164# Dry run to preview renames
165./radarr-rename-movies.py http://localhost:7878 API_KEY --dry-run
166
167# Interactive mode (asks y/n for each movie)
168./radarr-rename-movies.py http://localhost:7878 API_KEY
169
170# Auto-confirm all renames (--yolo or --no-confirm)
171./radarr-rename-movies.py http://localhost:7878 API_KEY --yolo
172#+end_src
173
174*Features:*
175- Checks all movies for files needing rename
176- Shows preview of all file renames per movie
177- Interactive confirmation before applying changes
178- Dry-run and auto-confirm (--yolo/--no-confirm) modes
179
180* Go Tools
181
182** arr
183
184Unified CLI for managing *arr services (Sonarr, Radarr, Lidarr) and Jellyfin with Spotify playlist sync.
185
186See [[file:arr/README.md][arr/README.md]] for detailed documentation.
187
188** battery-monitor
189
190Battery monitoring daemon and notification system for laptops.
191
192** cliphist-cleanup
193
194Clipboard history cleanup utility for cliphist.
195
196** gh-pr
197
198GitHub pull request management tool for approving and managing PRs.
199
200* Python Tools
201
202** music-playlist-dl
203
204Automated downloader for electronic music podcasts from Mixcloud/SoundCloud with M3U playlist generation.
205
206See [[file:music-playlist-dl/README.md][music-playlist-dl/README.md]] for detailed documentation.
207
208** download-kiwix-zim
209
210Browse and download ZIM files from the Kiwix library using fzf.
211
212* Other Tools
213
214** claude-hooks
215
216Claude Code hooks for session management and tool output capture.
217
218** org-manager
219
220Org-mode management utilities for programmatic org file manipulation.
221
222* Directories
223
224** emacs/
225
226Emacs configuration and custom packages.
227
228** fedora-vm/
229
230Fedora VM setup and configuration scripts.
231
232* Notes
233
234All Python scripts use the =uv= tool with inline script metadata (PEP 723).
235They require only the =requests= library and will automatically manage
236dependencies when run with =uv=.
237
238All scripts are executable and include built-in help:
239#+begin_src shell
240./script-name.py --help
241#+end_src