Beispiel #1
0
def main():
    png_filename = os.path.splitext(os.path.basename(__file__))[0] + '.png'
    #print(png_filename)

    png_filepath = os.path.join(root, 'images', png_filename)
    #print(png_filepath)

    img = Image.new('RGB', (width, height), color=background_color)

    font_gabor = ImageFont.truetype('Pillow/Tests/fonts/FreeMono.ttf', 40)
    font_title = ImageFont.truetype('Pillow/Tests/fonts/FreeSansBold.ttf', 160)
    font = ImageFont.truetype('Pillow/Tests/fonts/FreeSansBold.ttf', 40)
    draw = ImageDraw.Draw(img)
    add_text(
        draw = draw,
        text = "Getting Started",
        rtl  = False,
        size = 80,
        xy   = (250, 30),
    )

    add_text(
        draw = draw,
        text = "with the Golang",
        rtl  = False,
        size = 80,
        xy   = (250, 240),
    )

    add_text(
        draw = draw,
        text = "Course",
        rtl  = False,
        size = 80,
        xy   = (250, 440),
    )

    #add_text(
    #    draw = draw,
    #    text = "in less than",
    #    rtl  = False,
    #    size = 60,
    #    xy   = (250, 440),
    #)

    #add_text(
    #    draw = draw,
    #    text = "14 minutes",
    #    rtl  = False,
    #    size = 60,
    #    xy   = (250, 540),
    #)


    isize = 350
    embed_image(img=img, filename='gabor2_612x612.jpg', size=(isize, isize), box=(width-isize-10, height-isize-10))
    embed_image(img=img, filename='golang.png', box=(10, 10), mask=True)

    img.save(png_filepath)
    img.show()
def main():
    png_filename = os.path.splitext(os.path.basename(__file__))[0] + '.png'
    #print(png_filename)

    png_filepath = os.path.join(root, 'images', png_filename)
    #print(png_filepath)

    img = Image.new('RGB', (width, height), color=background_color)

    font_gabor = ImageFont.truetype('Pillow/Tests/fonts/FreeMono.ttf', 40)
    font_title = ImageFont.truetype('Pillow/Tests/fonts/FreeSansBold.ttf', 160)
    font = ImageFont.truetype('Pillow/Tests/fonts/FreeSansBold.ttf', 40)
    draw = ImageDraw.Draw(img)
    add_text(
        draw = draw,
        text = "App PerlTidy Tk",
        rtl  = False,
        size = 80,
        xy   = (50, 40),
    )

#    add_text(
#        draw = draw,
#        text = "in our own script",
#        rtl  = False,
#        size = 80,
#        xy   = (50, 240),
#    )

    add_text(
        draw = draw,
        text = "Introducing version 0.01",
        rtl  = False,
        size = 80,
        xy   = (50, 200),
    )

    add_text(
        draw = draw,
        text = "GUI for Perl Tidy",
        rtl  = False,
        size = 80,
        xy   = (50, 360),
    )

    add_text(
        draw = draw,
        text = "Perl Maven",
        rtl  = False,
        size = 80,
        xy   = (50, 520),
    )


    isize = 350
    embed_image(img=img, filename='gabor2_612x612.jpg', size=(isize, isize), box=(width-isize-10, height-isize-10))
    #embed_image(img=img, filename='tessa.png', box=(10, 10), mask=True)

    img.save(png_filepath)
    img.show()
Beispiel #3
0
def main():
    png_filename = os.path.splitext(os.path.basename(__file__))[0] + '.png'
    #print(png_filename)

    png_filepath = os.path.join(root, 'images', png_filename)
    #print(png_filepath)

    img = Image.new('RGB', (width, height), color=background_color)

    font_gabor = ImageFont.truetype('Pillow/Tests/fonts/FreeMono.ttf', 40)
    font_title = ImageFont.truetype('Pillow/Tests/fonts/FreeSansBold.ttf', 160)
    font = ImageFont.truetype('Pillow/Tests/fonts/FreeSansBold.ttf', 40)
    draw = ImageDraw.Draw(img)
    add_text(
        draw=draw,
        text="Learning Crystal",
        rtl=False,
        size=80,
        xy=(330, 30),
    )

    add_text(
        draw=draw,
        text="Programming - part 2",
        rtl=False,
        size=80,
        xy=(330, 200),
    )

    add_text(
        draw=draw,
        text="puts, print, p!, variable interpolation",
        rtl=False,
        size=60,
        xy=(30, 400),
    )

    add_text(
        draw=draw,
        text="    Gábor Szabó",
        rtl=False,
        size=60,
        xy=(620, 620),
    )

    embed_image(img=img,
                filename='gabor2_612x612.jpg',
                size=(200, 200),
                box=(width - 200 - 10, 500))
    embed_image(img=img,
                filename='crystal_b.png',
                size=(200, 200),
                box=(10, 10),
                mask=True)

    img.save(png_filepath)
    img.show()
def main():
    png_filename = os.path.splitext(os.path.basename(__file__))[0] + '.png'
    #print(png_filename)

    png_filepath = os.path.join(root, 'images', png_filename)
    #print(png_filepath)

    img = Image.new('RGB', (width, height), color=background_color)

    # Code-Maven Workshop

    font_gabor = ImageFont.truetype('Pillow/Tests/fonts/FreeMono.ttf', 40)
    font_title = ImageFont.truetype('Pillow/Tests/fonts/FreeSansBold.ttf', 160)
    font = ImageFont.truetype('Pillow/Tests/fonts/FreeSansBold.ttf', 40)
    draw = ImageDraw.Draw(img)

    add_text(
        draw=draw,
        text="Perl development",
        rtl=False,
        size=80,
        xy=(200, 30),
    )

    add_text(
        draw=draw,
        text="CPAN Digger",
        rtl=False,
        size=80,
        xy=(50, 220),
    )

    add_text(
        draw=draw,
        text="CPAN Dashboard",
        rtl=False,
        size=80,
        xy=(50, 410),
    )

    add_text(
        draw=draw,
        text="CPAN Rocks",
        rtl=False,
        size=80,
        xy=(50, 600),
    )

    isize = 350
    embed_image(img=img,
                filename='gabor2_612x612.jpg',
                size=(isize, isize),
                box=(width - isize - 10, height - isize - 10))
    embed_image(img=img, filename='metacpan.jpg', box=(10, 10), mask=False)

    img.save(png_filepath)
    img.show()
