Metadata-Version: 2.4
Name: lunarbeam
Version: 0.1.2
Summary: Compile a Beamer PDF into a standalone HTML presentation with clickable links, overlays, and media.
Author-email: Hesara Lokuhapuarachchi <hmlokuhapuarachchi@gmail.com>
License: MIT
Keywords: beamer,latex,presentation,html,pdf
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Multimedia :: Graphics :: Presentation
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: PyMuPDF>=1.22
Requires-Dist: Jinja2>=3.1
Requires-Dist: tqdm>=4.0
Dynamic: license-file

# LunarBeam 

> **Turn your Beamer PDF into a media compatible, interactive HTML presentation.**
> With overlays, clickable links, embedded videos/GIFs, and a laser pointer – no LaTeX installation needed on the presenting machine.

[![PyPI version](https://badge.fury.io/py/lunarbeam.svg)](https://pypi.org/project/lunarbeam/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

---

## Why LunarBeam?

- **Present anywhere** – just double‑click `index.html` (or open it in a browser). No Python, no LaTeX, no projector software.
- **All features intact** – overlays (`\pause`, `\only`, `\uncover`), internal/external hyperlinks, videos and GIFs (via a simple JSON sidecar), and a laser pointer.
- **Pixel‑perfect scaling** – the slide image fits any screen size without moving your clickable areas.
- **Offline & portable** – share a single folder or zip file; everything is included.

---

## Installation

LunarBeam requires Python 3.9 or later.

```bash
pip install lunarbeam
```

## Quick start

1. Compile your Beamer PDF as usual (e.g., `pdflatex presentation.tex`).
```bash
pdflatex mytalk.tex

```
convert the PDF to an interactive HTML presentation:
```bash
lunarbeam mytalk.pdf
```
3. Open `mytalk_pres\index.html` in a web browser to present.
```aiignore
cd mytalk_pres
python -m http.server 8000   # or simply double-click index.html
```

## Command‑line options
```
usage: lunarbeam [-h] [-o OUTPUT] [--tex TEX] [--nav NAV]
                 [--project-dir PROJECT_DIR] [--no-validate]
                 [--resolution RESOLUTION] pdf

positional arguments:
  pdf                   Path to the compiled Beamer PDF

options:
  -h, --help            show this help message and exit
  -o OUTPUT, --output OUTPUT
                        Output directory (default: <pdf_basename>_pres/)
  --tex TEX             Path to the LaTeX source (auto‑detected)
  --nav NAV             Path to the .nav file (auto‑detected)
  --project-dir PROJECT_DIR
                        Directory where auxiliary files are searched
  --no-validate         Skip consistency checks between PDF and .nav
  --resolution RESOLUTION
                        Render resolution as WIDTHxHEIGHT (e.g. 1280x720).
                        Default: 1920x1080
```

## Including videos and GIFs
LunarBeam uses a simple JSON file. Place it next to your PDF with the same base name, e.g. mytalk_media.json.
```json
{
  "media": [
    {
      "phys_page": 5,
      "type": "video",
      "file": "media/demo.mp4",
      "x": 200,
      "y": 300,
      "w": 640,
      "h": 480,
      "autoplay": true,
      "loop": true,
      "muted": true
    },
    {
      "phys_page": 7,
      "type": "gif",
      "file": "media/animation.gif",
      "x": 400,
      "y": 150,
      "w": 400,
      "h": 300,
      "autoplay": true,
      "loop": true
    }
  ]
}
```

Coordinates are in pixels relative to the rendered slide image (default 1920×1080).

Put the actual media files (demo.mp4, animation.gif) in a media/ folder next to the PDF. LunarBeam will copy them into the output.

Contributing
Pull requests are welcome! Please open an issue first to discuss what you’d like to change.

