Skip to main content

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


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.1.tar.gz (2.1 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page