Beispiel #5
0
def main():
    png_filename = os.path.splitext(os.path.basename(__file__))[0] + '.png'
    #print(png_filename)

    png_filepath = os.path.join(root, 'images', png_filename)
    #print(png_filepath)

    img = Image.new('RGB', (width, height), color=background_color)

    font_gabor = ImageFont.truetype('Pillow/Tests/fonts/FreeMono.ttf', 40)
    font_title = ImageFont.truetype('Pillow/Tests/fonts/FreeSansBold.ttf', 160)
    font = ImageFont.truetype('Pillow/Tests/fonts/FreeSansBold.ttf', 40)
    draw = ImageDraw.Draw(img)
    add_text(
        draw = draw,
        text = "Laravel in Docker",
        rtl  = False,
        size = 80,
        xy   = (330, 30),
    )

    add_text(
        draw = draw,
        text = "Live programming session",
        rtl  = False,
        size = 60,
        xy   = (330, 200),
    )

    add_text(
        draw = draw,
        text = "Natalie O'Brien",
        rtl  = False,
        size = 60,
        xy   = (220, 520),
    )

    add_text(
        draw = draw,
        text = "    Gábor Szabó",
        rtl  = False,
        size = 60,
        xy   = (620, 620),
    )

    embed_image(img=img, filename='natalie_obrien.jpeg',   size=(200, 200), box=(10, 500))
    embed_image(img=img, filename='gabor2_612x612.jpg', size=(200, 200), box=(width-200-10, 500))
    #embed_image(img=img, filename='laravel.png', size=(200, 200), box=(10, 10), mask=False)

    img.save(png_filepath)
    img.show()
def main():
    png_filename = os.path.splitext(os.path.basename(__file__))[0] + '.png'
    png_filepath = os.path.join(root, 'images', png_filename)

    img = Image.new('RGB', (width, height), color=background_color)

    font_title = ImageFont.truetype('Pillow/Tests/fonts/FreeSansBold.ttf', 80)
    font_text = ImageFont.truetype('Pillow/Tests/fonts/FreeMono.ttf', 40)
    font = ImageFont.truetype('Pillow/Tests/fonts/FreeSansBold.ttf', 40)
    draw = ImageDraw.Draw(img)
    #    draw.text(
    #        text='Code-Maven',
    #        xy=(10, 30),
    #        fill=(0, 0, 0),
    #        font=font_title,
    #    )

    draw.text(
        text='Tips, ideas, tutorials',
        xy=(300, 10),
        fill=(0, 0, 0),
        font=font_text,
    )
    draw.text(
        text='about programming in Go',
        xy=(300, 70),
        fill=(0, 0, 0),
        font=font_text,
    )

    draw.text(
        text='as seen by Gábor Szabó',
        xy=(390, 130),
        fill=(0, 0, 0),
        font=font_text,
    )

    isize = 150
    embed_image(img=img,
                filename='gabor2_612x612.jpg',
                size=(isize, isize),
                box=(width - isize - 30, height - isize - 30))
    embed_image(img=img,
                filename='golang.png',
                size=(isize, isize),
                box=(160, height - isize - 30),
                mask=True)

    img.save(png_filepath)
    img.show()
def main():
    png_filename = os.path.splitext(os.path.basename(__file__))[0] + '.png'
    #print(png_filename)

    png_filepath = os.path.join(root, 'images', png_filename)
    #print(png_filepath)

    img = Image.new('RGB', (width, height), color=background_color)

    font_gabor = ImageFont.truetype('Pillow/Tests/fonts/FreeMono.ttf', 40)
    font_title = ImageFont.truetype('Pillow/Tests/fonts/FreeSansBold.ttf', 160)
    font = ImageFont.truetype('Pillow/Tests/fonts/FreeSansBold.ttf', 40)
    draw = ImageDraw.Draw(img)
    add_text(
        draw=draw,
        text="Getting started with Git",
        rtl=False,
        size=80,
        xy=(300, 30),
    )

    add_text(
        draw=draw,
        text="and GitHub",
        rtl=False,
        size=80,
        xy=(300, 200),
    )

    add_text(
        draw=draw,
        text="Olga Tapinova      Gábor Szabó",
        rtl=False,
        size=80,
        xy=(30, 420),
    )

    embed_image(img=img,
                filename='olga_tapinova.jpg',
                size=(200, 200),
                box=(10, 500))
    embed_image(img=img,
                filename='gabor2_612x612.jpg',
                size=(200, 200),
                box=(width - 200 - 10, 500))
    embed_image(img=img,
                filename='github-octocat.png',
                size=(200, 200),
                box=(10, 210),
                mask=True)
    embed_image(img=img,
                filename='git-logo-512x214.png',
                size=(200, 200),
                box=(10, 30),
                mask=True)

    img.save(png_filepath)
    img.show()
Beispiel #8
0
def create_thumbnail(episode, show=False):
    png_filename = os.path.splitext(
        os.path.basename(__file__))[0] + f'_{episode:02n}.png'
    #print(png_filename)

    png_filepath = os.path.join(root, 'images', 'python-functional',
                                png_filename)
    #print(png_filepath)

    img = Image.new('RGB', (width, height), color=background_color)

    font_gabor = ImageFont.truetype('Pillow/Tests/fonts/FreeMono.ttf', 40)
    font_title = ImageFont.truetype('Pillow/Tests/fonts/FreeSansBold.ttf', 160)
    font = ImageFont.truetype('Pillow/Tests/fonts/FreeSansBold.ttf', 40)
    draw = ImageDraw.Draw(img)
    add_text(
        draw=draw,
        text="Functional Programming",
        rtl=False,
        size=80,
        xy=(250, 30),
    )

    add_text(
        draw=draw,
        text=f"with Python  -  Part {episode}",
        rtl=False,
        size=80,
        xy=(250, 140),
    )

    isize = 350
    fsize = 200
    embed_image(img=img,
                filename='gabor2_612x612.jpg',
                size=(isize, isize),
                box=(width - isize - 10, height - isize - 10))
    #embed_image(img=img, filename='github-octocat.png', size=(isize, isize), box=(10, 400), mask=True)
    embed_image(img=img,
                filename='python.png',
                size=(isize, isize),
                box=(10, 10),
                mask=True)

    img.save(png_filepath)
    if show:
        img.show()
def main():
    png_filename = os.path.splitext(os.path.basename(__file__))[0] + '.png'
    png_filepath = os.path.join(root, 'images', png_filename)

    img = Image.new('RGB', (width, height), color=background_color)

    font_title = ImageFont.truetype('Pillow/Tests/fonts/FreeSansBold.ttf', 80)
    font_text = ImageFont.truetype('Pillow/Tests/fonts/FreeMono.ttf', 40)
    font = ImageFont.truetype('Pillow/Tests/fonts/FreeSansBold.ttf', 40)
    draw = ImageDraw.Draw(img)
    #    draw.text(
    #        text='Code-Maven',
    #        xy=(10, 30),
    #        fill=(0, 0, 0),
    #        font=font_title,
    #    )

    draw.text(
        text='Screencasts, interviews, articles',
        xy=(10, 10),
        fill=(0, 0, 0),
        font=font_text,
    )
    draw.text(
        text='about software development',
        xy=(250, 70),
        fill=(0, 0, 0),
        font=font_text,
    )

    draw.text(
        text='as seen by Gábor Szabó',
        xy=(390, 130),
        fill=(0, 0, 0),
        font=font_text,
    )

    isize = 150
    embed_image(img=img,
                filename='gabor2_612x612.jpg',
                size=(isize, isize),
                box=(width - isize - 30, height - isize - 30))

    img.save(png_filepath)
    img.show()
