Metadata-Version: 2.4
Name: reqs2brew
Version: 0.1.2
Summary: A tool to generate Homebrew resource blocks from PyPI packages
Author-email: Biao Jiang <github@minsignal.com>
License: MIT
Project-URL: Homepage, https://github.com/biaojiang/homebrew-mdviewer
Project-URL: Documentation, https://github.com/biaojiang/homebrew-mdviewer#readme
Project-URL: Source, https://github.com/biaojiang/homebrew-mdviewer
Project-URL: Issues, https://github.com/biaojiang/homebrew-mdviewer/issues
Keywords: homebrew,cli,formula,resources,brew,python
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Utilities
Classifier: Environment :: Console
Classifier: Operating System :: OS Independent
Classifier: Natural Language :: English
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: requests
Requires-Dist: packaging
Dynamic: license-file

# homebrew-mdviewer

This repository contains:

- A [Homebrew](https://brew.sh) formula for installing `mdviewer`, a Markdown viewer CLI.
- A Python tool [`reqs2brew`](./src/reqs2brew) for generating Homebrew `resource` blocks from a `requirements.txt`, e.g., [`requirements_mdviewer.txt`](requirements_mdviewer.txt).

---

## 📦 mdviewer Formula

Install `mdviewer` using this Homebrew tap:

```bash
brew tap biaojiang/mdviewer
brew install biaojiang/mdviewer/mdviewer
```

## `reqs2brew` tool

[![PyPI version](https://img.shields.io/pypi/v/reqs2brew)](https://pypi.org/project/reqs2brew/)
[![License](https://img.shields.io/pypi/l/reqs2brew)](https://github.com/yourname/homebrew-mdviewer/blob/main/LICENSE)
[![PyPI Downloads](https://img.shields.io/pypi/dm/reqs2brew)](https://pypi.org/project/reqs2brew/)

Generate Homebrew `resource` blocks from a `requirements.txt`.

This tool helps Homebrew formula authors convert a list of Python dependencies into `resource` stanzas suitable for use with `virtualenv_install_with_resources`. It supports version resolution, SHA256 calculation, and optional filtering of pre-releases.

### Features

- Automatically fetches the latest stable release of each package.
- Downloads the source tarball (`sdist`) for proper SHA256 calculation.
- Outputs Homebrew `resource` blocks to both terminal and file.
- Caches downloads to avoid redundant network requests.

### Installation

```bash
pip install reqs2brew
```

