fontrenamer.py
is a Python script designed to rename font files (e.g., .ttf, .woff, .woff2, .otf) based on the font name and style.
fontrenamer.py
یک اسکریپت پایتون است که برای تغییر نام فایلهای فونت (مانند .ttf, .woff, .woff2, .otf) بر اساس نام و سبک فونت طراحی شده است. این اسکریپت به توسعهدهندگان وب و طراحان کمک میکند تا فونتهای خود را به صورت سازماندهی شده و قابل شناسایی نگه دارند.
- نصب خودکار کتابخانههای مورد نیاز: اسکریپت کتابخانههای پایتون مورد نیاز (
fonttools
وbrotli
) را اگر نصب نشده باشند، به صورت خودکار نصب میکند. - استخراج اطلاعات فونت: نام و سبک فونت را از فایل فونت استخراج میکند.
- تغییر نام فایلهای فونت: فایلهای فونت را براساس نام و سبک فونت به فرمت جدید تغییر نام میدهد.
- پایتون نسخه 3.6 یا بالاتر
- میتوانید پایتون را از Python.org دانلود و نصب کنید.
-
کلون کردن مخزن:
git clone https://github.com/mohammad021/FontRenamer.git cd FontRenamer
-
اجرای اسکریپت:
python fontrenamer.py
- تغییر نام فایلهای فونت:
برای تغییر نام فایلهای فونت در دایرکتوری جاری، اسکریپت را اجرا کنید:
python fontrenamer.py
-
install_package:
- یک پکیج را با استفاده از pip نصب میکند.
-
get_font_info:
- نام و سبک فونت را از فایل فونت استخراج میکند.
-
تغییر نام فایلهای فونت:
- فایلهای فونت را براساس نام و سبک استخراج شده تغییر نام میدهد.
این پروژه تحت لایسنس MIT منتشر میشود.
fontrenamer.py
is a Python script designed to rename font files (e.g., .ttf, .woff, .woff2, .otf) based on the font name and style. This script helps web developers and designers keep their fonts organized and easily identifiable.
- Automatic Installation of Required Libraries: The script installs the necessary Python libraries (
fonttools
andbrotli
) if they are not already installed. - Extract Font Information: Extracts the name and style of the font from the font file.
- Rename Font Files: Renames font files based on the extracted name and style.
- Python 3.6 or higher
- You can download and install Python from Python.org.
-
Clone the Repository:
git clone https://github.com/mohammad021/FontRenamer.git cd FontRenamer
-
Run the Script:
python fontrenamer.py
- Renaming Font Files:
To rename the font files in the current directory, run the script:
python fontrenamer.py
-
install_package:
- Installs a package using pip.
-
get_font_info:
- Extracts the name and style of the font from the font file.
-
Renaming Font Files:
- Renames font files based on the extracted name and style.
This project is released under the MIT License.