Metadata-Version: 2.4
Name: clearweb-archive
Version: 0.1.0
Summary: Read and write ClearWeb archives for Clear Browser.
Project-URL: Homepage, https://github.com/space64-team/clearweb-archive
Project-URL: Repository, https://github.com/space64-team/clearweb-archive
Project-URL: Issues, https://github.com/space64-team/clearweb-archive/issues
Author: Space64
License-Expression: MIT
License-File: LICENSE
Keywords: archive,clearweb,html,private-browser
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Internet :: WWW/HTTP :: Browsers
Classifier: Topic :: System :: Archiving
Classifier: Typing :: Typed
Requires-Python: >=3.10
Requires-Dist: space64-local-archive>=0.1.0
Provides-Extra: dev
Requires-Dist: build>=1.2; extra == 'dev'
Requires-Dist: hatchling>=1.25; extra == 'dev'
Requires-Dist: mypy>=1.10; extra == 'dev'
Requires-Dist: pytest>=8; extra == 'dev'
Requires-Dist: ruff>=0.5; extra == 'dev'
Requires-Dist: twine>=5; extra == 'dev'
Description-Content-Type: text/markdown

# clearweb-archive

`clearweb-archive` is a Python library and command line tool for creating and
reading ClearWeb archives. A ClearWeb archive is a password-protected package
for portable static HTML sites that can link between pages and include local
resources such as images, stylesheets, and scripts.

ClearWeb archives use the Space64 encrypted local archive container through the
`space64-local-archive` Python package.

## Install

```bash
pip install clearweb-archive
```

## Write

```python
from clearweb_archive import create_clearweb_archive

create_clearweb_archive(
    "site",
    "site.clearweb",
    password="correct horse battery staple",
    title="My Offline Site",
    root="index.html",
)
```

## Read

```python
from clearweb_archive import read_clearweb_archive

archive = read_clearweb_archive(
    "site.clearweb",
    password="correct horse battery staple",
)
root_bytes = archive.root_file.data
```

## CLI

```bash
clearweb pack site site.clearweb --password "correct horse battery staple"
clearweb inspect site.clearweb --password "correct horse battery staple"
```

## Security Notes

The password protects archive contents at rest. Applications that open archives
may still need to extract or materialize files temporarily for WebView loading;
those temporary files should be treated as sensitive data and cleaned up by the
application.

ClearWeb is not an anonymity system, VPN, or network privacy tool. It is a local
archive format for storing and transporting web content.
