docs: Enhance fonttools installation instructions and error messages to differentiate between pip and pipx usage.
This commit is contained in:
@@ -18,11 +18,18 @@ Ensure the following tools and libraries are installed and accessible in your sy
|
|||||||
2. **MKVToolNix** (specifically `mkvmerge` and `mkvextract`)
|
2. **MKVToolNix** (specifically `mkvmerge` and `mkvextract`)
|
||||||
3. **fonttools** (Python library)
|
3. **fonttools** (Python library)
|
||||||
|
|
||||||
Install the required Python dependency via pip:
|
Install the required Python dependency:
|
||||||
|
|
||||||
|
For Windows or Ubuntu, you can use `pip`:
|
||||||
```bash
|
```bash
|
||||||
pip install fonttools
|
pip install fonttools
|
||||||
```
|
```
|
||||||
|
|
||||||
|
For ArchLinux (or if your system enforces PEP 668), it is recommended to use `pipx`:
|
||||||
|
```bash
|
||||||
|
pipx install fonttools
|
||||||
|
```
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
Simply place the script inside the directory containing the `.mkv` files you wish to process and run it. You can also place the script in your personal `bin` or `PATH` folder to run it from anywhere.
|
Simply place the script inside the directory containing the `.mkv` files you wish to process and run it. You can also place the script in your personal `bin` or `PATH` folder to run it from anywhere.
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,8 @@ try:
|
|||||||
from fontTools.ttLib import TTFont
|
from fontTools.ttLib import TTFont
|
||||||
except ImportError:
|
except ImportError:
|
||||||
print("Error: 'fonttools' is required to accurately read internal font names.")
|
print("Error: 'fonttools' is required to accurately read internal font names.")
|
||||||
print("Please install it by running: pip install fonttools")
|
print("Please install it by running: pip install fonttools (for Windows/Ubuntu)")
|
||||||
|
print("Or: pipx install fonttools (for ArchLinux)")
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
def get_ass_font_names(ass_path):
|
def get_ass_font_names(ass_path):
|
||||||
|
|||||||
Reference in New Issue
Block a user