Skip to main content

context-mode

Compress bulky freelance HTML (Kwork / Weblancer / FL) into agent-ready fragments before it hits the LLM context window.

  • Drops nav/footer/similar-jobs noise
  • Keeps budget / deadline / description / skills windows
  • Zero required deps (optional beautifulsoup4)

Install

pip install -e .
# or after publish:
# pip install context-mode

CLI

context-mode page.html --site kwork
context-mode --url https://kwork.ru/projects/123 --site auto
context-mode page.html --max-chars 3000 --site weblancer

Library

from context_mode import compress, html_to_text

text = html_to_text(open("page.html").read())
print(compress(text, site="kwork", max_chars=4000))

Why

Freelance pages dump 50KB+ of chrome. Agents need title, budget, body, skills, deadline, client stats. This cuts noise before the model sees it.

Layout

src/context_mode/
  __init__.py
  compress.py
  cli.py
tests/
compress_extract.py   # legacy single-file CLI (compat)

Dev

python3 -m pip install -e .
python3 -m pytest tests/ -q

License

MIT · AMEOBIUS-team

Freelance portfolio: https://ameobius-space.github.io/kwork-portfolio/

Metadata

Release files for context-mode 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for context-mode 0.1.0
File Size Uploaded
context_mode-0.1.0.tar.gz 5.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for context-mode 0.1.0
File Interpreter ABI Platform
context_mode-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 10.6 kB

Release files / context_mode-0.1.0.tar.gz

Download URL context_mode-0.1.0.tar.gz
Size 5.1 kB
Tags Source
SHA-256 checksum
How to use checksums
b086546ac94bb478fbdf276bc7bf76aff94631a79a0b498f4a92f055242b041f
BLAKE2b-256 checksum
How to use checksums
4f4c935c85746853f5f3cc6b6c28a993af19338dfdfc76200351689dfb2b250f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.12

Release files / context_mode-0.1.0-py3-none-any.whl

Download URL context_mode-0.1.0-py3-none-any.whl
Size 5.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bec0806acea63b0030f776e0a8a02f78302d8dfec88466879499f39880203977
BLAKE2b-256 checksum
How to use checksums
83b38c9c3374b4198dce2493b86a450d4d266324afc6aebc3c1b8fdee3be9c36
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.12

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page