def main():
    png_filename = os.path.splitext(os.path.basename(__file__))[0] + '.png'
    #print(png_filename)

    png_filepath = os.path.join(root, 'images', png_filename)
    #print(png_filepath)

    img = Image.new('RGB', (width, height), color=background_color)

    # Code-Maven Workshop

    font_gabor = ImageFont.truetype('Pillow/Tests/fonts/FreeMono.ttf', 40)
    font_title = ImageFont.truetype('Pillow/Tests/fonts/FreeSansBold.ttf', 160)
    font = ImageFont.truetype('Pillow/Tests/fonts/FreeSansBold.ttf', 40)
    draw = ImageDraw.Draw(img)

    add_text(
        draw=draw,
        text="LinkedIn connections",
        rtl=False,
        xy=(10, 350),
        size=70,
    )

    add_text(
        draw=draw,
        text="קשרים בלינקדין",
        rtl=True,
        xy=(900, 500),
        size=70,
    )

    #    add_text(
    #        draw = draw,
    #        text = "איך משתמשים בסלאק?",
    #        rtl  = True,
    #        xy   = (1200, 130),
    #        size = 60,
    #    )

    isize = 200
    embed_image(img=img,
                filename='gabor2_612x612.jpg',
                size=(isize, isize),
                box=(width - isize - 10, height - isize - 10))
    #embed_image(img=img, filename='python.png', box=(10, 10), mask=True)
    embed_image(img=img,
                filename='LinkedIn-In.png',
                size=(300, 300),
                box=(10, 10),
                mask=True)
    embed_image(img=img,
                filename='danit-raanan.jpeg',
                box=(10, height - isize - 10))

    img.save(png_filepath)
    img.show()
def main():
    png_filename = os.path.splitext(os.path.basename(__file__))[0] + '.png'
    #print(png_filename)

    png_filepath = os.path.join(root, 'images', png_filename)
    #print(png_filepath)

    img = Image.new('RGB', (width, height), color=background_color)

    # Code-Maven Workshop

    font_gabor = ImageFont.truetype('Pillow/Tests/fonts/FreeMono.ttf', 40)
    font_title = ImageFont.truetype('Pillow/Tests/fonts/FreeSansBold.ttf', 160)
    font = ImageFont.truetype('Pillow/Tests/fonts/FreeSansBold.ttf', 40)
    draw = ImageDraw.Draw(img)

    add_text(
        draw = draw,
        text = "RT.CPAN.ORG is closing",
        rtl  = False,
        size = 80,
        xy   = (150, 170),
    )

    add_text(
        draw = draw,
        text = "Update your",
        rtl  = False,
        size = 80,
        xy   = (230, 320),
    )

    add_text(
        draw = draw,
        text = "META",
        rtl  = False,
        size = 80,
        xy   = (230, 450),
    )


    add_text(
        draw = draw,
        text = "data",
        rtl  = False,
        size = 80,
        xy   = (230, 580),
    )


    isize = 350
    embed_image(img=img, filename='gabor2_612x612.jpg', size=(isize, isize), box=(width-isize-10, height-isize-10))
    embed_image(img=img, filename='cpan.png', box=(10, 10), mask=False)
    embed_image(img=img, filename='metacpan.jpg', box=(10, 410), mask=False)

    img.save(png_filepath)
    img.show()
def main():
    png_filename = os.path.splitext(os.path.basename(__file__))[0] + '.png'
    #print(png_filename)

    png_filepath = os.path.join(root, 'images', png_filename)
    #print(png_filepath)

    img = Image.new('RGB', (width, height), color=background_color)

    font_gabor = ImageFont.truetype('Pillow/Tests/fonts/FreeMono.ttf', 40)
    font_title = ImageFont.truetype('Pillow/Tests/fonts/FreeSansBold.ttf', 160)
    font = ImageFont.truetype('Pillow/Tests/fonts/FreeSansBold.ttf', 40)
    draw = ImageDraw.Draw(img)
    add_text(
        draw=draw,
        text="Docker, Docker Compose",
        rtl=False,
        size=80,
        xy=(250, 30),
    )

    add_text(
        draw=draw,
        text="GitHub Actions",
        rtl=False,
        size=80,
        xy=(250, 200),
    )

    add_text(
        draw=draw,
        text="Thomas Klausner    Gábor Szabó",
        rtl=False,
        size=80,
        xy=(10, 420),
    )

    embed_image(img=img,
                filename='thomas-klausner.png',
                size=(200, 200),
                box=(10, 500))
    embed_image(img=img,
                filename='gabor2_612x612.jpg',
                size=(200, 200),
                box=(width - 200 - 10, 500))
    embed_image(img=img,
                filename='docker-moby-logo.png',
                size=(200, 200),
                box=(10, 10),
                mask=True)

    img.save(png_filepath)
    img.show()
Beispiel #13
0
def main():
    png_filename = os.path.splitext(os.path.basename(__file__))[0] + '.png'
    #print(png_filename)

    png_filepath = os.path.join(root, 'images', png_filename)
    #print(png_filepath)

    img = Image.new('RGB', (width, height), color=background_color)

    font_gabor = ImageFont.truetype('Pillow/Tests/fonts/FreeMono.ttf', 40)
    font_title = ImageFont.truetype('Pillow/Tests/fonts/FreeSansBold.ttf', 160)
    font = ImageFont.truetype('Pillow/Tests/fonts/FreeSansBold.ttf', 40)
    draw = ImageDraw.Draw(img)
    add_text(
        draw=draw,
        text="Crear una página de",
        rtl=False,
        size=80,
        xy=(250, 30),
    )

    add_text(
        draw=draw,
        text="GitHub",
        rtl=False,
        size=80,
        xy=(250, 200),
    )

    add_text(
        draw=draw,
        text="Laia Asensio López                Gábor Szabó",
        rtl=False,
        size=60,
        xy=(30, 420),
    )

    embed_image(img=img, filename='laia.jpeg', size=(200, 200), box=(10, 500))
    embed_image(img=img,
                filename='gabor2_612x612.jpg',
                size=(200, 200),
                box=(width - 200 - 10, 500))
    embed_image(img=img,
                filename='github-octocat.png',
                size=(200, 200),
                box=(10, 10),
                mask=True)

    img.save(png_filepath)
    img.show()
Beispiel #14
0
def main():
    png_filename = os.path.splitext(os.path.basename(__file__))[0] + '.png'
    #print(png_filename)

    png_filepath = os.path.join(root, 'images', png_filename)
    #print(png_filepath)

    img = Image.new('RGB', (width, height), color=background_color)

    font_gabor = ImageFont.truetype('Pillow/Tests/fonts/FreeMono.ttf', 40)
    font_title = ImageFont.truetype('Pillow/Tests/fonts/FreeSansBold.ttf', 160)
    font = ImageFont.truetype('Pillow/Tests/fonts/FreeSansBold.ttf', 40)
    draw = ImageDraw.Draw(img)
    add_text(
        draw=draw,
        text="Command line accounting",
        rtl=False,
        size=80,
        xy=(250, 30),
    )

    add_text(
        draw=draw,
        text="project using Python",
        rtl=False,
        size=80,
        xy=(250, 200),
    )

    add_text(
        draw=draw,
        text="Olga Tapinova      Gábor Szabó",
        rtl=False,
        size=80,
        xy=(30, 420),
    )

    embed_image(img=img,
                filename='olga_tapinova.jpg',
                size=(200, 200),
                box=(10, 500))
    embed_image(img=img,
                filename='gabor2_612x612.jpg',
                size=(200, 200),
                box=(width - 200 - 10, 500))
    embed_image(img=img, filename='python.png', box=(10, 10), mask=True)

    img.save(png_filepath)
    img.show()
