Split a chunk of text into 280-character blocksAttempting to split at the end of sentences etc.
Project description
Text to tweets
This small package simply splits a large block of text into 280 character chunks.
The code is lifted wholesale from https://github.com/NaruBeast/tweet-splitter.
Install
pip3 install text-to-tweets
Usage
from text_to_tweets import tweet_splitter
tweets = tweet_splitter(
article_text,
counter=True # Add counters to tweets - e.g. "(3/10)"
)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
text-to-tweets-0.1.0.tar.gz
(1.3 kB
view details)
File details
Details for the file text-to-tweets-0.1.0.tar.gz
.
File metadata
- Download URL: text-to-tweets-0.1.0.tar.gz
- Upload date:
- Size: 1.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b3013c12a505b4ce2b2a807f058fba2865253b98db8a23c378e4707ad0d15672 |
|
MD5 | 4added4cb039877bbfe7761ff32034c2 |
|
BLAKE2b-256 | 1afe2375f6c2479b7e76d6aa1aca1c30fc8867a9077ed3afd2039697254f01c3 |