commit bddf89509e956696463ce8d405f880004f203fea
parent 610fa116e18f39139a831c1f4900b731befa65fb
Author: regexghost <dev@regexghost.com>
Date: Mon, 27 Jul 2026 20:54:11 +0100
howlongtobeat.py, python venv aliases and android mtp mount function
Diffstat:
5 files changed, 68 insertions(+), 2 deletions(-)
diff --git a/apt-install.sh b/apt-install.sh
@@ -1,3 +1,3 @@
#!/bin/sh
-sudo apt install curl wget golang xorg xinit x11-xserver-utils bluetooth unzip git firefox-esr mpv vlc tar moc fasd fonts-roboto fonts-firacode figlet jq xcompmgr picom trash-cli ncdu pulsemixer feh moc-ffmpeg-plugin keepassxc-full fzf libnotify-bin dunst texinfo xmlstarlet duf gh tidy w3m bluetooth xclip wbritish wbritish-huge rsync pup rename ifuse libimobiledevice-utils chromium groff xdotool pulseaudio-module-bluetooth sqlite3 expect aria2 gammastep qimgv kimageformat-plugins kimageformat6-plugins nomacs mediainfo mpd mpc htop python3-venv btop alpine
+sudo apt install curl wget golang xorg xinit x11-xserver-utils bluetooth unzip git firefox-esr mpv vlc tar moc fasd fonts-roboto fonts-firacode figlet jq xcompmgr picom trash-cli ncdu pulsemixer feh moc-ffmpeg-plugin keepassxc-full fzf libnotify-bin dunst texinfo xmlstarlet duf gh tidy w3m bluetooth xclip wbritish wbritish-huge rsync pup rename ifuse libimobiledevice-utils chromium groff xdotool pulseaudio-module-bluetooth sqlite3 expect aria2 gammastep qimgv kimageformat-plugins kimageformat6-plugins nomacs mediainfo mpd mpc htop python3-venv btop alpine unrar-free android-file-transfer
diff --git a/dotfiles/.kshrc b/dotfiles/.kshrc
@@ -71,6 +71,7 @@ alias trash-size='du -s -h ~/.local/share/Trash/files/ | cut -f 1'
alias sync='echo "Syncing"; sync; echo "Done"; lsblk'
alias man='MANWIDTH=$(($(stty size | cut -d " " -f 2)-20)) man'
alias dff='df -h | grep -e Filesystem -e "^/dev" | grep -v efi'
+alias hltb='~/.local/share/regexghost/.venv/bin/python3 ~/.local/share/regexghost/terminal/howlongtobeat.py'
web () {
case "$1" in
@@ -86,6 +87,20 @@ web () {
esac
}
+android () {
+ case "$1" in
+ m*)
+ aft-mtp-mount ~/Downloads/USBDrive
+ ;;
+ u*)
+ fusermount -u ~/Downloads/USBDrive
+ ;;
+ f*)
+ fusermount -uz ~/Downloads/USBDrive
+ ;;
+ esac
+}
+
# Bug todo
alias bgl='bug ls'
@@ -117,6 +132,11 @@ gpa () {
git push -u mine
}
+# Python venv
+
+alias py='~/.local/share/regexghost/.venv/bin/python3'
+alias pip='~/.local/share/regexghost/.venv/bin/pip'
+
#### Start Substitute - Package_Manager
# Other random aliases
diff --git a/init.sh b/init.sh
@@ -64,4 +64,4 @@ mkdir -p ~/.cache/mpd
cd ~/.local/share/regexghost
python3 -m venv .venv
-~/.local/share/regexghost/.venv/bin/pip install music-tag pillow requests beautifulsoup4
+~/.local/share/regexghost/.venv/bin/pip install music-tag pillow requests beautifulsoup4 howlongtobeatpy
diff --git a/terminal-scripts/Makefile b/terminal-scripts/Makefile
@@ -40,3 +40,4 @@ normal:
cp os-transfer-backup.sh ${BIN}/os-transfer-backup
cp vid-play.sh ${BIN}/vid-play
cp blog-devlog.sh ${BIN}/blog-devlog
+ cp howlongtobeat.py ${TERMINAL}/howlongtobeat.py
diff --git a/terminal-scripts/howlongtobeat.py b/terminal-scripts/howlongtobeat.py
@@ -0,0 +1,45 @@
+from howlongtobeatpy import HowLongToBeat
+import sys
+
+BOLD = "\033[1m"
+RESET = "\033[0m"
+RED = "\033[31m"
+GREEN = "\033[32m"
+YELLOW = "\033[33m"
+BLUE = "\033[34m"
+MAGENTA = "\033[35m"
+CYAN = "\033[36m"
+
+if len(sys.argv) == 1 or sys.argv[1] == "-h" or sys.argv[1] == "--help" or (sys.argv[1] == "-a" and len(sys.argv) == 2):
+ print("Usage: " + sys.argv[0].split("/")[-1] + " [-a = all] <game_name> (quotes optional)")
+ exit(0)
+
+all = False
+gameName = ' '.join(sys.argv[1:])
+if sys.argv[1] == "-a":
+ all = True
+ gameName = ' '.join(sys.argv[2:])
+
+print("Searching for game: " + gameName)
+
+results = HowLongToBeat().search(gameName)
+
+length = len(results)
+
+if results == None or length == 0:
+ print("No results")
+ exit(1)
+
+print("")
+
+if not all and length > 5:
+ results = results[:5]
+ length = 5
+
+for i, result in enumerate(results):
+ print(f'{BOLD}{GREEN}{result.game_name}{RESET}')
+ print(f'{BOLD}{BLUE}Main Story:{RESET} {BOLD}{result.main_story}{RESET} hours')
+ print(f'{BOLD}{CYAN}Main + Extra:{RESET} {BOLD}{result.main_extra}{RESET} hours')
+ print(f'{BOLD}{MAGENTA}Completionist:{RESET} {BOLD}{result.completionist}{RESET} hours')
+ if not i == length - 1:
+ print("")