Beispiel #15
0
def main():
    png_filename = os.path.splitext(os.path.basename(__file__))[0] + '.png'
    #print(png_filename)

    png_filepath = os.path.join(root, 'images', png_filename)
    #print(png_filepath)

    img = Image.new('RGB', (width, height), color=background_color)

    # Code-Maven Workshop

    font_gabor = ImageFont.truetype('Pillow/Tests/fonts/FreeMono.ttf', 40)
    font_title = ImageFont.truetype('Pillow/Tests/fonts/FreeSansBold.ttf', 160)
    font = ImageFont.truetype('Pillow/Tests/fonts/FreeSansBold.ttf', 40)
    draw = ImageDraw.Draw(img)
    add_text(
        draw=draw,
        text="Hello World",
        rtl=False,
        size=80,
        xy=(450, 30),
    )

    add_text(
        draw=draw,
        text="using Mojolicious",
        rtl=False,
        size=80,
        xy=(450, 240),
    )

    add_text(
        draw=draw,
        text="in Docker",
        rtl=False,
        size=80,
        xy=(450, 440),
    )

    isize = 350
    embed_image(img=img,
                filename='gabor2_612x612.jpg',
                size=(isize, isize),
                box=(width - isize - 10, height - isize - 10))
    embed_image(img=img, filename='mojolicious.png', box=(10, 10), mask=True)
    embed_image(img=img, filename='docker.png', box=(10, 400), mask=True)

    img.save(png_filepath)
    img.show()
Beispiel #16
0
def main():
    png_filename = os.path.splitext(os.path.basename(__file__))[0] + '.png'
    #print(png_filename)

    png_filepath = os.path.join(root, 'images', png_filename)
    #print(png_filepath)

    img = Image.new('RGB', (width, height), color=background_color)

    font_gabor = ImageFont.truetype('Pillow/Tests/fonts/FreeMono.ttf', 40)
    font_title = ImageFont.truetype('Pillow/Tests/fonts/FreeSansBold.ttf', 160)
    font = ImageFont.truetype('Pillow/Tests/fonts/FreeSansBold.ttf', 40)
    draw = ImageDraw.Draw(img)
    add_text(
        draw = draw,
        text = "Live web development",
        rtl  = False,
        size = 80,
        xy   = (350, 30),
    )

    add_text(
        draw = draw,
        text = "part 7",
        rtl  = False,
        size = 80,
        xy   = (350, 200),
    )


    add_text(
        draw = draw,
        text = "Mark Gardner          Gábor Szabó",
        rtl  = False,
        size = 80,
        xy   = (10, 420),
    )

    embed_image(img=img, filename='mark_gardner.png',   size=(200, 200), box=(10, 500))
    embed_image(img=img, filename='gabor2_612x612.jpg', size=(200, 200), box=(width-200-10, 500))
    embed_image(img=img, filename='mojolicious.png', box=(10, 10), mask=True)

    img.save(png_filepath)
    img.show()
def main():
    png_filename = os.path.splitext(os.path.basename(__file__))[0] + '.png'
    #print(png_filename)

    png_filepath = os.path.join(root, 'images', png_filename)
    #print(png_filepath)

    img = Image.new('RGB', (width, height), color=background_color)

    # Code-Maven Workshop

    font_gabor = ImageFont.truetype('Pillow/Tests/fonts/FreeMono.ttf', 40)
    font_title = ImageFont.truetype('Pillow/Tests/fonts/FreeSansBold.ttf', 160)
    font = ImageFont.truetype('Pillow/Tests/fonts/FreeSansBold.ttf', 40)
    draw = ImageDraw.Draw(img)
    add_text(
        draw=draw,
        text="MetaCPAN recent",
        rtl=False,
        size=80,
        xy=(250, 30),
    )

    add_text(
        draw=draw,
        text="Perl Weekly Stats",
        rtl=False,
        size=80,
        xy=(250, 220),
    )

    add_text(
        draw=draw,
        text="Link to VCS",
        rtl=False,
        size=80,
        xy=(250, 400),
    )

    add_text(
        draw=draw,
        text="CI enabled",
        rtl=False,
        size=80,
        xy=(250, 580),
    )

    #add_text(
    #    draw = draw,
    #    text = "14 minutes",
    #    rtl  = False,
    #    size = 60,
    #    xy   = (250, 540),
    #)

    isize = 350
    embed_image(img=img,
                filename='gabor2_612x612.jpg',
                size=(isize, isize),
                box=(width - isize - 10, height - isize - 10))
    embed_image(img=img, filename='metacpan.jpg', box=(10, 10), mask=False)

    img.save(png_filepath)
    img.show()
Beispiel #18
0
def main():
    png_filename = os.path.splitext(os.path.basename(__file__))[0] + '.png'
    #print(png_filename)

    png_filepath = os.path.join(root, 'images', png_filename)
    #print(png_filepath)

    img = Image.new('RGB', (width, height), color=background_color)

    font_gabor = ImageFont.truetype('Pillow/Tests/fonts/FreeMono.ttf', 40)
    font_title = ImageFont.truetype('Pillow/Tests/fonts/FreeSansBold.ttf', 160)
    font = ImageFont.truetype('Pillow/Tests/fonts/FreeSansBold.ttf', 40)
    draw = ImageDraw.Draw(img)
    add_text(
        draw=draw,
        text="Continuous Integration (CI)",
        rtl=False,
        size=80,
        xy=(150, 30),
    )

    add_text(
        draw=draw,
        text="with GitHub Actions",
        rtl=False,
        size=80,
        xy=(150, 140),
    )

    add_text(
        draw=draw,
        text="in Hebrew",
        rtl=False,
        size=80,
        xy=(150, 280),
    )

    add_text(
        draw=draw,
        text="בעברית",
        rtl=True,
        size=80,
        xy=(950, 280),
    )

    isize = 350
    fsize = 200
    embed_image(img=img,
                filename='gabor2_612x612.jpg',
                size=(isize, isize),
                box=(width - isize - 10, height - isize - 10))
    embed_image(img=img,
                filename='github-octocat.png',
                size=(isize, isize),
                box=(10, 400),
                mask=True)
    embed_image(img=img,
                filename='israel-flag-small.png',
                size=(fsize, fsize),
                box=(width - fsize - 10, height - isize - fsize + 30),
                mask=False)

    img.save(png_filepath)
    img.show()
