Metadata-Version: 2.4
Name: obsidian-tmdb-cover
Version: 0.1.3
Summary: Add TMDB cover images to Obsidian notes
Project-URL: Homepage, https://github.com/yourusername/obsidian-tmdb-cover
Project-URL: Repository, https://github.com/yourusername/obsidian-tmdb-cover.git
Project-URL: Issues, https://github.com/yourusername/obsidian-tmdb-cover/issues
Author-email: Your Name <your.email@example.com>
License: MIT
Keywords: covers,metadata,movies,obsidian,tmdb,tv
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: End Users/Desktop
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Multimedia :: Graphics
Classifier: Topic :: Office/Business :: Office Suites
Classifier: Topic :: Text Processing :: Markup
Classifier: Topic :: Utilities
Requires-Python: >=3.8
Requires-Dist: pillow>=10.0.0
Requires-Dist: pyyaml>=6.0.1
Requires-Dist: requests>=2.31.0
Description-Content-Type: text/markdown

# Obsidian TMDB Cover

Add TMDB cover images and metadata to your Obsidian notes automatically.

## Features

- Fetches movie/TV show cover images from TheMovieDB (TMDB)
- Downloads and resizes images locally to your vault's `attachments/` folder
- Adds runtime and genre tags to note frontmatter
- Processes entire directories in batch mode
- Handles various cover scenarios (missing, color placeholders, external URLs)

## Installation

```bash
pip install obsidian-tmdb-cover
```

## Usage

**Bring Your Own API Key** - Get a free API key from [TheMovieDB](https://www.themoviedb.org/settings/api).

```bash
# Set your TMDB API key
export TMDB_API_KEY=your_api_key_here

# Process an Obsidian vault
obsidian-cover /path/to/your/obsidian/vault

# Or run as a module
python -m obsidian_tmdb_cover /path/to/your/obsidian/vault
```

The tool will:

1. Find all `.md` files in the directory
2. Extract titles from frontmatter, H1 headers, or filenames
3. Search TMDB for matching movies/TV shows
4. Download cover images and add metadata to frontmatter

## Example

Before:

```yaml
---
title: The Matrix
---
```

After:

```yaml
---
title: The Matrix
cover: attachments/The Matrix - cover.jpg
runtime: 136
tags: [movie/Action, movie/Science-Fiction]
---
```

## Requirements

- Python 3.8+
- TMDB API key (free)
- Obsidian vault with markdown files

## License

MIT
