jusText
Program jusText is a tool for removing boilerplate content, such as navigation links, headers, and footers from HTML pages. It is designed to preserve mainly text containing full sentences and it is therefore well suited for creating linguistic resources such as Web corpora. You can try it online.
This is a fork of original (currently unmaintained) code of jusText hosted on Google Code.
Adaptations of the algorithm to other languages:
Some libraries using jusText:
Some currently (Jan 2020) maintained alternatives:
Installation
jusText needs Python 3.8+. Add it to your project with uv:
$ uv add justext
or install it with pip via pip install justext.
Dependencies
lxml (version depends on your Python version)
Usage
$ uv run python -m justext -s Czech -o text.txt http://www.zdrojak.cz/clanky/automaticke-zabezpeceni/
$ uv run python -m justext -s English -o plain_text.txt english_page.html
$ uv run python -m justext --help # for more info
Without a project, prefix the commands with uv run --with justext instead of uv run.
Python API
import requests
import justext
response = requests.get("http://planet.python.org/")
paragraphs = justext.justext(response.content, justext.get_stoplist("English"))
for paragraph in paragraphs:
if not paragraph.is_boilerplate:
print(paragraph.text)
Development
Install uv and run tests, the linter and the formatter via
$ uv run pytest
$ uv run ruff check
$ uv run ruff format
To skip formatting-only commits in git blame, run git config blame.ignoreRevsFile .git-blame-ignore-revs once.
Releasing
Go to Actions → Release → Run workflow and pick patch, minor or major. The workflow runs the tests,
bumps the version, moves the "Unreleased" part of the CHANGELOG under the new version, pushes the commit and tag
to main, publishes to PyPI and creates a GitHub release.
Publishing needs PyPI trusted publisher set up for
the publish-to-pypi.yaml workflow.
If uv publish fails after the push, don't re-run the workflow, it would bump the version again.
Check out the new tag and run uv build && uv publish by hand instead. Outside of GitHub Actions uv publish
needs a PyPI API token in UV_PUBLISH_TOKEN.
Acknowledgements
This software has been developed at the Natural Language Processing Centre of Masaryk University in Brno with a financial support from PRESEMT and Lexical Computing Ltd. It also relates to PhD research of Jan Pomikálek.
Metadata
Release files for jusText 4.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| justext-4.0.1.tar.gz | 822.3 kB | Without provenance | Details for justext-4.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| justext-4.0.1-py3-none-any.whl | Python 3 | none | any | Details for justext-4.0.1-py3-none-any.whl |
Total release size: 1.6 MB
Release files / justext-4.0.1.tar.gz
| Download URL | justext-4.0.1.tar.gz |
|---|---|
| Size | 822.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
101fa89e9d7966795bc9d5d9a95367865b270387f80c43948e226d203e6c4a11
|
|
BLAKE2b-256 checksum How to use checksums |
3b608194394e199b7bafcd19297643228e274910a118155ece3edcf862b2a26f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.12 {"installer":{"name":"uv","version":"0.13.12","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / justext-4.0.1-py3-none-any.whl
| Download URL | justext-4.0.1-py3-none-any.whl |
|---|---|
| Size | 813.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
34538cf2e867e05bc03830d3a7f11f66999d6fa9c9cf1942c4edef33983b6921
|
|
BLAKE2b-256 checksum How to use checksums |
9096b2ba8f787900b06db67c8858cac04cdcdd201cd4ce861d17bf540136fa34
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.12 {"installer":{"name":"uv","version":"0.13.12","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for jusText 4.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.