Metadata-Version: 2.4
Name: md-to-slides
Version: 0.1.3
Summary: Convert Markdown files to presentation slides
Author-email: Cobra Chicken <tasteslikecobrachicken@gmail.com>
License: MIT
Keywords: markdown,slides,presentation,reveal.js,marp
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Environment :: Console
Classifier: Topic :: Text Processing :: Markup :: Markdown
Requires-Python: >=3.9
Description-Content-Type: text/markdown
Requires-Dist: click>=8.0
Requires-Dist: markdown>=3.4
Requires-Dist: jinja2>=3.0
Requires-Dist: pyyaml>=6.0
Provides-Extra: google
Requires-Dist: python-pptx>=0.6; extra == "google"
Requires-Dist: google-api-python-client>=2.0; extra == "google"
Requires-Dist: google-auth-httplib2>=0.1; extra == "google"
Requires-Dist: google-auth-oauthlib>=0.4; extra == "google"
Provides-Extra: dev
Requires-Dist: md-to-slides[google]; extra == "dev"
Requires-Dist: hatch; extra == "dev"

# md-to-slides

Convert Markdown files into presentation slides — HTML (Reveal.js), PowerPoint (.pptx), or Google Slides.

## Installation

```bash
pip install md-to-slides
```

For PowerPoint and Google Slides output, install the optional extra:

```bash
pip install md-to-slides[google]
```

## Usage

```bash
md-to-slides convert talk.md                        # → talk.html (Reveal.js)
md-to-slides convert talk.md -f google             # → talk.pptx (upload to Google Drive)
md-to-slides convert talk.md -f google --via-api \
  --credentials client_secrets.json               # → creates Google Slides via API
```

### Options

| Flag | Default | Description |
|---|---|---|
| `-o / --output` | input stem + extension | Output file path |
| `-f / --format` | `html` | Output format: `html` or `google` |
| `--via-api` | off | Upload directly via Google Slides API (requires `--credentials`) |
| `--credentials` | — | Path to OAuth2 client secrets JSON from Google Cloud Console |

## Markdown format

Slides are separated by `---` on its own line. An optional YAML front matter block sets the title and theme.

```markdown
---
title: My Talk
theme: moon
---

# First Slide

- Bullet one
- Bullet two

---

# Second Slide

Some prose content here.

<!-- notes -->
Speaker notes go here.
<!-- /notes -->
```

### Front matter fields

| Field | Default | Description |
|---|---|---|
| `title` | *(empty)* | Presentation title |
| `theme` | `black` | Reveal.js theme: `black`, `white`, `league`, `beige`, `sky`, `night`, `serif`, `simple`, `solarized`, `blood`, `moon` |

### Speaker notes

Wrap speaker notes in `<!-- notes -->` / `<!-- /notes -->` HTML comments anywhere in a slide. They appear in Reveal.js presenter view.

## Output formats

**HTML** — Self-contained Reveal.js presentation loaded from CDN. Open the output file in any browser. Includes syntax highlighting via highlight.js.

**PowerPoint (`.pptx`)** — Standard `.pptx` file. Upload to Google Drive to open as a Google Slides presentation automatically.

**Google Slides (via API)** — Creates a presentation directly in your Google account and prints its URL. Requires a Google Cloud project with the Slides API enabled and an OAuth2 client secrets JSON file.

### Google Slides API setup

1. Go to [Google Cloud Console](https://console.cloud.google.com/) → APIs & Services → Enable **Google Slides API**.
2. Create an OAuth2 Desktop credential and download `client_secrets.json`.
3. Run `md-to-slides convert` with `--via-api --credentials client_secrets.json`. A browser window opens for one-time authorization; a `token.json` is saved alongside the secrets file for future runs.

## License

MIT
