This release introduces a major overhaul of the `mediacurator` command-line interface (CLI) and comprehensive updates to the documentation. The CLI has transitioned from a custom argument parsing system to utilizing Python's `argparse` and `argcomplete` libraries, greatly enhancing usability and flexibility. Due to these significant changes, the version is incremented from **0.0.13** to **1.0.1**. - **Refactored** `tools.py` for standardized command-line argument handling using `argparse` and `argcomplete`. - **Improved** user interaction with structured arguments and built-in help, error handling, and validation. - **Consolidated** video detail printing logic into a reusable method within the `Video` class. - **Enhanced** `MediaLibrary` class with better clarity, functionality, and expanded support for video formats. - **Reorganized** `main.py` to streamline argument handling and improve error feedback. - **Updated** `setup.py` for release preparation, including new classifiers and dependencies. - **Revised** README.md for clarity, including structured command usage and improved descriptions. - **Moved** and improved old documentation, removing outdated content and adding new screenshots. - **Maintained** legacy commands for backward compatibility while enhancing usability with clear examples. - **Removed** non-existent `bcolors` from the public API. - **Upgraded** requirements.txt to include `argcomplete` for command-line completion. - **Updated** docstrings and function documentation for clarity on functionality and parameters.
58 lines
2.2 KiB
ReStructuredText
58 lines
2.2 KiB
ReStructuredText
==========
|
|
Quickstart
|
|
==========
|
|
|
|
To use `mediacurator`, execute the following command structure:
|
|
|
|
.. code-block:: bash
|
|
|
|
mediacurator <command> [options]
|
|
|
|
mediacurator [list convert] [-del/--delete]
|
|
[-i/--inputs any 3gp asf avi divx dv f4v flv gif m2ts m4v mkv mov mp4 mpeg mpg mts ogm ogv rm swf ts vid vob webm wmv]
|
|
[-fl/--filters fferror old lowres hd 720p 1080p uhd mpeg mpeg4 x264 wmv3 wmv]
|
|
[-o/--outputs mkv/mp4 x265/av1]
|
|
[-p/--printop list formatted verbose]
|
|
[-d/--dirs "/mnt/media/" "/mnt/media2/"]
|
|
[-f/--files "file1.ext" "file2.ext"]
|
|
|
|
**Available commands:**
|
|
- `list`: List all videos with specified filters.
|
|
- `convert`: Convert videos to specified formats.
|
|
|
|
**Options:**
|
|
|
|
- `-del` or `--delete`: Delete found results after successful operations.
|
|
- `-i <input>` or `--inputs <input>`: Specify input file formats (default: `any`).
|
|
- `-fl <filter>` or `--filters <filter>`: Apply filters to the selection of videos.
|
|
- `-o <output>` or `--outputs <output>`: Specify output formats (default: `mkv`, `x265`).
|
|
- `-p <print_option>` or `--printop <print_option>`: Set print options (default: `list`).
|
|
- `-f <file>` or `--files <file>`: Specify files to process.
|
|
- `-d <directory>` or `--dirs <directory>`: Specify directories to process.
|
|
|
|
**For multiple files or filenames, use space-separated values ( ).**
|
|
|
|
**Default options:**
|
|
|
|
- `-i/--inputs any`
|
|
- `-fl/--filters`
|
|
- `-o/--outputs mkv x265`
|
|
- `-p/--printop list`
|
|
|
|
**Examples:**
|
|
|
|
The following examples demonstrate how to use `mediacurator` with the options listed above:
|
|
|
|
.. code-block:: bash
|
|
|
|
# List all videos with an old codec in formatted format
|
|
mediacurator list --filters old --printop formatted --dirs /mnt/media/ >> ../medlist.txt
|
|
|
|
# Convert all videos with the MPEG4 codec to MP4 using the AV1 codec and delete the originals
|
|
mediacurator convert --delete --filters mpeg4 --outputs av1,mp4 --dirs "/mnt/media/Movies/"
|
|
|
|
# Convert any video with AVI or MPG extensions, print formatted text including FFmpeg's output, and then delete the originals
|
|
mediacurator convert --delete --inputs avi,mpg --printop formatted,verbose --dirs /mnt/media/
|
|
|
|
For more examples, see :doc:`use_cases`.
|