def create_thumbnail(episode, show=False):
    png_filename = os.path.splitext(
        os.path.basename(__file__))[0] + f'_{episode:02n}.png'
    #print(png_filename)

    png_filepath = os.path.join(root, 'images', png_filename)
    #print(png_filepath)

    img = Image.new('RGB', (width, height), color=background_color)

    font_gabor = ImageFont.truetype('Pillow/Tests/fonts/FreeMono.ttf', 40)
    font_title = ImageFont.truetype('Pillow/Tests/fonts/FreeSansBold.ttf', 160)
    font = ImageFont.truetype('Pillow/Tests/fonts/FreeSansBold.ttf', 40)
    draw = ImageDraw.Draw(img)
    add_text(
        draw=draw,
        text="Jupyter Notebook",
        rtl=False,
        size=80,
        xy=(300, 30),
    )

    add_text(
        draw=draw,
        text=f"יופיטר נוטבוק",
        rtl=True,
        size=80,
        xy=(1000, 240),
    )

    #    add_text(
    #        draw = draw,
    #        text = "OOP in Python",
    #        rtl  = False,
    #        size = 80,
    #        xy   = (50, 450),
    #    )

    #    add_text(
    #        draw = draw,
    #        text = f"Part {episode}",
    #        rtl  = False,
    #        size = 80,
    #        xy   = (50, 560),
    #    )

    add_text(
        draw=draw,
        text="גאבור סבו",
        rtl=True,
        size=80,
        xy=(850, 560),
    )

    isize = 350
    fsize = 200
    embed_image(img=img,
                filename='gabor2_612x612.jpg',
                size=(isize, isize),
                box=(width - isize - 10, height - isize - 10))
    #embed_image(img=img, filename='github-octocat.png', size=(isize, isize), box=(10, 400), mask=True)
    embed_image(img=img,
                filename='python.png',
                size=(isize, isize),
                box=(10, 10),
                mask=True)

    img.save(png_filepath)
    if show:
        img.show()
Beispiel #20
0
def main():
    png_filename = os.path.splitext(os.path.basename(__file__))[0] + '.png'
    #print(png_filename)

    png_filepath = os.path.join(root, 'images', png_filename)
    #print(png_filepath)

    img = Image.new('RGB', (width, height), color=background_color)

    # Code-Maven Workshop

    font_text = ImageFont.truetype('Pillow/Tests/fonts/FreeMono.ttf', 40)
    font_gabor = ImageFont.truetype('Pillow/Tests/fonts/FreeMono.ttf', 40)
    font_title = ImageFont.truetype('Pillow/Tests/fonts/FreeSansBold.ttf', 60)
    font_title2 = ImageFont.truetype('Pillow/Tests/fonts/FreeSansBold.ttf', 55)
    font_subtitle = ImageFont.truetype('Pillow/Tests/fonts/FreeSansBold.ttf',
                                       40)
    font = ImageFont.truetype('Pillow/Tests/fonts/FreeSansBold.ttf', 40)
    draw = ImageDraw.Draw(img)

    add_text(
        draw=draw,
        text="עבודה בקוואלקום, ישראל?",
        rtl=True,
        xy=(990, 30),
        size=60,
    )

    add_text(
        draw=draw,
        text="שיחה עם עומר מרגלית",
        rtl=True,
        xy=(990, 160),
        size=60,
    )

    add_text(
        draw=draw,
        text="מגייסת בכירה ומרכזת תחום הגיוס",
        rtl=True,
        xy=(990, 290),
        size=60,
    )

    add_date(
        date_right=730,
        date_top=images_top,
        font=font,
        draw=draw,
        date="03.09.2020",
        day=heb("יום ה"),
        hours="09:00-10:00",
    )

    add_text(
        draw=draw,
        text="מארח",
        rtl=True,
        xy=(width - isize - 20, images_top),
        size=30,
    )

    add_text(
        draw=draw,
        text="גאבור סבו",
        rtl=True,
        xy=(width - isize - 20, images_top + 50),
        size=30,
    )

    add_text(
        draw=draw,
        text="אורחת",
        rtl=True,
        xy=(395, images_top),
        size=30,
    )

    add_text(
        draw=draw,
        text="עומר מרגלית",
        rtl=True,
        xy=(395, images_top + 50),
        size=30,
    )

    embed_image(img=img,
                filename='gabor2_612x612.jpg',
                size=(isize, isize),
                box=(width - isize - 10, height - isize - 10))
    embed_image(img=img,
                filename='code_maven_440x440.png',
                size=(isize, isize),
                box=(width - isize - 10, 20),
                mask=True)
    embed_image(img=img,
                filename='qualcomm_q.png',
                size=(isize, isize),
                box=(10, 20),
                mask=False)
    embed_image(img=img,
                filename='omer-margalit.jpeg',
                size=(isize, isize),
                box=(10, height - isize - 10))

    img.save(png_filepath)
    img.show()
def main():
    png_filename = os.path.splitext(os.path.basename(__file__))[0] + '.png'
    #print(png_filename)

    png_filepath = os.path.join(root, 'images', png_filename)
    #print(png_filepath)

    img = Image.new('RGB', (width, height), color=background_color)

    # Code-Maven Workshop

    font_text = ImageFont.truetype('Pillow/Tests/fonts/FreeMono.ttf', 40)
    font_gabor = ImageFont.truetype('Pillow/Tests/fonts/FreeMono.ttf', 40)
    font_title = ImageFont.truetype('Pillow/Tests/fonts/FreeSansBold.ttf', 60)
    font_title2 = ImageFont.truetype('Pillow/Tests/fonts/FreeSansBold.ttf', 55)
    font_subtitle = ImageFont.truetype('Pillow/Tests/fonts/FreeSansBold.ttf',
                                       40)
    font = ImageFont.truetype('Pillow/Tests/fonts/FreeSansBold.ttf', 40)
    draw = ImageDraw.Draw(img)
    #draw.text(
    #    text="Storemaven - Code-Maven",
    #    xy=(230, 30),
    #    fill=(0, 0, 0),
    #    font=font_title,
    #)

    add_text(
        draw=draw,
        text="היי-טק בלי משרדים",
        rtl=True,
        xy=(950, 30),
        size=60,
    )

    add_text(
        draw=draw,
        text="שיחה עם אורית גולובינסקי",
        rtl=True,
        xy=(950, 160),
        size=60,
    )

    add_text(
        draw=draw,
        text="מנהלת מוצר בכירה בגיטלאב",
        rtl=True,
        xy=(950, 290),
        size=60,
    )

    #add_text(
    #    draw = draw,
    #    text = "C-Level",
    #    rtl  = False,
    #    xy   = (110, 290),
    #    size = 60,
    #)

    add_date(
        date_right=730,
        date_top=images_top,
        font=font,
        draw=draw,
        date="08.07.2020",
        day=heb("יום ד"),
        hours="09:00-10:00",
    )

    add_text(
        draw=draw,
        text="מארח",
        rtl=True,
        xy=(width - isize - 20, images_top),
        size=30,
    )

    add_text(
        draw=draw,
        text="גאבור סבו",
        rtl=True,
        xy=(width - isize - 20, images_top + 50),
        size=30,
    )

    add_text(
        draw=draw,
        text="אורחת",
        rtl=True,
        xy=(450, images_top),
        size=30,
    )

    add_text(
        draw=draw,
        text="אורית גולובינסקי",
        rtl=True,
        xy=(450, images_top + 50),
        size=30,
    )

    embed_image(img=img,
                filename='gabor2_612x612.jpg',
                size=(isize, isize),
                box=(width - isize - 10, height - isize - 10))
    embed_image(img=img,
                filename='code_maven_440x440.png',
                size=(isize, isize),
                box=(width - isize - 10, 20),
                mask=True)
    embed_image(img=img,
                filename='gitlab.jpg',
                size=(isize, isize),
                box=(10, 20),
                mask=False)
    embed_image(img=img,
                filename='orit-golowinski.jpeg',
                size=(isize, isize),
                box=(10, height - isize - 10))

    img.save(png_filepath)
    img.show()
