# ddrescue-tui [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) [![software-qa](https://github.com/freiburg-missing-semester-course/project-MrMcX/actions/workflows/qa.yml/badge.svg)](https://github.com/freiburg-missing-semester-course/project-MrMcX/actions/workflows/qa.yml) ## Report The report can be found in `/report/`. The directory contains both the PDF file as well as the LaTex sources. ## Installation ### Requirements: The following packages required: - python3.10 or higher - pip modules: - matplotlib - numpy - textual - rich-pixels == 2.2.0 - gddrescue #### Optionally for development: - pip: - build - setuptools - textual-dev ### Installing Installing so it can be used from everywhere with `ddrescue-tui` can be done with `./utilctl install` or manually with `pipx install .` inside of the project directory. `utilctl` also installs all necessary requirements I recommend using pipx to avoid possible conflicts Alternatively, a .whl file can be downloaded from the releases tab and installed with pip. **For running ddrescue directly, the package has to be run as sudo and therefore also installed with sudo.** ### Building a binary package Building a package for binary distribution can be done with: `./utilctl build` or manually with `pipx run build`. ### Troubleshooting If the command results in a blank terminal, the Python IO encoding might be not set to UTF-8. You can fix this with `export PYTHONIOENCODING=utf-8` once per terminal session or by prepending the command like this: `PYTHONIOENCODING=utf-8 ddrescue-tui ` ## Usage ``` $ ddrescue-tui -h usage: ddrescue-tui [-h] [-i I] {open,run} ... TUI for ddrescue, visualizes the progress using the mapfile positional arguments: {open,run} open open mapfile run run ddrescue on startup (sudo required) options: -h, --help show this help message and exit -i I, --interval I Initial reload interval (default=32s) $ ddrescue-tui open -h usage: ddrescue-tui open [-h] [-n] mapfile positional arguments: mapfile mapfile to read from options: -h, --help show this help message and exit -n, --noninteractive Run simple non-interactive mode $ ddrescue-tui run -h usage: ddrescue-tui run [-h] [-o [OUT]] [-a ARGS] INPUT OUTPUT positional arguments: INPUT input file or device OUTPUT output file or folder options: -h, --help show this help message and exit -o [OUT], --output_name [OUT] output filename -a ARGS, --arguments ARGS Custom arguments ``` ## Examples Example mapfiles can be found in `./mapfiles`. ### Non-interactive ```bash $ ddrescue-tui open -n mapfiles/2024-02-10_virt.map ``` ![grafik](https://github.com/freiburg-missing-semester-course/project-MrMcX/assets/4057839/64295dfa-4825-4667-a19d-98d6bb1cb6e1) ```bash # ddrescue-tui open mapfiles/2024-01-18_HDD.map ``` ![grafik](https://github.com/freiburg-missing-semester-course/project-MrMcX/assets/4057839/c450ef8f-e594-4bf4-969b-2ea7e5b2b54b) ![grafik](https://github.com/freiburg-missing-semester-course/project-MrMcX/assets/4057839/c02b5dec-7eb0-46b1-a6bd-61ece2f03333)