Skip to main content

Smart sentence-based text clipper that respects meaning and punctuation.

Project description

cliptext

Smart sentence-based text clipper for Python.
Cuts long text without breaking sentences. Great for YouTube descriptions, SEO titles, social posts, and more.


✨ Features

  • Clips text at punctuation (".", "!", "?")
  • Keeps sentences whole — no awkward mid-cut phrases
  • Adds ... if text is trimmed
  • Simple, lightweight — no dependencies

📦 Installation

pip install cliptext

🧠 Usage

from cliptext import clip_text

text = "This is a long description. It has many sentences! But not all will fit?"

short = clip_text(text, limit=50)
print(short)  # Output: "This is a long description..."

clip_text(text: str, limit: int) -> str

Parameter Type Description
text str The text you want to clip
limit int Max number of characters allowed

👨‍💻 Author

Made with ❤️ by Vivek Appu


📝 License

MIT License – free to use, modify, and share.

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

cliptext-0.1.0.tar.gz (2.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cliptext-0.1.0-py3-none-any.whl (2.6 kB view details)

Uploaded Python 3

File details

Details for the file cliptext-0.1.0.tar.gz.

File metadata

  • Download URL: cliptext-0.1.0.tar.gz
  • Upload date:
  • Size: 2.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.5

File hashes

Hashes for cliptext-0.1.0.tar.gz
Algorithm Hash digest
SHA256 c96a995b3840a8d671f6b63af0379c66d88f19d397ad7bd3643fc375e9816458
MD5 83d143e1f215d4f964847ddcb272a8b4
BLAKE2b-256 c14755639ceb9650ccb60cddd65c0c29ba61ac8b3f0527c9679e76d14a3d09d9

See more details on using hashes here.

File details

Details for the file cliptext-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: cliptext-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 2.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.5

File hashes

Hashes for cliptext-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 073b3e096b25f1eea945b7a9d3278bc02db3aea7e35e1d39954818ea18c2e01c
MD5 173089843bb5951e389b9f4d194ed1ec
BLAKE2b-256 8a54d0ca4d4721c136578d1376757565a8938499c5cb80408ada2f3b79cfa181

See more details on using hashes here.

Supported by

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