Beispiel #22
0
def main():
    png_filename = os.path.splitext(os.path.basename(__file__))[0] + '.png'
    png_filepath = os.path.join(root, 'images', png_filename)

    img = Image.new('RGB', (width, height), color=background_color)

    font_title = ImageFont.truetype('Pillow/Tests/fonts/FreeSansBold.ttf', 80)
    font_text = ImageFont.truetype('Pillow/Tests/fonts/FreeMono.ttf', 40)
    font = ImageFont.truetype('Pillow/Tests/fonts/FreeSansBold.ttf', 40)
    draw = ImageDraw.Draw(img)

    add_text(
        draw=draw,
        text='Code       Maven',
        rtl=False,
        xy=('center', 30),
        size=60,
    )
    add_text(
        draw=draw,
        #text = 'screencasts, blog posts, code-snippets',
        text='Helping developers create better software',
        rtl=False,
        xy=('center', 120),
        size=40,
    )

    add_text(
        draw=draw,
        text='Test Automation - Continuous Integration - DevOps',
        rtl=False,
        xy=('center', 200),
        size=40,
    )

    isize = 150
    embed_image(img=img,
                filename='code_maven_440x440.png',
                size=(70, 70),
                box=(745, 23),
                mask=True)
    embed_image(img=img,
                filename='perl.png',
                size=(isize, isize),
                box=(30, 30),
                mask=True)
    embed_image(img=img,
                filename='tessa.png',
                size=(isize, isize),
                box=(width - isize - 30, 30),
                mask=True)
    #embed_image(img=img, filename='golang.png', size=(isize, isize), box=(width-isize-30, 30), mask=True)
    embed_image(img=img,
                filename='tux.png',
                size=(isize, isize),
                box=(width - isize - 30, height - isize - 30),
                mask=True)
    embed_image(img=img,
                filename='docker-moby-logo.png',
                size=(isize, isize),
                box=(30, height - isize - 30),
                mask=True)

    img.save(png_filepath)
    img.show()
Beispiel #23
0
def main():
    png_filename = os.path.splitext(os.path.basename(__file__))[0] + '.png'
    #print(png_filename)

    png_filepath = os.path.join(root, 'images', png_filename)
    #print(png_filepath)

    img = Image.new('RGB', (width, height), color=background_color)

    # Code-Maven Workshop

    font_gabor = ImageFont.truetype('Pillow/Tests/fonts/FreeMono.ttf', 40)
    font_title = ImageFont.truetype('Pillow/Tests/fonts/FreeSansBold.ttf', 160)
    font = ImageFont.truetype('Pillow/Tests/fonts/FreeSansBold.ttf', 40)
    draw = ImageDraw.Draw(img)
    add_text(
        draw=draw,
        text="Your First Contribution",
        rtl=False,
        size=80,
        xy=(250, 30),
    )

    add_text(
        draw=draw,
        text="to an Open Source",
        rtl=False,
        size=60,
        xy=(250, 140),
    )

    add_text(
        draw=draw,
        text="Python project",
        rtl=False,
        size=80,
        xy=(250, 240),
    )

    add_text(
        draw=draw,
        text="in less than",
        rtl=False,
        size=60,
        xy=(250, 440),
    )

    add_text(
        draw=draw,
        text="14 minutes",
        rtl=False,
        size=60,
        xy=(250, 540),
    )

    isize = 350
    embed_image(img=img,
                filename='gabor2_612x612.jpg',
                size=(isize, isize),
                box=(width - isize - 10, height - isize - 10))
    embed_image(img=img, filename='python.png', box=(10, 10), mask=True)

    img.save(png_filepath)
    img.show()
Beispiel #24
0
def create_thumbnail(episode, show=False):
    png_filename = os.path.splitext(
        os.path.basename(__file__))[0] + f'_{episode:02n}.png'
    #print(png_filename)

    png_filepath = os.path.join(root, 'images', 'bootcamp', png_filename)
    #print(png_filepath)

    img = Image.new('RGB', (width, height), color=background_color)

    font_gabor = ImageFont.truetype('Pillow/Tests/fonts/FreeMono.ttf', 40)
    font_title = ImageFont.truetype('Pillow/Tests/fonts/FreeSansBold.ttf', 160)
    font = ImageFont.truetype('Pillow/Tests/fonts/FreeSansBold.ttf', 40)
    draw = ImageDraw.Draw(img)
    add_text(
        draw=draw,
        text="Programming Bootcamp",
        rtl=False,
        size=80,
        xy=(50, 30),
    )

    add_text(
        draw=draw,
        text=f"for Scientists  -  Part {episode}",
        rtl=False,
        size=80,
        xy=(50, 140),
    )

    #    add_text(
    #        draw = draw,
    #        text = "An introduction to Python",
    #        rtl  = False,
    #        size = 80,
    #        xy   = (100, 250),
    #    )

    add_text(
        draw=draw,
        text=f"An introduction to",
        rtl=False,
        size=80,
        xy=(50, 450),
    )

    add_text(
        draw=draw,
        text="Python",
        rtl=False,
        size=80,
        xy=(50, 560),
    )

    isize = 350
    fsize = 200
    embed_image(img=img,
                filename='gabor2_612x612.jpg',
                size=(isize, isize),
                box=(width - isize - 10, height - isize - 10))
    #embed_image(img=img, filename='github-octocat.png', size=(isize, isize), box=(10, 400), mask=True)
    #embed_image(img=img, filename='covid-19.jpg', size=(isize, isize), box=(10, 10), mask=False)

    img.save(png_filepath)
    if show:
        img.show()
