Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sending more variables with the "Generator" #6

Closed
metin02oktay opened this issue Nov 30, 2021 · 2 comments
Closed

Sending more variables with the "Generator" #6

metin02oktay opened this issue Nov 30, 2021 · 2 comments

Comments

@metin02oktay
Copy link

metin02oktay commented Nov 30, 2021

import os
from thumb_gen import Generator

folder = 'C:/input'
for video in os.listdir(folder):
    if video.endswith('.mp4') or video.endswith('.mkv'):
        app = Generator(os.path.join(folder, video), custom_text=False, font_dir="C:/Project/font.ttf", font_size=25, bg_colour='blue', font_colour='red')
        app.run()

This code is very useful, but I want to send more veriables, eg: row size of images, or columns size of images.

Another issue is with custom text. Custom text is under images when it's too long.

@truethari
Copy link
Owner

I will solve these problems as soon as possible. And thanks for pointing these out

@truethari
Copy link
Owner

This has been fixed in the new version.

Example

import os
from thumb_gen import Generator

folder = 'C:/input'
for video in os.listdir(folder):
    if video.endswith('.mp4') or video.endswith('.mkv'):
        app = Generator(video_path=os.path.join(folder, video),
                        columns=5,
                        rows=10,
                        custom_text=False,
                        font_dir="C:/Project/font.ttf",
                        font_size=25,
                        bg_colour='blue',
                        font_colour='red')
        app.run()

https://github.com/truethari/thumb-gen/releases/tag/v4.0.1
https://pypi.org/project/thumb-gen/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants