parent
8fe3de4db2
commit
4dcad750c5
@ -1,21 +1,21 @@
|
|||||||
boto3==1.36.8
|
boto3==1.42.94
|
||||||
botocore==1.36.8
|
botocore==1.42.94
|
||||||
gTTS==2.5.4
|
gTTS==2.5.4
|
||||||
moviepy==2.2.1
|
moviepy==2.2.1
|
||||||
playwright==1.49.1
|
playwright==1.58.0
|
||||||
praw==7.8.1
|
praw==7.8.1
|
||||||
requests==2.32.3
|
requests==2.32.5
|
||||||
rich==13.9.4
|
rich==15.0.0
|
||||||
toml==0.10.2
|
toml==0.10.2
|
||||||
translators==5.9.9
|
translators==5.9.9
|
||||||
pyttsx3==2.98
|
pyttsx3==2.98
|
||||||
tomlkit==0.13.2
|
tomlkit==0.14.0
|
||||||
Flask==3.1.1
|
Flask==3.1.3
|
||||||
clean-text==0.6.0
|
clean-text==0.6.0
|
||||||
unidecode==1.4.0
|
unidecode==1.4.0
|
||||||
spacy==3.8.7
|
torch==2.11.0
|
||||||
torch==2.7.0
|
transformers==4.57.6
|
||||||
transformers==4.52.4
|
# spacy==3.8.7 # Optional: only for advanced text parsing (not yet Python 3.14 compatible)
|
||||||
ffmpeg-python==0.2.0
|
ffmpeg-python==0.2.0
|
||||||
elevenlabs==1.57.0
|
elevenlabs==2.44.0
|
||||||
yt-dlp==2025.10.14
|
yt-dlp==2025.10.14
|
||||||
|
|||||||
@ -1,13 +1,14 @@
|
|||||||
|
from typing import Union
|
||||||
from PIL.ImageFont import FreeTypeFont, ImageFont
|
from PIL.ImageFont import FreeTypeFont, ImageFont
|
||||||
|
|
||||||
|
|
||||||
def getsize(font: ImageFont | FreeTypeFont, text: str):
|
def getsize(font: Union[ImageFont, FreeTypeFont], text: str):
|
||||||
left, top, right, bottom = font.getbbox(text)
|
left, top, right, bottom = font.getbbox(text)
|
||||||
width = right - left
|
width = right - left
|
||||||
height = bottom - top
|
height = bottom - top
|
||||||
return width, height
|
return width, height
|
||||||
|
|
||||||
|
|
||||||
def getheight(font: ImageFont | FreeTypeFont, text: str):
|
def getheight(font: Union[ImageFont, FreeTypeFont], text: str):
|
||||||
_, height = getsize(font, text)
|
_, height = getsize(font, text)
|
||||||
return height
|
return height
|
||||||
|
|||||||
Loading…
Reference in new issue