Compare commits

...
5 Commits
Author SHA1 Message Date
tangent e4c90473ea Upload files to "/" 2026-08-13 14:42:31 -06:00
tangent 95f4c85f32 Upload files to "/"
This better fucking recognize that it was chmodded but I don't expect it to.
2026-08-08 02:06:44 -06:00
tangent 513d77f5e4 Update ReadMe.md 2026-06-27 06:37:20 -06:00
tangent c44c92711d close #2 mods, Luanti, search 2026-06-27 06:36:05 -06:00
tangent 8b6fe815d1 fix chmod on all scripts 2026-06-27 06:35:41 -06:00
7 changed files with 465 additions and 4 deletions
+2 -1
View File
@@ -1,6 +1,7 @@
one-off-scripts
===============
This repo is hosted at https://gitea.tangentfox.com/tangent/one-off-scripts and force-pushed to GitHub when commits are made.
This repo is hosted at https://gitea.tangentfox.com/tangent/one-off-scripts
and force-pushed to https://github.com/TangentFoxy/one-off-scripts when commits are made.
Feel free to submit pull requests or whatever, but know that I would have to manage them over there.
Regular → Executable
View File
Regular → Executable
+11 -3
View File
@@ -4,14 +4,14 @@ local pause_between_opens = false
math.randomseed(os.time())
local books = {
read = 857,
unread = 3093,
read = 1966,
unread = 4103,
per_calibre_page = 6,
}
books.total = books.read + books.unread
local ratings = {
91, 130, 222, 158, 41
210, 384, 587, 383, 87,
}
local average_rating = (function()
local count, rating = 0, 0
@@ -37,6 +37,13 @@ books.average_page_count = books.average_page_count * (1 - 0.17)
-- 2025-11-19
-- this was approximately 124.9, but a current estimate is 148.72
books.average_page_count = 148.72
-- 2026-06-20
-- read + DNF + owned
books.average_page_count = 136909/1096 + 33597/170 + 207799/1421
print("Estimated average page count per book: " .. books.average_page_count)
local function to_calibre_pages(count)
@@ -81,3 +88,4 @@ print("Press enter to open 9 random pages on Calibre. :D Or close this window /
io.read("*line")
open_random_links("unread", 9)
-- open_random_links("read", 9)
Regular → Executable
View File
+65
View File
@@ -0,0 +1,65 @@
#!/usr/bin/env bash
set -e
OUTPUT="audiobook.m4b"
FILES="files.txt"
CHAPTERS="chapters.txt"
# list of MP3 files in filename order
find . -maxdepth 1 -name '*.mp3' -print0 |
sort -z |
while IFS= read -r -d '' file; do
file="${file#./}"
printf "file '%s'\n" "$file"
done > "$FILES"
# start chapter metadata file
{
echo ";FFMETADATA1"
} > "$CHAPTERS"
START=0
while IFS= read -r line; do
FILE="${line#file \'}"
FILE="${FILE%\'}"
# duration in milliseconds
DURATION=$(ffprobe \
-v error \
-show_entries format=duration \
-of csv=p=0 \
"$FILE")
DURATION_MS=$(awk "BEGIN {printf \"%.0f\", $DURATION * 1000}")
END=$((START + DURATION_MS))
# filename as the chapter title
TITLE="${FILE%.mp3}"
cat >> "$CHAPTERS" <<EOF
[CHAPTER]
TIMEBASE=1/1000
START=$START
END=$END
title=$TITLE
EOF
START=$END
done < "$FILES"
read -p "Press Enter key after making any corrections to $CHAPTERS"
ffmpeg \
-f concat \
-safe 0 \
-i "$FILES" \
-i "$CHAPTERS" \
-map 0:a \
-map_metadata 1 \
-c:a aac \
-b:a 128k \
-movflags +faststart \
"$OUTPUT"
Regular → Executable
View File
+387
View File
@@ -0,0 +1,387 @@
#!/usr/bin/env luajit
-- this list was manually assembled from my notes
local mods = {
"plutoniumships",
"stnodes",
"too_many_tnt",
"mesecons_carts",
"coloredstrings",
"grass_string",
"renewable_desert_stone",
"basic_materials",
"farming",
"x_farming",
"unifieddyes",
"xcompat",
"worldedit",
"home_workshop_modpack",
"plasticbox",
"steel",
"xdecor",
"technic",
"technic_recycle",
"plastic_bucket",
"uraniumstuff",
"anvil",
"hammers_redo",
"desertores",
"livingcaves",
"livingcavesmobs",
"roads",
"digilines",
"mesecons",
"moreblocks",
"digistuff",
"eye_spy",
"edit_skin",
"fishing_boat",
"whitelist",
"lib_chatcmdbuilder",
"carpets",
"digiterms",
"display_modpack",
"biofuel",
"automobiles_pck",
"nutrional",
"denseores",
"airtanks",
"handholds_redo",
"bike",
"pixelfurniture",
"airutils",
"ju52",
"ju52_hydro",
"supercub",
"hidroplane",
"heli",
"trike",
"pa28",
"spacecannon",
"accountmgr",
"farmtools",
"imese",
"scifi_nodes",
"beacons",
"dfcaverns",
"tunnelmaker",
"railbuilder",
"advtrains",
"advtrains_moreslopes",
"advtrains_platform",
"advtrains_horntrack",
"dlxtrains",
"classic_coaches",
"tfl_s7_stock_modpack",
"advtrains_train_rocket",
"advtrains_subway_ny",
"advtrains_train_orient_express",
"advtrains_train_jpntlr600",
"advtrains_transib",
"advtrains_freight_train",
"advtrains_bboe_1080",
"advtrains_db_160",
"advtrains_train_zugspitzbahn",
"ethereal",
"wihelminessound",
"datacard",
"x_enchanting",
"bucket_wooden",
"motorboat",
"mobkit",
"digicontrol",
"colorful_beds",
"discovery_maps",
"computertest",
"more_ladders",
"colored_chests",
"bonemeal",
"livingdesert",
"livingjungle",
"naturalbiomes",
"ambience",
"marinara",
"people",
"marinaramobs",
"nativevillages",
"winuserleafdecay",
"everness",
"cottages",
"towercrane",
"homedecor_modpack",
"pipeworks",
"lwcomponents",
"moretubes",
"omnidriver",
"plantlife_modpack",
"ebiomes",
"biome_lib",
"mobs",
"yl_api_nodestages",
"yl_canned_food",
"yl_canned_food_mtg",
"mobs_water",
"mobs_animal",
"glooptest",
"mobs_horse",
"mobs_mese_monster_classic",
"dmobs",
"travelnet",
"hangglider",
"fakelib",
"3d_armor",
"illumination",
"hazmat_suit",
"headlamp",
"technic_armor",
"unified_inventory",
"unified_inventory_plus",
"vizlib",
"cool_trees",
"powerbanks",
"mobs_monster",
"treecapitator",
"moretrees",
"moreores",
"toolranks",
"toolranks_extras",
"charcoal",
"awards",
"moreawards",
"ancient_bones",
"bakedclay",
"orienteering",
"ccompass",
"spacesuit",
"ropes",
"obsidianstuff",
"more_chests",
"multitools",
"luanti_utils",
"vines",
"morebricks",
"place_rotated",
"digtron",
"drawers",
"elevator",
"stamina",
"lavastuff",
"wetmud",
"geocache",
"locator",
"jumpdrive",
"loot",
"maple",
}
-- this list was obtained from running ls -1 in the worldmods directory
local current_mods = {
"3d_armor",
"accountmgr",
"advtrains",
"advtrains_bboe_1080",
"advtrains_db_160",
"advtrains_freight_train",
"advtrains_horntrack",
"advtrains_moreslopes",
"advtrains_platform",
"advtrains_subway_ny",
"advtrains_train_jpntlr600",
"advtrains_train_orient_express",
"advtrains_train_rocket",
"advtrains_train_zugspitzbahn",
"advtrains_transib",
"airtanks",
"airutils",
"ambience",
"ancient_bones",
"anvil",
"automobiles_pck",
"awards",
"bakedclay",
"basic_materials",
"beacons",
"bike",
"biofuel",
"biome_lib",
"bucket_wooden",
"carpets",
"ccompass",
"charcoal",
"classic_coaches",
"colored_chests",
"coloredstrings",
"colorful_beds",
"computertest",
"cool_trees",
"cottages",
"datacard",
"denseores",
"desertores",
"dfcaverns",
"digicontrol",
"digilines",
"digistuff",
"digiterms",
"digtron",
"discovery_maps",
"display_modpack",
"dlxtrains",
"dmobs",
"drawers",
"ebiomes",
"edit_skin",
"elevator",
"everness",
"eye_spy",
"fakelib",
"farming",
"farmtools",
"fishing_boat",
"geocache",
"grass_string",
"hammersredo",
"handholds_redo",
"hangglider",
"hazmat_suit",
"headlamp",
"heli",
"hidroplane",
"home_workshop_modpack",
"homedecor_modpack",
"illumination",
"ju52",
"ju52_hydro",
"jumpdrive",
"lavastuff",
"lib_chatcmdbuilder",
"livingcaves",
"livingcavesmobs",
"livingdesert",
"livingjungle",
"locator",
"lwcomponents",
"marinara",
"marinaramobs",
"mesecons",
"mesecons_carts",
"mob_horse",
"mob_mese_monster_classic",
"mobkit",
"mobs",
"mobs_animal",
"mobs_monster",
"mobs_water",
"more_chests",
"more_ladders",
"moreawards",
"moreblocks",
"morebricks",
"moreores",
"moretrees",
"moretubes",
"motorboat",
"multitools",
"nativevillages",
"naturalbiomes",
"nutritional",
"obsidianstuff",
"omnidriver",
"orienteering",
"pa28",
"people",
"pipeworks",
"pixelfurniture",
"place_rotated",
"plantlife_modpack",
"plastic_bucket",
"plasticbox",
"plutoniumships",
"powerbanks",
"railbuilder",
"renewable_desert_stone",
"roads",
"ropes",
"scifi_nodes",
"spacecannon",
"spacesuit",
"stamina",
"steel",
"stnodes",
"supercub",
"technic_armor",
"technic_plus",
"tfl_s7_stock_modpack",
"too_many_tnt",
"toolranks",
"toolranks_extras",
"towercrane",
"travelnet",
"treecapitator",
"trike",
"tunnelmaker",
"unified_inventory",
"unified_inventory_plus",
"unifieddyes",
"uraniumstuff",
"vizlib",
"wetmud",
"whitelist",
"wilhelminessounds",
"winuserleafdecay",
"worldedit",
"x_enchanting",
"x_farming",
"xcompat",
"xdecor",
"yl_api_nodestages",
"yl_canned_food",
"yl_canned_food_mtg",
}
local function uniqify_mods(mod_list)
print(#mod_list .. " mods listed.")
local unique = {}
for _, name in ipairs(mod_list) do unique[name] = true end
mod_list = {}
for name in pairs(unique) do mod_list[#mod_list + 1] = name end
print(#mod_list .. " unique.")
table.sort(mod_list)
return mod_list
end
local function open_mods_search(mod_list)
for i, name in ipairs(mod_list) do
print("Opening search for " .. name)
os.execute("open \"https://content.luanti.org/packages/?q=" .. name .. "\"")
os.execute("sleep 1") -- open creates race conditions with itself, so these are not opened in order, despite being called in order
if i % 9 == 0 then
print("Press enter to continue.")
io.read("*line")
end
end
end
local function detect_inconsistencies()
local mods_unique = {}
for _, name in ipairs(mods) do mods_unique[name] = true end
local current_mods_hashtable = {}
for _, name in ipairs(current_mods) do current_mods_hashtable[name] = true end
-- local missing_mods, overstated_mods = {}, {} -- I don't need to make the lists because they're so small.. I hope
for name in pairs(current_mods_hashtable) do
if not mods_unique[name] then print(name .. " missing from manual list.") end
end
print()
for name in pairs(mods_unique) do -- this list SHOULD exist, but already fixed in my markdown note
if not current_mods_hashtable[name] then print(name .. " listed, but was rejected.") end
end
print()
end
detect_inconsistencies()
open_mods_search(uniqify_mods(mods))