Metadata-Version: 2.4
Name: civic-paperkit
Version: 0.0.2
Summary: Toolkit for civic paper production using Python and LaTeX
Author-email: Civic Interconnect <info@civic-interconnect.org>
License-Expression: MIT
Project-URL: Documentation, https://civic-interconnect.github.io/civic-paperkit/
Project-URL: Homepage, https://github.com/civic-interconnect/civic-paperkit
Project-URL: Issues, https://github.com/civic-interconnect/civic-paperkit/issues
Project-URL: Source, https://github.com/civic-interconnect/civic-paperkit
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering :: Information Analysis
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.12
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: beautifulsoup4
Requires-Dist: bibtexparser
Requires-Dist: loguru
Requires-Dist: pyyaml
Requires-Dist: requests
Provides-Extra: dev
Requires-Dist: build; extra == "dev"
Requires-Dist: pre-commit; extra == "dev"
Requires-Dist: pytest; extra == "dev"
Requires-Dist: pytest-asyncio; extra == "dev"
Requires-Dist: pytest-cov; extra == "dev"
Requires-Dist: pytest-env; extra == "dev"
Requires-Dist: responses; extra == "dev"
Requires-Dist: twine; extra == "dev"
Requires-Dist: types-requests; extra == "dev"
Requires-Dist: types-PyYAML; extra == "dev"
Requires-Dist: validate-pyproject; extra == "dev"
Provides-Extra: docs
Requires-Dist: mike; extra == "docs"
Requires-Dist: mkdocs; extra == "docs"
Requires-Dist: mkdocs-material; extra == "docs"
Requires-Dist: mkdocstrings[python]; extra == "docs"
Requires-Dist: ruff; extra == "docs"
Dynamic: license-file

# civic-paperkit

[![PyPI](https://img.shields.io/pypi/v/civic-paperkit.svg)](https://pypi.org/project/civic-paperkit/)
[![Python versions](https://img.shields.io/pypi/pyversions/civic-paperkit.svg)](https://pypi.org/project/civic-paperkit/)
[![License: MIT](https://img.shields.io/badge/license-MIT-green.svg)](https://opensource.org/licenses/MIT)
[![CI Status](https://github.com/civic-interconnect/civic-paperkit/actions/workflows/ci.yml/badge.svg)](https://github.com/civic-interconnect/civic-paperkit/actions/workflows/ci.yml)
[![Docs](https://img.shields.io/badge/docs-mkdocs--material-blue)](https://civic-interconnect.github.io/civic-paperkit/)

> Automatically download research data linked to your bibliography references.

**civic-paperkit** fetches datasets, CSVs, and supplementary materials referenced in your academic papers.
It reads your `.bib` file and a companion metadata file to archive all your sources.


---

## Installation

```shell
pip install civic-paperkit
```
---

## Quick Start

1. Create a `refs_meta.yaml` file mapping your BibTeX keys to data sources:
```yaml
# refs_meta.yaml
cdc_pmdr:
  notes: "CDC Maternal Mortality Rates 2018-2022"
  assets:
    - url: "https://data.cdc.gov/api/views/e2d5-ggg7/rows.csv"
      filename: "maternal_mortality.csv"

smith2024:
  assets:
    - page_url: "https://example.org/supplementary"
      allow_ext: [".csv", ".xlsx", ".zip"]
```

2. Run the tool:
```shell
ci-paperkit --bib paper/refs.bib --meta paper/refs_meta.yaml
```

3. Find your data in `data/raw/<bibkey>/`

## Features

- Download direct file URLs (CSV, Excel, PDF, etc.)
- Scrape pages for data files
- Organize downloads by citation key
- Checksum verification (optional)
- Configurable output directories

## Requirements

- Python 3.12+
- A BibTeX file with your references
- A YAML metadata file mapping references to data sources

## License

MIT
