2025-12-11 19:04:02 -08:00
# Medios-Macina
2025-12-22 02:11:53 -08:00
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.
2025-12-13 00:18:30 -08:00
2025-12-23 16:36:39 -08:00
## Features
- **Flexible syntax structure:** chain commands with `|` and select options from tables with `@N` .
- **Multiple file stores:** *HYDRUSNETWORK, FOLDER*
2025-12-26 21:04:09 -08:00
- **Provider plugin integration:** *YOUTUBE, OPENLIBRARY, INTERNETARCHIVE, SOULSEEK, LIBGEN, ALLDEBRID, TELEGRAM, BANDCAMP*
2025-12-23 16:36:39 -08:00
- **Module Mixing:** *[Playwright](https://github.com/microsoft/playwright), [yt-dlp](https://github.com/yt-dlp/yt-dlp), [aioslsk](https://github.com/JurgenR/aioslsk), [telethon](https://github.com/LonamiWebs/Telethon),[typer](https://github.com/fastapi/typer)*
- **MPV Manager:** Play audio, video, and even images in a custom designed MPV with trimming, screenshotting, and more built right in!
2025-12-13 00:18:30 -08:00
2025-12-25 04:49:22 -08:00
## installation ⚡
2025-12-23 16:36:39 -08:00
2025-12-25 04:52:18 -08:00
GIT CLONE https://code.glowers.club/goyimnose/Medios-Macina
2025-12-25 05:18:06 -08:00
1. run python scripts\bootstrap.py
2025-12-23 16:36:39 -08:00
2025-12-25 04:49:22 -08:00
2. rename config.conf.remove to config.conf the store=folder path should be empty folder with no other files in it.
2025-12-13 00:18:30 -08:00
```ini
temp="C:\\Users\\Admin\\Downloads"
[store=folder]
name="default"
2025-12-25 04:49:22 -08:00
path="C:\Users\Public\Documents\library"
2025-12-13 00:18:30 -08:00
```
2025-12-25 04:49:22 -08:00
3. Start the CLI by simply running "mm" in shell or run python cli.py
2025-12-11 19:04:02 -08:00
2025-12-25 04:49:22 -08:00
# [CLICK FOR GUIDED TUTORIAL](/docs/tutorial.md)
2025-12-17 14:17:46 -08:00
## Usage overview 🔧
- Pipelines: chain cmdlets with `|` , e.g., `download-media <url> | add-file -storage local` .
2025-12-23 16:36:39 -08:00
- 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-media` shows multiple formats, you can select one non-interactively by re-running the pipeline and specifying the format:
2025-12-25 04:49:22 -08:00
- Use a format id: `mm "download-media '< url > ' -query 'format:243' -path 'C://path' "
- Or use the listed index (1-based): `mm "download-media '< url > ' -query 'format:7' "
2025-12-23 16:36:39 -08:00
Note: The `@N` selection syntax works in the interactive REPL, but shells like PowerShell treat `@` specially — prefer `-query 'format:N'` when running a quoted pipeline from your shell.
2025-12-17 14:17:46 -08:00
- Selections: search cmdlets populate a selectable ResultTable; refer to entries with `@<index>` .
- Tagging & metadata: `add-tag` mutates piped results (temporary path items) or writes to a configured store when `-store` is provided.
2025-12-11 19:04:02 -08:00
2025-12-25 04:49:22 -08:00
## Built-in image viewer
- MPV automatically detects still-image files and flips into an image viewer
2025-12-23 16:36:39 -08:00
- Arrow keys, `WASD` , or `h/j/k/l` pan the image (recently tuned to ±0.05 steps), `Shift+arrow` offers finer nudges, `=` /`-` zoom quickly (~45% per press), `+` /`_` zoom slowly, and `0` resets zoom/pan back to default.
- Hit `f` while 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.
2025-12-17 14:17:46 -08:00
## Common examples 💡
Simple download with metadata (tags and URL registration):
```bash
2025-12-25 04:49:22 -08:00
download-media "https://www.youtube.com/watch?v=dQw4w9WgXcQ" | add-file -storage local
2025-12-11 19:04:02 -08:00
```
2025-12-17 14:17:46 -08:00
Download a playlist item:
```bash
2025-12-11 19:04:02 -08:00
download-media "https://www.youtube.com/playlist?list=PLxxxxx" -item 2 | add-file -storage local | add-url
```
2025-12-17 14:17:46 -08:00
Take a website screenshot, tag it, and store locally:
```bash
2025-12-25 04:49:22 -08:00
screen-shot "https://example.com/page" | add-tag "title:Example Page,source:web" -path "c://"
2025-12-11 19:04:02 -08:00
```
2025-12-17 14:17:46 -08:00
OpenLibrary ingestion (book metadata & PDF/ebook handling is automatically enriched when `add-file` detects an OpenLibrary URL):
```bash
2025-12-25 04:49:22 -08:00
download-file "https://openlibrary.org/books/OLxxxxxM/Book_Title" | add-file -storage local
2025-12-11 19:04:02 -08:00
```
2025-12-17 14:17:46 -08:00
2025-12-25 04:49:22 -08:00
Search your library:
2025-12-17 14:17:46 -08:00
```bash
2025-12-30 23:19:02 -08:00
search-file "ext:mp3"
2025-12-11 19:04:02 -08:00
```
2025-12-17 14:17:46 -08:00
## 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.
2025-12-26 21:04:09 -08:00
- **OpenLibrary**: book metadata, borrowing, and Archive.org downloads.
- **Internet Archive**: search/download/upload via the `internetarchive` module.
2025-12-17 14:17:46 -08:00
- **Soulseek, LibGen, All-Debrid, Others**: provider support is modular—add or configure providers in `config.conf` .
## Troubleshooting & tips 🛠️
2025-12-23 16:36:39 -08:00
2025-12-11 19:04:02 -08:00
2025-12-23 16:36:39 -08:00
## Contributing & docs
2025-12-17 14:17:46 -08:00
- Developer docs are generated under `docs/` and tests live alongside the code; please run the test suite before submitting changes.
2025-12-25 04:49:22 -08:00
- Contributions welcome—open issues or pull requests with clear descriptions and small, focused diffs.