Tweet2Image - Convert tweets to Instagram-friendly images.

Overview

Tweet2Image

Convert tweets to Instagram-friendly images.

How to use

If you want to use this repository as a submodule, don't forget to put the fonts directory, the resources directory and credentials.py in your working directory.

There are two main functions in tweet_image.py:

  • def tweets_to_images(file, handle, name, showFavsRt, show_date)
  • def tweet_to_image(name, username, showFavsRt, show_date, tweet, tweet_timestamp, favs, retweets, profile_image, tweet_id, media_url, r, g, b)

tweets_to_images

  • file: File with the tweets. You can generate such a file with this module which I have developed: https://github.com/EinGuterWaran/FetchTweets
  • handle: The Twitter handle/username of the user
  • name: The name of the user (not the Twitter handle) which will be on the image. You can let this empty to retrieve the original name via the Twitter API
  • showFavsRt: True if you want to show the likes and retweets on the image, False if not
  • show_date: True if you want to show the date of the tweet on the image, False if not

tweets_to_images uses tweet_to_image.

tweet_to_image

  • name: The name of the user (not the Twitter handle) which will be on the image. You can let this empty to retrieve the original name via the Twitter API
  • username: The Twitter handle/username of the user
  • showFavsRt: True if you want to show the likes and retweets on the image, False if not
  • showDate: True if you want to show the date of the tweet on the image, False if not
  • tweet: The tweet itself
  • tweet_timestamp: This format -> 2021-08-08 16:08:24+00:00
  • favs: How many likes
  • retweets: How many retweets
  • profile_image: Path to profile image
  • tweet_id: Id of the tweet (it's in the url of the tweet)
  • media_url: Array with the urls of the images in the tweet
  • r, g, b: Color of the background behind the tweet
You might also like...
 Convert Image to ASCII Art
Convert Image to ASCII Art

Convert Image to ASCII Art Persiapan aplikasi ini menggunakan bahasa python dan beberapa package python. oleh karena itu harus menginstall python dan

Convert any image into greyscale ASCII art.
Convert any image into greyscale ASCII art.

Image-to-ASCII Convert any image into greyscale ASCII art.

LGVL helper script to batch and convert with lvgl offline image converter

script to batch and convert with lvgl offline image converter

This Web App lets you convert your Normal Image to a SKETCHED one within a minute
This Web App lets you convert your Normal Image to a SKETCHED one within a minute

This Web App lets you convert your Normal Image to a SKETCHED one within a minute

Convert the SVG code to PNG and replace the line by a call to the image in markdown

Convert the SVG code to PNG and replace the line by a call to the image in markdown

This tool allows the user to convert a 16 by 16 image into a list with numbers representing an object/character.

Room Formatter This tool allows the user to convert a 16 by 16 image into a list with numbers representing an object/character. There is cur

A little Python tool to convert a TrueType (ttf/otf) font into a PNG for use in demos.

font2png A little Python tool to convert a TrueType (ttf/otf) font into a PNG for use in demos. To use from command line it expects python3 to be at /

Convert photos to paintings with python
Convert photos to paintings with python

Convert-photos-to-paintings Before the changes After the changes Before the changes After the changes This code is written in the Python programming l

Convert a DOS Punk image to text
Convert a DOS Punk image to text

DOS Punk Text Inspired by MAX CAPACITY's DOS Punks & the amazing DOS Punk community. DOS Punk Text is a Python 3 script that renders a DOS Punk image

Owner
Janu Lingeswaran
Computer Science Student, RWTH Aachen
Janu Lingeswaran
pix2tex: Using a ViT to convert images of equations into LaTeX code.

The goal of this project is to create a learning based system that takes an image of a math formula and returns corresponding LaTeX code.

Lukas Blecher 2.6k Dec 30, 2022
Convert bitmap images to seeds for Tiny-83 NFT project.

What is this? This tool allows you to convert any 14p high and 22p wide Bitmap (.bmp) to the seed needed for the Tiny-83 NFT project. Project Twitter:

shib_maximalist 1 Oct 31, 2021
Png2Jpg tool will help you convert from png image format to jpg images format.

PNG 2 JPG All codes assume running from root directory. Please update the sys path at the beginning of the codes before running. Over View Png2Jpg too

Nguyễn Trường Lâu 2 Dec 27, 2021
Convert HDR photos taken by iPhone 12 (or later) to regular HDR images

heif-hdrgainmap-decode Convert HDR photos taken by iPhone 12 (or later) to regular HDR images. Installation First, make sure you have the following pa

Star Brilliant 5 Nov 13, 2022
An python script to convert images to upscaled versions made out of one-colour emojis.

ABOUT This is an python script to convert png, jpg and gif(output isnt animated :( ) images to scaled versions made out of one-colour emojis. Please n

null 0 Oct 19, 2022
The friendly PIL fork (Python Imaging Library)

Pillow Python Imaging Library (Fork) Pillow is the friendly PIL fork by Alex Clark and Contributors. PIL is the Python Imaging Library by Fredrik Lund

Pillow 10.4k Dec 31, 2022
Parking management project which generates barcode parking ticket with user-friendly Tkinter program GUI

Parking-management-system Parking management project which generates barcode parking ticket with user-friendly Tkinter program GUI How to run Download

null 1 Jul 3, 2022
missing-pixel-filler is a python package that, given images that may contain missing data regions (like satellite imagery with swath gaps), returns these images with the regions filled.

Missing Pixel Filler This is the official code repository for the Missing Pixel Filler by SpaceML. missing-pixel-filler is a python package that, give

SpaceML 11 Jul 19, 2022
Instagram-like image filters.

PyGram Instagram-like image filters. Usage First, import the client: from filters import * Instanciate a filter and apply it: f = Nashville("image.jp

Ajay Kumar Nagaraj 0 Oct 18, 2022
A Icon Maker GUI Made - Convert your image into icon ( .ico format ).

Icon-Maker-GUI A Icon Maker GUI Made Using Python 3.9.0 . It will take any image and convert it to ICO file, for web site favicon or Windows applicati

Insanecodes 12 Dec 15, 2021