Skip to main content

Python Library to visualize string edit

Project description

Abstract

VisEdit is a visualiation library for string edit and differences between two strings.

Main Features

  • visualize differences between two strings
  • generate formatted text and html

Installation

install using pip:

$ pip install visedit

Example Codes

Generate formatted text or html

from visedit import StringEdit
source_str = "kitten"
target_str = "sitting"
se = StringEdit(source_str, target_str)
text = se.generate_text()
print(text)

# spaces will be truncated if truncate=True
text = se.generate_text(truncate=True)
# also available html as well as text
html = se.generate_html()

Change color setting

# setting for text
e = StringEdit(source_str, target_str, text_color_settings={
"wrong": "YELLOW",
"correct": "GREEN",
"base": "WHITE",
})
# setting for html
e = StringEdit(source_str, target_str, html_color_settings={
"wrong": "YELLOW",
"correct": "GREEN",
"base": "WHITE",
})

available colors are:

  • BLACK
  • RED
  • GREEN
  • YELLOW
  • BLUE
  • PURPLE
  • CYAN
  • WHITE

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

visedit-1.0.5.tar.gz (5.8 kB view details)

Uploaded Source

Built Distribution

visedit-1.0.5-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

Details for the file visedit-1.0.5.tar.gz.

File metadata

  • Download URL: visedit-1.0.5.tar.gz
  • Upload date:
  • Size: 5.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.4

File hashes

Hashes for visedit-1.0.5.tar.gz
Algorithm Hash digest
SHA256 bc47f3465f00274fdad5a4888e8e91b1c2692df7c116668253ad51af58164b06
MD5 6ec45a22a894e0f319ed19db69375a69
BLAKE2b-256 8ef2b39ab4efd7d73d8c3bed1f37e998d4a2f86b6a942261c9b8d4faddd84549

See more details on using hashes here.

File details

Details for the file visedit-1.0.5-py3-none-any.whl.

File metadata

  • Download URL: visedit-1.0.5-py3-none-any.whl
  • Upload date:
  • Size: 5.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.4

File hashes

Hashes for visedit-1.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 d3c8f4042fd71d657aa789564b58b33def7d59c2f34d9f2a7c05c8cf1463378f
MD5 6235919e0dbe09febcae66070cc137aa
BLAKE2b-256 33c96662b24ad7ddef1763b5aa3927deda50501ea0d6af1807bf02ce268e77d2

See more details on using hashes here.

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