diff --git a/file-tools/file-organizer/README.md b/file-tools/file-organizer/README.md index 686d418..88b7cb6 100644 --- a/file-tools/file-organizer/README.md +++ b/file-tools/file-organizer/README.md @@ -1 +1,21 @@ -File Organizer - A tool to clean up your messy folders \ No newline at end of file +File Organizer - A tool to clean up your messy folders + +## 📁 New Categories Added + +### 🎵 Music +| Extension | Format | +|-----------|--------| +| `.mp3` | MPEG Audio | +| `.wav` | Waveform Audio | +| `.aac` | Advanced Audio Codec | +| `.flac` | Free Lossless Audio Codec | +| `.ogg` | Ogg Vorbis | + +### 🎨 Design +| Extension | Format | +|-----------|--------| +| `.psd` | Adobe Photoshop | +| `.ai` | Adobe Illustrator | +| `.eps` | Encapsulated PostScript | +| `.sketch` | Sketch App | +| `.fig` | Figma | \ No newline at end of file diff --git a/social-media/youtube-downloader/downloader.py b/social-media/youtube-downloader/downloader.py new file mode 100644 index 0000000..1e64933 --- /dev/null +++ b/social-media/youtube-downloader/downloader.py @@ -0,0 +1,48 @@ +import yt_dlp + +""" +Python Automation Hub - YouTube Downloader +A tool to download single videos and playlists with real-time progress. +""" + +def progress_hook(d): + if d['status'] == 'downloading': + percent = d.get('_percent_str', 'N/A') + speed = d.get('_speed_str', 'N/A') + eta = d.get('_eta_str', 'N/A') + print(f"\r⬇ Downloading: {percent} | Speed: {speed} | ETA: {eta}", end="", flush=True) + elif d['status'] == 'finished': + print(f"\n✅ Done: {d['filename']}") + +ydl_opts = { + 'noplaylist': False, + 'progress_hooks': [progress_hook], + 'postprocessors': [{ + 'key': 'FFmpegExtractAudio', + 'preferredcodec': 'mp3', + 'preferredquality': '192', + }], + 'outtmpl': '%(title)s.%(ext)s', +} + +def download(urls): + with yt_dlp.YoutubeDL(ydl_opts) as ydl: + for url in urls: + print(f"\n🎵 Starting: {url}") + try: + ydl.download([url]) + except Exception as e: + print(f"❌ Failed: {url} — {e}") + +if __name__ == "__main__": + print("🎶 YouTube Downloader — Enter URLs (one per line). Empty line to start:") + urls = [] + while True: + url = input("> ").strip() + if not url: + break + urls.append(url) + if urls: + download(urls) + else: + print("No URLs provided.") \ No newline at end of file