Metadata-Version: 2.4
Name: ghbook
Version: 0.1.0
Summary: Convert GhBook-style HTML book files into plain text.
Author: ghbook-html2txt contributors
License: MIT License
        
        Copyright (c) 2026 Ciyoku
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Homepage, https://github.com/abmus/htmlbooks2txt
Project-URL: Repository, https://github.com/abmus/htmlbooks2txt
Keywords: html,text,book,converter,ghbook
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Topic :: Text Processing
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# 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)
