- commit
- 01881af
- parent
- 1d218bc
- author
- xxwhirlpool
- date
- 2026-04-25 17:12:14 -0400 EDT
misc, iconshare ruby script
5 files changed,
+55,
-2
+2,
-0
1@@ -47,3 +47,5 @@ config/.local/bin/uvx
2
3 .directory
4 scripts/Scripts/.directory
5+scripts/Scripts/icons
6+scripts/Scripts/gallery.html
+1,
-0
1@@ -12,3 +12,4 @@ color_labels: disabled
2 accessible_colors: disabled
3 accessible_prompter: disabled
4 spinner: enabled
5+telemetry: disabled
R config/.local/bin/scratchpad =>
config/.local/bin/mess
+0,
-0
+5,
-2
1@@ -2,9 +2,12 @@
2 #
3 # lazy ass way to get my idol MP3s
4
5-if [[ $# -eq 0 ]]; then
6+url="$1"
7+vidname="$2"
8+
9+if [[ "$#" -eq 0 || "$#" -ne 2 ]]; then
10 echo "Usage: ytmp3 [URL]"
11 exit 1
12 fi
13
14-yt-dlp -f ba -x --audio-format mp3 -o "%(title)s.%(ext)s" "$1"
15+yt-dlp -f ba -x --audio-format mp3 -o "$vidname.%(ext)s" "$url"
1@@ -0,0 +1,47 @@
2+#!/usr/bin/env ruby
3+
4+def usage
5+ puts "Usage: iconshare.rb [DIR]"
6+end
7+
8+icondir = ARGV[0] || "./icons/*"
9+
10+if icondir.nil?
11+ puts usage
12+ exit
13+end
14+
15+htmlfile = File.open("./gallery.html", "w+")
16+
17+css = <<-EOF
18+ <style>
19+ html {
20+ background: #eff1f5;
21+ display: flex;
22+ flex-direction: column;
23+ align-items: center;
24+ }
25+
26+ .wrapper {
27+ background: #303446;
28+ padding-block: 1rem;
29+ padding-inline: 1rem;
30+ max-width: 420px;
31+ }
32+
33+ .wrapper img {
34+ margin-block-end: 4px;
35+ padding-inline: 2px;
36+ }
37+ </style>
38+EOF
39+
40+htmlfile.write(css)
41+htmlfile.write("<main class=\"wrapper\">")
42+
43+files = Dir[icondir].each do |icon|
44+ imghtml = "<img src=\"#{icon}\">"
45+ htmlfile.write(imghtml)
46+end
47+
48+htmlfile.write("</main")