msgsplitter

Split messages (strings) to fit an arbitrary character limit


Keywords
message, sms, split, splitter, splitting, splitting-algorithms, string, string-formatter, strings, text, twitter
License
MIT
Install
pip install msgsplitter==1.0

Documentation

message-splitter

https://img.shields.io/travis/elijas/msgsplitter https://img.shields.io/pypi/v/msgsplitter https://img.shields.io/pypi/pyversions/msgsplitter https://img.shields.io/github/license/elijas/msgsplitter

Splits long message to multiple messages in order to fit within an arbitrary message length limit (useful for SMS, Twitter, etc.).

Installation

~ $ pip install msgsplitter

or you can install local version

~ $ pip install -e .

Quick start

>>> import msgsplitter
>>> result = msgsplitter.split("Hello, this is a really long message.", length_limit=30)
>>> result
['Hello, this is a really (1/2)', 'long message. (2/2)']

Run tests

$ pytest