Metadata-Version: 2.1
Name: Magazine
Version: 0.2.2
Summary: Let your code take comprehensive notes and publish notes and figures as a beautiful consolidated PDF document.
Home-page: https://github.com/mschroen/magazine
License: MIT
Keywords: logging,reports,pdf
Author: Martin Schrön
Author-email: martin@schroen.eu
Requires-Python: >3.9
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Dist: fpdf2 (>2.8)
Requires-Dist: habanero (>=1.2.3,<2.0.0)
Requires-Dist: neatlogger (>=0.1)
Requires-Dist: numpy (<2.0)
Project-URL: Repository, https://github.com/mschroen/magazine
Description-Content-Type: text/markdown

# Magazine
[![PyPi Version](https://img.shields.io/pypi/v/magazine.svg)](https://pypi.python.org/pypi/magazine/)
[![MIT License](https://img.shields.io/badge/License-MIT-blue.svg)](https://github.com/mschroen/magazine/blob/main/LICENSE)
[![Read the Docs](https://readthedocs.org/projects/magazine/badge/?version=latest)](https://magazine.readthedocs.io/en/latest/?badge=latest)
[![Issues](https://img.shields.io/github/issues-raw/mschroen/magazine.svg?maxAge=25000)](https://github.com/mschroen/magazine/issues)  
Let your code take comprehensive notes and publish notes and figures as a beautiful consolidated PDF document.

## Idea

The magazine package helps you to create beautiful PDF reports of what has been done during the execution of your app. 
1. Your scripts or submodules can write *Stories* in plain human-readable text, which could also include numerical results or figures, for instance.  
2. The collection of stories can be used to *Publish* a glossy PDF document.

## Example

```python
from magazine import Story, Publish

E = 42
Story.report("Experiment", "The analysis found that energy equals {} Joule.", E)
Story.cite("10.1002/andp.19163540702")

with Publish("Report.pdf", "My physics report", info="Version 0.1") as M:
    M.add_story("Experiment")
    M.add_references()
```

- View the resulting magazine in [output/Report.pdf](https://github.com/mschroen/magazine/blob/main/output/Report.pdf).
- Check also `example.py` for more examples.

## Install

```bash
pip install magazine
```

Requires:
- fpdf2
- habanero (for academic citations)
- neatlogger (wrapper for loguru)

## Acknowledgements

- Uses the Google font [Roboto](https://fonts.google.com/specimen/Roboto) as it just looks great in PDFs.
