A tool helps build a talk preview image by combining the given background image and talk event description

Overview

talk-preview-img-builder

A tool helps build a talk preview image by combining the given background image and talk event description

Installation and Usage

Install Dependencies

For running the app, you need to install the following dependencies by following command:

pipenv install -d

Run the Application

Before running the application, you need to prepare the material for building the talk preview images/slides. There are two materials that are required:

  • A background image named background.png which is located in the materials/img folder.

  • A talk event description named speeches.json which is located in the materials/ folder.

After preparing the material, you can run the application by following command:

pipenv run build_talk_preview_img   # build the talk preview images

or

pipenv run build_talk_preview_ppt  # build the talk preview slides

The generated talk preview images and slides are located in the export/ folder.

Configuring the Application

There are several options to configure the application, the default values are shown in the config.py file. You can override the default values by editing the config.py file or adding a .env file that setting theses variables before running the app.

Variable Description Default Value (Setting for Image/ Setting for Slides) Type (Setting for Image/ Setting for Slides)
BACKGROUND_IMG_PATH The path to the background image materials/img/background.png String
SPEECHES_PATH The path to the speech description materials/speeches.json String
PREVIEW_IMG_WIDTH The width of the generated preview image 700px / 30cm Integer / Float
PREVIEW_IMG_HEIGHT The height of the generated preview image 700px / 30cm Integer / Float
PREVIEW_IMG_TITLE_UPPER_LEFT_X The left position of the title in the upper left corner of the generated preview image 110px / 0.95cm Integer / Float
PREVIEW_IMG_TITLE_UPPER_LEFT_Y The top position of the title in the upper left corner of the generated preview image 110px / 1.04cm Integer / Float
PREVIEW_IMG_CONTENT_UPPER_LEFT_X The left position of the content in the upper left corner of the generated preview image 85px / 1.38cm Integer / Float
PREVIEW_IMG_CONTENT_UPPER_LEFT_Y The top position of the content in the upper left corner of the generated preview image 200px / 3.8cm Integer / Float
PREVIEW_IMG_FOOTER_UPPER_LEFT_X The left position of the footer in the upper left corner of the generated preview image 100px / 1.6cm Integer / Float
PREVIEW_IMG_FOOTER_UPPER_LEFT_Y The top position of the footer in the upper left corner of the generated preview image 650px / 12.2cm Integer / Float
PREVIEW_IMG_SPEAKER_UPPER_RIGHT_X The right position of the speaker name in the upper right corner of the generated preview image 600px / 13.5cm Integer / Float
PREVIEW_IMG_SPEAKER_UPPER_RIGHT_Y The top position of the speaker name in the upper right corner of the generated preview image 570px / 10cm Integer / Float
TITLE_HEIGHT The height of the title 70px / 1.84cm Integer / Float
CONTENT_HEIGHT The height of the content 90px / 7.5cm Integer / Float
PREVIEW_TEXT_COLOR The color of text used in the preview image #080A42 String
PREVIEW_HIGHTLIGHT_TEXT_COLOR The highlight color of text used in the preview image #EBCC73 String
PREVIEW_TEXT_FONT The font used in the preview image "PingFang.ttc"/"Taipei Sans TC Beta" String
PREVIEW_TEXT_BOLD_FONT The bold font used in the preview image "PingFang.ttc"/"Taipei Sans TC Beta" String

Coding Style

The coding style of the application is PEP8. You can use the following command to check the coding style:

pipenv run lint

and the following command to reformat the coding style which is leveraged by black and isort:

pipenv run reformat

TODO

  • Automatically generate the talk preview metadata file (e.g. speeches.json) from the PyConTW API server.
  • Implement hybrid language support text wrapping in title and content of the talk preview image.
  • Implement dynamic font size adjustment in the title and content of the talk preview image depending on the length of words.
  • Implement CI workflow by using GitHub Actions
You might also like...
An easy-to-use Python module that helps you to extract the BERT embeddings for a large text dataset (Bengali/English) efficiently.

An easy-to-use Python module that helps you to extract the BERT embeddings for a large text dataset (Bengali/English) efficiently.

An automated program that helps customers of Pizza Palour place their pizza orders
An automated program that helps customers of Pizza Palour place their pizza orders

PIzza_Order_Assistant Introduction An automated program that helps customers of Pizza Palour place their pizza orders. The program uses voice commands

This is a general repo that helps you develop fast/effective NLP classifiers using Huggingface

NLP Classifier Introduction This project trains a bert model on any NLP classifcation model. And uses the model in make predictions on new data using

Estimation of the CEFR complexity score of a given word, sentence or text.

NLP-Swedish … allows to estimate CEFR (Common European Framework of References) complexity score of a given word, sentence or text. CEFR scores come f

