mediacurator/docs/_sources/usage/warnings.rst.txt
Fabrice Quenneville 5ba0f84d12 **Summary:**
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.
2024-10-20 23:19:42 -04:00

64 lines
2.5 KiB
ReStructuredText

========
Warnings
========
.. warning::
Before using the **delete feature**, we strongly recommend running several dry runs to get acquainted with `mediacurator`, as incorrect usage can cause irreversible damage to your media library.
The `--delete` flag will **permanently delete** files, so it is crucial to ensure that the command is executed correctly. Below are some examples of how the delete feature works.
Example use cases for the `--delete` Flag
-----------------------------------------
1. **Delete all non-HD (low-resolution) videos in a folder:**
.. code-block:: bash
mediacurator list --delete --filters lowres --dirs "/mnt/media/"
2. **Delete all substandard quality videos in a folder:**
.. code-block:: bash
mediacurator list --delete --filters subsd --dirs "/mnt/media/"
.. image:: ../_static/Screenshot-delete.png
:width: 600
:alt: Deleting videos
3. **Delete all videos in a folder with encoding errors:**
.. code-block:: bash
mediacurator list --delete --filters fferror --dirs "/mnt/media/"
4. **Convert (repair) and then delete all videos in a folder with encoding errors:**
.. code-block:: bash
mediacurator convert --delete --filters fferror --dirs "/mnt/media/"
5. **Delete all videos in a folder:**
.. code-block:: bash
mediacurator list --delete --dirs "/mnt/media/"
Important Notes
---------------
- **Irreversibility**: All of these commands involve permanent deletion. Once a file is deleted using the `--delete` flag, it cannot be recovered.
- **Run without `--delete` first**: Always perform several dry runs by omitting the `--delete` flag to ensure that the correct files are selected for deletion. Familiarizing yourself with the tool before using destructive commands is essential to avoid unintended consequences.
- **Specific File Selection**: If you're unsure about applying filters to an entire directory, you can use the `--files` option to target individual files for deletion or conversion, further reducing the risk of unintended deletions.
- **Backup Recommendation**: Before running any commands with the `--delete` flag, it is a good practice to back up your media library or the specific directories being processed, especially if they contain valuable or irreplaceable files.
Dry run example (without deletion)
----------------------------------
.. code-block:: bash
mediacurator list --filters lowres --dirs "/mnt/media/"
Make sure you carefully verify the output and files selected during the dry runs to prevent accidental data loss.