def main():
    png_filename = os.path.splitext(os.path.basename(__file__))[0] + '.png'
    #print(png_filename)

    png_filepath = os.path.join(root, 'images', png_filename)
    #print(png_filepath)

    img = Image.new('RGB', (width, height), color=background_color)

    font_gabor = ImageFont.truetype('Pillow/Tests/fonts/FreeMono.ttf', 40)
    font_title = ImageFont.truetype('Pillow/Tests/fonts/FreeSansBold.ttf', 160)
    font = ImageFont.truetype('Pillow/Tests/fonts/FreeSansBold.ttf', 40)
    draw = ImageDraw.Draw(img)
    add_text(
        draw = draw,
        text = "Web application testing",
        rtl  = False,
        size = 70,
        xy   = (240, 30),
    )

    add_text(
        draw = draw,
        text = "with",
        rtl  = False,
        size = 70,
        xy   = (540, 180),
    )


    add_text(
        draw = draw,
        text = "Selenium and Python",
        rtl  = False,
        size = 80,
        xy   = (240, 330),
    )
#
#    add_text(
#        draw = draw,
#        text = "and Gábor Szabó",
#        rtl  = False,
#        size = 80,
#        xy   = (50, 540),
#    )

    #add_text(
    #    draw = draw,
    #    text = "in less than",
    #    rtl  = False,
    #    size = 60,
    #    xy   = (250, 440),
    #)

    #add_text(
    #    draw = draw,
    #    text = "14 minutes",
    #    rtl  = False,
    #    size = 60,
    #    xy   = (250, 540),
    #)


    embed_image(img=img, filename='selenium-green.png', size=(200, 208), box=(10, 10))
    embed_image(img=img, filename='python.png',         size=(200, 200), box=(width-200-10, 10), mask=True)
    embed_image(img=img, filename='ynon_perek.jpeg',    size=(200, 200), box=(10, 500))
    embed_image(img=img, filename='gabor2_612x612.jpg', size=(200, 200), box=(width-200-10, 500))

    img.save(png_filepath)
    img.show()
def main():
    png_filename = os.path.splitext(os.path.basename(__file__))[0] + '.png'
    #print(png_filename)

    png_filepath = os.path.join(root, 'images', png_filename)
    #print(png_filepath)

    img = Image.new('RGB', (width, height), color=background_color)

    font_gabor = ImageFont.truetype('Pillow/Tests/fonts/FreeMono.ttf', 40)
    font_title = ImageFont.truetype('Pillow/Tests/fonts/FreeSansBold.ttf', 160)
    font = ImageFont.truetype('Pillow/Tests/fonts/FreeSansBold.ttf', 40)
    draw = ImageDraw.Draw(img)
    add_text(
        draw=draw,
        text="Python s3path, the pathlib",
        rtl=False,
        size=80,
        xy=(200, 30),
    )

    add_text(
        draw=draw,
        text="extension for AWS S3",
        rtl=False,
        size=80,
        xy=(200, 200),
    )

    add_text(
        draw=draw,
        text="Lior Mizrahi              Gábor Szabó",
        rtl=False,
        size=80,
        xy=(10, 420),
    )
    #
    #    add_text(
    #        draw = draw,
    #        text = "and Gábor Szabó",
    #        rtl  = False,
    #        size = 80,
    #        xy   = (50, 540),
    #    )

    #add_text(
    #    draw = draw,
    #    text = "in less than",
    #    rtl  = False,
    #    size = 60,
    #    xy   = (250, 440),
    #)

    #add_text(
    #    draw = draw,
    #    text = "14 minutes",
    #    rtl  = False,
    #    size = 60,
    #    xy   = (250, 540),
    #)

    embed_image(img=img,
                filename='lior_mizrahi.jpeg',
                size=(200, 200),
                box=(10, 500))
    embed_image(img=img,
                filename='gabor2_612x612.jpg',
                size=(200, 200),
                box=(width - 200 - 10, 500))
    embed_image(img=img, filename='python.png', box=(10, 10), mask=True)

    img.save(png_filepath)
    img.show()
Beispiel #27
0
def main():
    png_filename = os.path.splitext(os.path.basename(__file__))[0] + '.png'
    #print(png_filename)

    png_filepath = os.path.join(root, 'images', png_filename)
    #print(png_filepath)

    img = Image.new('RGB', (width, height), color=background_color)

    font_gabor = ImageFont.truetype('Pillow/Tests/fonts/FreeMono.ttf', 40)
    font_title = ImageFont.truetype('Pillow/Tests/fonts/FreeSansBold.ttf', 160)
    font = ImageFont.truetype('Pillow/Tests/fonts/FreeSansBold.ttf', 40)
    draw = ImageDraw.Draw(img)
    add_text(
        draw=draw,
        text="Last chance in 2020 to set up CI/CD",
        rtl=False,
        size=70,
        xy=(50, 30),
    )

    add_text(
        draw=draw,
        text="Jenkins",
        rtl=False,
        size=70,
        xy=(250, 170),
    )

    add_text(
        draw=draw,
        text="GitHub Actions",
        rtl=False,
        size=70,
        xy=(250, 320),
    )

    add_text(
        draw=draw,
        text="GitLab Pipelines",
        rtl=False,
        size=70,
        xy=(250, 420),
    )

    add_text(
        draw=draw,
        text="Travis-CI",
        rtl=False,
        size=70,
        xy=(250, 580),
    )

    #add_text(
    #    draw = draw,
    #    text = "in less than",
    #    rtl  = False,
    #    size = 60,
    #    xy   = (250, 440),
    #)

    #add_text(
    #    draw = draw,
    #    text = "14 minutes",
    #    rtl  = False,
    #    size = 60,
    #    xy   = (250, 540),
    #)

    isize = 350
    embed_image(img=img,
                filename='gabor2_612x612.jpg',
                size=(isize, isize),
                box=(width - isize - 10, height - isize - 10))
    embed_image(img=img, filename='jenkins_256.png', box=(10, 100), mask=True)
    embed_image(img=img,
                filename='tessa.png',
                box=(10, height - 260),
                mask=True)

    img.save(png_filepath)
    img.show()
Beispiel #28
0
def main():
    png_filename = os.path.splitext(os.path.basename(__file__))[0] + '.png'
    #print(png_filename)

    png_filepath = os.path.join(root, 'images', png_filename)
    #print(png_filepath)

    img = Image.new('RGB', (width, height), color=background_color)

    # Code-Maven Workshop

    font_text = ImageFont.truetype('Pillow/Tests/fonts/FreeMono.ttf', 40)
    font_gabor = ImageFont.truetype('Pillow/Tests/fonts/FreeMono.ttf', 40)
    font_title = ImageFont.truetype('Pillow/Tests/fonts/FreeSansBold.ttf', 60)
    font_title2 = ImageFont.truetype('Pillow/Tests/fonts/FreeSansBold.ttf', 55)
    font_subtitle = ImageFont.truetype('Pillow/Tests/fonts/FreeSansBold.ttf', 40)
    font = ImageFont.truetype('Pillow/Tests/fonts/FreeSansBold.ttf', 40)
    draw = ImageDraw.Draw(img)

    add_text(
        draw = draw,
        text = "Learn Automation using",
        rtl  = False,
        xy   = (220, 30),
        size = 60,
    )

    add_text(
        draw = draw,
        text = "(R)?ex",
        rtl  = False,
        xy   = (220, 160),
        size = 60,
    )

    add_text(
        draw = draw,
        text = "With Ferenc Erki, the maintainer of Rex",
        rtl  = False,
        xy   = (20, 300),
        size = 60,
    )

