Metadata-Version: 2.4
Name: context-mode
Version: 0.1.0
Summary: Compress bulky freelance HTML into agent-ready fragments before the context window.
Author: AMEOBIUS-team
License: MIT
Project-URL: Homepage, https://github.com/AMEOBIUS-team/context-mode
Project-URL: Repository, https://github.com/AMEOBIUS-team/context-mode
Project-URL: Issues, https://github.com/AMEOBIUS-team/context-mode/issues
Project-URL: Portfolio, https://ameobius-team.github.io/kwork-portfolio/
Keywords: llm,context,freelance,kwork,agent,token-reduction
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Text Processing :: Markup :: HTML
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Provides-Extra: bs4
Requires-Dist: beautifulsoup4<5,>=4.12; extra == "bs4"
Dynamic: license-file

# 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

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

## CLI

```bash
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

```python
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

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

## License

MIT · AMEOBIUS-team

Freelance portfolio: [https://ameobius-space.github.io/kwork-portfolio/](https://ameobius-space.github.io/kwork-portfolio/)
