Skip to main content

A simple library to convert rtf to text

Project description

striprtf

Build status

Purpose

This is a simple library to convert rtf files to python strings. A lot of medical documents are written in rtf format which is not ideal for parsing and further processing. This library converts it to plain old text.

How to use

from striprtf.striprtf import rtf_to_text
rtf = "some rtf encoded string"
text = rtf_to_text(rtf)
print(text)

How to use online

If you don't want to install, there is also an online version available at https://striprtf.dev

History

Pyth was not working for the rtf files I had. The next best thing was this gist: https://gist.github.com/gilsondev/7c1d2d753ddb522e7bc22511cfb08676

Very few additions where made, e.g. better formatting of tables.

Pushing to PyPi

  • pip install twine

Run commands

python setup.py sdist bdist_wheel
twine upload -r testpypi dist/*
twine upload -r pypi dist/*

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

striprtf-0.0.13.tar.gz (4.4 kB view details)

Uploaded Source

Built Distribution

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

striprtf-0.0.13-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

File details

Details for the file striprtf-0.0.13.tar.gz.

File metadata

  • Download URL: striprtf-0.0.13.tar.gz
  • Upload date:
  • Size: 4.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.7.6

File hashes

Hashes for striprtf-0.0.13.tar.gz
Algorithm Hash digest
SHA256 c38405e2aad4c2096fa6553d62de5d88be89e64a3a9067eedf59a4a0212bdf6a
MD5 b79fba6f283c6fe267ef217694c95b09
BLAKE2b-256 1cfabd6124aa0a78d76a16b13de92cc6a23e95762603ce107a9a7cff171f538f

See more details on using hashes here.

File details

Details for the file striprtf-0.0.13-py3-none-any.whl.

File metadata

  • Download URL: striprtf-0.0.13-py3-none-any.whl
  • Upload date:
  • Size: 6.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.7.6

File hashes

Hashes for striprtf-0.0.13-py3-none-any.whl
Algorithm Hash digest
SHA256 79fde88b4adbea3888926204c40c781d3a3fdaf97f6c0fb1dbc4ccf9f5a6854d
MD5 45aef6d2f881ad94bdd156353227693f
BLAKE2b-256 272888a82a36327cd4f729427b34c703dcb6923c7b8857c740146f47274a4027

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