An html comparator that can output the differences between html code
Project description
htmlcomparator
Usage
To start using the comparator, first import the package, and make an object.
from htmlcomparator import HTMLComparator
comparator = HTMLComparator()
The method that is used to compare html code is
HTMLComparator.compare(html1, html2, quick_compare = True, compare_type = "all")
html1, html2
are the two html to be compared. If they are both strings, it will treat them as two html strings. If they are both io.IOBase
objects, then the program will treat them as two opened files. Otherwise the program will raise a TypeError
.
quick_compare
argument is used to specify whether the user want the method to simply return boolean or to return a detailed information of the differences. If it is set to True, then the method will return False as soon as it encountered the first difference, and return True otherwise. If it is set to False, then the two html are compared thoroughly, and the method will return a string
to describe the differences. If there are no differences, it will return an empty string.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for htmlcomparator-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e84ff3767eea64330443770483b8d7276698856838d13b1d3461feeb317c6d02 |
|
MD5 | 2376c0edf7bfaff78e020bbc917c8f18 |
|
BLAKE2b-256 | 6c40e9c44aeb517575b07aa93e56ec6a86d2708af89ee97c03465cd7f07a060c |