#    add_text(
#        draw = draw,
#        text = "author of Rex",
#        rtl  = False,
#        xy   = (60, 350),
#        size = 60,
#    )


    add_date(
        date_right = 690,
        date_top   = images_top,
        font       = font,
        draw       = draw,
        date       = "2021.03.08",
        day        = "Monday",
        hours      = "",
    )

    add_text(
        draw = draw,
        text = "Ferenc Erki",
        rtl  = False,
        xy   = (220, images_top + 50),
        size = 30,
    )


#    add_text(
#        draw = draw,
#        text = "מרצה",
#        rtl  = True,
#        xy   = (width - isize - 20, images_top),
#        size = 30,
#    )
#
    add_text(
        draw = draw,
        text = "Gabor Szabo",
        rtl  = False,
        xy   = (800, images_top + 50),
        size = 30,
    )

    embed_image(img=img, filename='rex.png', box=(10, 10), mask=True)
    embed_image(img=img, filename='ferenc_erki.jpeg', size=(isize, isize), box=(10, height-isize-10))
    embed_image(img=img, filename='gabor2_612x612.jpg', size=(isize, isize), box=(width-isize-10, height-isize-10))
    embed_image(img=img, filename='code_maven_440x440.png', size=(isize, isize), box=(width-isize-10, 20), mask=True)
    #embed_image(img=img, filename='python.png', size=(isize, isize), box=(10, height-isize-10), mask=True)
    #embed_image(img=img, filename='gitlab.jpg', size=(isize, isize), box=(10, 20), mask=False)
    #embed_image(img=img, filename='docker.png', size=(isize, isize), box=(10, height-isize-10), mask=True)

    img.save(png_filepath)
    img.show()
Beispiel #29
0
def main():
    png_filename = os.path.splitext(os.path.basename(__file__))[0] + '.png'
    #print(png_filename)

    png_filepath = os.path.join(root, 'images', png_filename)
    #print(png_filepath)

    img = Image.new('RGB', (width, height), color=background_color)

    # Code-Maven Workshop

    font_text = ImageFont.truetype('Pillow/Tests/fonts/FreeMono.ttf', 40)
    font_gabor = ImageFont.truetype('Pillow/Tests/fonts/FreeMono.ttf', 40)
    font_title = ImageFont.truetype('Pillow/Tests/fonts/FreeSansBold.ttf', 60)
    font_title2 = ImageFont.truetype('Pillow/Tests/fonts/FreeSansBold.ttf', 55)
    font_subtitle = ImageFont.truetype('Pillow/Tests/fonts/FreeSansBold.ttf',
                                       40)
    font = ImageFont.truetype('Pillow/Tests/fonts/FreeSansBold.ttf', 40)
    draw = ImageDraw.Draw(img)
    #draw.text(
    #    text="Storemaven - Code-Maven",
    #    xy=(230, 30),
    #    fill=(0, 0, 0),
    #    font=font_title,
    #)

    add_text(
        draw=draw,
        text="תכנות פייתון ביופיטר נוטבוק",
        rtl=True,
        xy=(820, 30),
        size=60,
    )

    add_text(
        draw=draw,
        text="Python with Jupyter Notebook",
        rtl=False,
        xy=(40, 160),
        size=60,
    )

    #add_text(
    #    draw = draw,
    #    text = "in Docker",
    #    rtl  = False,
    #    xy   = (270, 290),
    #    size = 60,
    #)

    add_text(
        draw=draw,
        text="(in Hebrew)",
        rtl=False,
        xy=(220, 290),
        size=40,
    )

    add_date(
        date_right=630,
        date_top=images_top,
        font=font,
        draw=draw,
        date="28.04.2021",
        day=heb("יום ד"),
        hours="09:00-11:00",
    )

    add_text(
        draw=draw,
        text="מרצה",
        rtl=True,
        xy=(width - isize - 20, images_top),
        size=30,
    )

    add_text(
        draw=draw,
        text="גאבור סבו",
        rtl=True,
        xy=(width - isize - 20, images_top + 50),
        size=30,
    )

    embed_image(img=img,
                filename='gabor2_612x612.jpg',
                size=(isize, isize),
                box=(width - isize - 10, height - isize - 10))
    embed_image(img=img,
                filename='code_maven_440x440.png',
                size=(isize, isize),
                box=(width - isize - 10, 20),
                mask=True)
    embed_image(img=img,
                filename='python.png',
                size=(isize, isize),
                box=(10, height - isize - 10),
                mask=True)
    #embed_image(img=img, filename='gitlab.jpg', size=(isize, isize), box=(10, 20), mask=False)
    #embed_image(img=img, filename='docker.png', size=(isize, isize), box=(10, height-isize-10), mask=True)

    img.save(png_filepath)
    img.show()
Beispiel #30
0
def main():
    png_filename = os.path.splitext(os.path.basename(__file__))[0] + '.png'
    #print(png_filename)

    png_filepath = os.path.join(root, 'images', png_filename)
    #print(png_filepath)

    img = Image.new('RGB', (width, height), color=background_color)

    font_gabor = ImageFont.truetype('Pillow/Tests/fonts/FreeMono.ttf', 40)
    font_title = ImageFont.truetype('Pillow/Tests/fonts/FreeSansBold.ttf', 160)
    font = ImageFont.truetype('Pillow/Tests/fonts/FreeSansBold.ttf', 40)
    draw = ImageDraw.Draw(img)
    add_text(
        draw=draw,
        text="Workout application",
        rtl=False,
        size=80,
        xy=(230, 30),
    )

    add_text(
        draw=draw,
        text="Back-end: Python - part 2",
        rtl=False,
        size=80,
        xy=(230, 200),
    )

    add_text(
        draw=draw,
        text="Rachel Normand    Gábor Szabó",
        rtl=False,
        size=80,
        xy=(20, 420),
    )
    #
    #    add_text(
    #        draw = draw,
    #        text = "and Gábor Szabó",
    #        rtl  = False,
    #        size = 80,
    #        xy   = (50, 540),
    #    )

    #add_text(
    #    draw = draw,
    #    text = "in less than",
    #    rtl  = False,
    #    size = 60,
    #    xy   = (250, 440),
    #)

    #add_text(
    #    draw = draw,
    #    text = "14 minutes",
    #    rtl  = False,
    #    size = 60,
    #    xy   = (250, 540),
    #)

    embed_image(img=img,
                filename='rachel_normand.jpeg',
                size=(200, 200),
                box=(10, 500))
    embed_image(img=img,
                filename='gabor2_612x612.jpg',
                size=(200, 200),
                box=(width - 200 - 10, 500))
    #embed_image(img=img, filename='reactjs.png', box=(10, 10), mask=True)
    embed_image(img=img, filename='python.png', box=(10, 10), mask=True)

    img.save(png_filepath)
    img.show()