A practical and feature-rich paraphrasing framework to augment human intents in text form to build robust NLU models for conversational engines. Created by Prithiviraj Damodaran. Open to pull requests and other forms of collaboration. Idea is to build a model which will take keywords as inputs and generate sentences as outputs.
Idea is to build a model which will take keywords as inputs and generate sentences as outputs.

keytotext Idea is to build a model which will take keywords as inputs and generate sentences as outputs. Potential use case can include: Marketing Sea

Build Text Rerankers with Deep Language Models

Reranker is a lightweight, effective and efficient package for training and deploying deep languge model reranker in information retrieval (IR), question answering (QA) and many other natural language processing (NLP) pipelines. The training procedure follows our ECIR paper Rethink Training of BERT Rerankers in Multi-Stage Retrieval Pipeline using a localized constrastive esimation (LCE) loss.

An easier way to build neural search on the cloud
An easier way to build neural search on the cloud

An easier way to build neural search on the cloud Jina is a deep learning-powered search framework for building cross-/multi-modal search systems (e.g

An easier way to build neural search on the cloud
An easier way to build neural search on the cloud

An easier way to build neural search on the cloud Jina is a deep learning-powered search framework for building cross-/multi-modal search systems (e.g

Comments
  • [Feature request] Hints when missing export folder

    [Feature request] Hints when missing export folder

    By default the tool exports images/ppt to export folder. The folder needs to be created prior to using this tool, otherwise FileNotFoundError: [Errno 2] No such file or directory.

    Describe the solution you'd like try-except should be sufficient.

    Describe alternatives you've considered Prompt for interactive input

    Additional context Test version: f1c1c7037709b1adb064bb67e6290d5179d5770f Python 3.8.5

    good first issue 
    opened by tai271828 1
  • Export slides and images with english footer

    Export slides and images with english footer

    Is your feature request related to a problem? Please describe.

    There is a requirement for generating English version of slides and images including english category, language info, python level so that we could share the preview image with foreign attendee.

    The result of the generating image will look like following picture. image

    Describe the solution you'd like Update the execution flow of TalkPreviewImgBuilder.execute() and TalkPreviewPPTBuilder.execute() to export english slides/images and add english footer in __fill_in_footer() in both of builders

    enhancement 
    opened by josix 1
Owner
PyCon Taiwan
PyCon Taiwan
DeepAmandine is an artificial intelligence that allows you to talk to it for hours, you won't know the difference.

DeepAmandine This is an artificial intelligence based on GPT-3 that you can chat with, it is very nice and makes a lot of jokes. We wish you a good ex

BuyWithCrypto 3 Apr 19, 2022
New Modeling The Background CodeBase

Modeling the Background for Incremental Learning in Semantic Segmentation This is the updated official PyTorch implementation of our work: "Modeling t

Fabio Cermelli 9 Dec 28, 2022
Python Implementation of ``Modeling the Influence of Verb Aspect on the Activation of Typical Event Locations with BERT'' (Findings of ACL: ACL 2021)

BERT-for-Surprisal Python Implementation of ``Modeling the Influence of Verb Aspect on the Activation of Typical Event Locations with BERT'' (Findings

null 7 Dec 5, 2022
Code for "Generating Disentangled Arguments with Prompts: a Simple Event Extraction Framework that Works"

GDAP The code of paper "Code for "Generating Disentangled Arguments with Prompts: a Simple Event Extraction Framework that Works"" Event Datasets Prep

null 45 Oct 29, 2022
A toolkit for document-level event extraction, containing some SOTA model implementations

Document-level Event Extraction via Heterogeneous Graph-based Interaction Model with a Tracker Source code for ACL-IJCNLP 2021 Long paper: Document-le

null 84 Dec 15, 2022
Predicting the usefulness of reviews given the review text and metadata surrounding the reviews.

Predicting Yelp Review Quality Table of Contents Introduction Motivation Goal and Central Questions The Data Data Storage and ETL EDA Data Pipeline Da

Jeff Johannsen 3 Nov 27, 2022
The projects lets you extract glossary words and their definitions from a given piece of text automatically using NLP techniques

Unsupervised technique to Glossary and Definition Extraction Code Files GPT2-DefinitionModel.ipynb - GPT-2 model for definition generation. Data_Gener

Prakhar Mishra 28 May 25, 2021
The model is designed to train a single and large neural network in order to predict correct translation by reading the given sentence.

Neural Machine Translation communication system The model is basically direct to convert one source language to another targeted language using encode

Nishant Banjade 7 Sep 22, 2022
Random-Word-Generator - Generates meaningful words from dictionary with given no. of letters and words.

Random Word Generator Generates meaningful words from dictionary with given no. of letters and words. This might be useful for generating short links

Mohammed Rabil 1 Jan 1, 2022