Skip to content

Abbabon/NASUtils

Repository files navigation

NASUtils

A collection of utilities for personal NAS management, organized into focused sub-projects for file organization, archive creation, ROM management, and YouTube video downloading.

Project Structure

The repository is organized into specialized sub-projects:

  • file-organizer/ - File organization daemon with Docker support
  • youtube-downloader/ - YouTube video downloader with multi-language audio
  • cbz-creator/ - Comic book archive (CBZ) creation utility
  • playlist-cleanup/ - Playlist file cleanup tool
  • roms/ - ROM file management suite
  • changes-detector/ - Website change monitoring service

File Organizer (file-organizer/)

Daemon process that continuously organizes files by date into YYYY/MM directory structure.

Docker Commands

# Build the image
cd file-organizer
docker build -t file-organizer .

# Run container locally
docker run -d --name file-organizer-container \
  -v /path/to/input:/input_directory \
  -v /path/to/output:/output_parent_directory \
  file-organizer

Direct Usage

python file-organizer/filesOrganizer.py /input_directory /output_parent_directory

YouTube Downloader (youtube-downloader/)

Downloads highest quality video with multi-language audio tracks and popular subtitles.

Features

  • Smart Quality Selection: Downloads highest quality video format available
  • Multi-Language Audio: Automatically detects and downloads best audio track for each unique language with proper track titles
  • Popular Subtitles: Downloads subtitles for 12 popular languages to avoid hundreds of auto-generated tracks
  • Rate Limiting: Built-in delays and retry logic to handle YouTube's rate limiting
  • Duplicate Prevention: Skips downloads if video already exists
  • Organized Output: Creates unique folders per video using video ID
  • MKV Container: Merges all tracks into single file with embedded subtitles and metadata
  • Clean Output: Automatically removes temporary files and standalone subtitle files after embedding

Requirements

  • yt-dlp installed and available in PATH
  • ffmpeg installed and available in PATH (for video/audio processing and metadata)
  • Bash shell environment (works with bash 3.2+ including macOS default)

Usage

./youtube-downloader/yt-download.sh "https://youtube.com/watch?v=VIDEO_ID" [output_directory]

If no output directory is specified, downloads to youtube-downloader/downloads/ folder.

Other Utilities

CBZ Creator (cbz-creator/)

python cbz-creator/cbzify.py /path/to/comic/directories

Recursively converts image directories into CBZ comic book archives.

Playlist Cleanup (playlist-cleanup/)

python playlist-cleanup/playlist_cleanup.py /playlist/directory "prefix_to_remove"

Cleans playlist files by removing path prefixes with backup creation.

ROM Management (roms/)

# Count ROM files by extension
python roms/countRoms.py /rom/directory .nes .smc .iso

# Organize ROMs by system
python roms/organizeRoms.py /mixed/rom/directory

# Extract all ZIP files recursively
python roms/unzipRoms.py /rom/directory
  • changes-detector/ - Website change monitoring service

Changes Detector (changes-detector/)

Website change monitoring service using changedetection.io with Docker support.

Docker Commands

# Start the service
cd changes-detector
docker compose up -d

# View logs
docker compose logs -f

# Stop the service
docker compose down

Access the web interface at http://192.168.1.209:8300 (or your NAS IP with port 8300).

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •