# ghbook-html2txt

Python tool to parse HTML book files (sampled from [GhBook](https://www.ghbook.ir/)), extracting headings, paragraphs, and notes and writing a plain-text version.

Goal: publish this project as a Python library on PyPI so it can be installed and used via `pip`.

## Install (after publishing)

```sh
pip install ghbook
```

## Usage

```sh
python main.py input.html [output.txt]
```

```sh
ghbook input.html [output.txt]
```

```sh
python -m ghbook_html2txt input.html [output.txt]
```

Omitting the output path creates a `.txt` file beside the input.

## Library

```python
from ghbook_html2txt import convert_file

convert_file("input.html", "output.txt")
```

The generated text uses markers such as `##` for headings, `PAGE_SEPARATOR` for page breaks, and `____________` for horizontal rules.

## Requirements

- Python 3.9+ (no extra packages)
