4.5 KiB
4.5 KiB
Medios-Macina
Medios-Macina is a CLI media manager and toolkit focused on downloading, tagging, and media storage (audio, video, images, and text) from a variety of providers and sources. It is designed around a compact, pipeable command language ("cmdlets") so complex workflows can be composed simply and repeatably.
Features
- Flexible syntax structure: chain commands with
|and select options from tables with@N. - Multiple file stores: HYDRUSNETWORK, FOLDER
- Provider plugin integration: YOUTUBE, OPENLIBRARY/ARCHIVE.ORG, SOULSEEK, LIBGEN, ALLDEBRID, TELEGRAM, BANDCAMP
- Module Mixing: Playwright, yt-dlp, aioslsk, telethon,typer
- MPV Manager: Play audio, video, and even images in a custom designed MPV with trimming, screenshotting, and more built right in!
installation ⚡
-
run python setup.py
-
rename config.conf.remove to config.conf the store=folder path should be empty folder with no other files in it.
temp="C:\\Users\\Admin\\Downloads"
[store=folder]
name="default"
path="C:\Users\Public\Documents\library"
- Start the CLI by simply running "mm" in shell or run python cli.py
CLICK FOR GUIDED TUTORIAL
Usage overview 🔧
- Pipelines: chain cmdlets with
|, e.g.,download-media <url> | add-file -storage local.- From your shell you can pass a fully-quoted pipeline so the shell doesn't interpret
|as a pipe: e.g.mm "download-media <url> | add-file -storage local" - Format selection (non-interactive): When
download-mediashows multiple formats, you can select one non-interactively by re-running the pipeline and specifying the format:- Use a format id: `mm "download-media '' -query 'format:243' -path 'C://path' "
- Or use the listed index (1-based):
mm "download-media '<url>' -query 'format:7' " Note: The@Nselection syntax works in the interactive REPL, but shells like PowerShell treat@specially — prefer-query 'format:N'` when running a quoted pipeline from your shell.
- From your shell you can pass a fully-quoted pipeline so the shell doesn't interpret
- Selections: search cmdlets populate a selectable ResultTable; refer to entries with
@<index>. - Tagging & metadata:
add-tagmutates piped results (temporary path items) or writes to a configured store when-storeis provided.
Built-in image viewer
- MPV automatically detects still-image files and flips into an image viewer
- Arrow keys,
WASD, orh/j/k/lpan the image (recently tuned to ±0.05 steps),Shift+arrowoffers finer nudges,=/-zoom quickly (~45% per press),+/_zoom slowly, and0resets zoom/pan back to default. - Hit
fwhile an image is active to take a screenshot (uses MPV's screenshot pipeline) and get an OSD confirmation. - When MPV loads a video again, the script restores the regular video shortcuts automatically.
Common examples 💡
Simple download with metadata (tags and URL registration):
download-media "https://www.youtube.com/watch?v=dQw4w9WgXcQ" | add-file -storage local
Download a playlist item:
download-media "https://www.youtube.com/playlist?list=PLxxxxx" -item 2 | add-file -storage local | add-url
Take a website screenshot, tag it, and store locally:
screen-shot "https://example.com/page" | add-tag "title:Example Page,source:web" -path "c://"
OpenLibrary ingestion (book metadata & PDF/ebook handling is automatically enriched when add-file detects an OpenLibrary URL):
download-file "https://openlibrary.org/books/OLxxxxxM/Book_Title" | add-file -storage local
Search your library:
search-store "ext:mp3"
Providers & stores
- HydrusNetwork: use for database-backed media storage and advanced tagging (requires running Hydrus client/server).
- Local folder: copy files to a configured directory (fast and simple).
- YouTube / yt-dlp: robust media downloader for YouTube and many hosts.
- OpenLibrary / Archive.org: scripted metadata scraping and optional downloads.
- Soulseek, LibGen, All-Debrid, Others: provider support is modular—add or configure providers in
config.conf.
Troubleshooting & tips 🛠️
Contributing & docs
- Developer docs are generated under
docs/and tests live alongside the code; please run the test suite before submitting changes. - Contributions welcome—open issues or pull requests with clear descriptions and small, focused diffs.