tweetmagick
Generate images with tweet-like appearance
Installation
pip3 install tweetmagick
Examples
Displaying the image and quitting without saving it can be done like so:
from tweetmagick import TweetGenerator
name = "harold"
longname = "stockmaster"
avatar = "harold.jpg"
text = "feeling pompous today, might delete later"
with TweetGenerator(name, longname, avatar, text) as tg:
tg.tweetgen(debug=True)
tweetgen method returns BytesIO object with png binary blob. Below is the code that will save your image to a file:
from shutil import copyfileobj
with TweetGenerator(name, longname, avatar, text, theme="light") as tg:
with open("haroldtweets.png", "wb") as tweet:
copyfileobj(tg.tweetgen(), tweet)
Results in :
With dark theme option:
TODO
Implement some streamlined method for embedding images in tweets.
Also some method for reply/quote images
Metadata
Release files for tweetmagick 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| tweetmagick-0.2.1.tar.gz | 4.4 kB | Details |
Release files / tweetmagick-0.2.1.tar.gz
| Download URL | tweetmagick-0.2.1.tar.gz |
|---|---|
| Size | 4.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d61633457b533132ab3addd76d563a152404a55a832ba47d082fa4f140c3f77c
|
|
BLAKE2b-256 checksum How to use checksums |
505f2189babd7ef8d9d64f2ec42089f6fb904a82abb079a269e8a84c66ace9d2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.3
|