=== ReelShelf ===
Contributors: leefone
Tags: youtube, vlog, video gallery, youtube channel, video seo
Requires at least: 6.5
Tested up to: 7.1
Requires PHP: 8.0
Stable tag: 0.7.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Turn your YouTube channel into a website that gets found on Google. Every video gets its own page, shown in a cinematic player, rows and grids.

== Description ==

ReelShelf syncs your YouTube channel into WordPress. Every video becomes a page on your site with its own address, description and search markup, so Google can find your videos on your website, not just on YouTube.

Then show them off with blocks built for vloggers:

* **Player**: a big cinematic player with your newest video, over a soft glow taken from the video itself. Click any card on the page and it plays here.
* **Row**: a sideways-scrolling row of videos, like a streaming service.
* **Grid**: every video, with a "Show more videos" button.
* **Shorts**: your YouTube Shorts in a row, opening in a phone-shaped viewer.
* **Heading**: section headings to match.
* **Search**: search inside your videos, including everything said in them. Results jump to the exact moment.

**Transcripts and AI.** Connect your YouTube channel and ReelShelf downloads each video's captions and puts the transcript on its page. Add an Anthropic API key and Claude writes a summary, an overview, chapters and topics for every video. Chapters you've already written in your YouTube description are always used instead. Clicking a chapter or a line of the transcript jumps the video to that moment, and chapters become "key moments" in Google. You choose whether to summarise new videos only or your whole back catalogue, with a cost estimate first.

**Automatic.** New uploads appear on their own. Public websites get them within a minute via YouTube's push notifications; otherwise ReelShelf checks every hour. Views and details refresh daily.

**Fast.** Pages show a thumbnail and only load YouTube's player when someone presses play. The script is small and has no dependencies. Everything is rendered on the server, so pages work without JavaScript.

**Private.** Videos play from YouTube's privacy-enhanced domain (youtube-nocookie.com). Your API key stays on your server and is never shown to visitors.

**Found on Google.** Each video's page includes VideoObject structured data, so your videos can appear in Google's video results.

**Yours to edit.** Change a title or description on your site and ReelShelf won't overwrite it on the next sync. YouTube playlists can become series you can filter by.

**Looks like your theme.** ReelShelf uses your theme's fonts, headings, buttons, colours and page width, so it fits any site. Prefer a backdrop of its own? Pick Dark or Light. Plus your own accent colour, optional card labels like "Episode {n}", and a mini-player that follows visitors down the page, which they can drag and resize.

Works with the block editor, and with classic editors and page builders through shortcodes.

== Installation ==

1. Install and activate ReelShelf.
2. ReelShelf opens its welcome screen. Press **Connect YouTube** and sign in with Google, or just type your channel's @handle.
3. Your videos import straight away.
4. Press **Create a video page**, or add the ReelShelf blocks to any page.

== Frequently Asked Questions ==

= Does it cost anything to use the YouTube API? =

No. The YouTube Data API is free up to 10,000 units a day. ReelShelf uses a few units an hour for a typical channel, because it syncs on your server and caches everything, instead of calling YouTube for every visitor.

= Can I put the API keys in wp-config.php? =

Yes: `define( 'REELSHELF_YOUTUBE_API_KEY', 'your-key' );` and `define( 'REELSHELF_ANTHROPIC_API_KEY', 'your-key' );`

= How much do the AI summaries cost? =

You pay Anthropic directly, on your own key. Roughly $0.15 per hour of video with Claude Opus 5, $0.06 with Sonnet 5, or $0.03 with Haiku 4.5. The settings page estimates the cost of your back catalogue before you start.

= Why do I have to connect my YouTube channel for transcripts? =

YouTube only lets a channel's owner download its caption files. You can also add a caption file (.vtt or .srt, from YouTube Studio) to any video by hand.

= What happens to a video I delete or make private on YouTube? =

At the next daily refresh it is switched to a draft on your site. If it comes back on YouTube, it comes back on your site.

= Shortcodes =

`[reelshelf_player video="latest" series="" caption="true" eyebrow="" full="false"]`
`[reelshelf_row title="Latest videos" eyebrow="" count="10" offset="0" series="" shorts="exclude" label="" all="false" full="false"]`
`[reelshelf_grid title="All videos" eyebrow="" count="12" offset="0" series="" shorts="exclude" label="" more="true" full="false"]`
`[reelshelf_shorts title="Shorts" eyebrow="" count="12" series="" full="false"]`
`[reelshelf_heading top="" main="Videos" level="2" full="false"]`
`[reelshelf_search title="Search the videos" placeholder="What are you looking for?" full="false"]`

`full="true"` stretches a section to the full width of the screen. `all="true"` adds a "See all" link. `shorts` can be `exclude`, `include` or `only`. In `label`, `{n}` becomes the card's number.

== External services ==

ReelShelf connects to these services to do its job:

* **ReelShelf Connect** (connect.reelshelf.com), run by ReelShelf's developer, so you don't need your own Google Cloud setup. When you press Connect YouTube, you sign in with Google through it and the sign-in comes straight back to your site; renewing that sign-in also goes through it. Without your own YouTube API key, your channel's public video data is fetched through it. It stores no personal data. Not used if you add your own Google keys under Settings → Your own Google keys. [Privacy](https://connect.reelshelf.com/privacy).

* **YouTube Data API v3** (Google). Used on your server to read your channel's public videos and playlists. It sends your API key and channel ID, when you sync and then hourly and daily. [Terms](https://developers.google.com/youtube/terms/api-services-terms-of-service), [Privacy](https://policies.google.com/privacy).
* **YouTube website** (youtube.com). Used on your server, once per new video under 3 minutes, to check whether it is a Short. It sends the video's ID. [Terms](https://www.youtube.com/t/terms), [Privacy](https://policies.google.com/privacy).
* **YouTube push notifications** (pubsubhubbub.appspot.com, Google). If your site is public, it subscribes to your channel's upload feed so new videos arrive within a minute. It sends your channel ID and your site's notification address. [Terms](https://policies.google.com/terms), [Privacy](https://policies.google.com/privacy).
* **Google sign-in and YouTube captions** (accounts.google.com, oauth2.googleapis.com, googleapis.com). Only if you press Connect YouTube: you sign in with Google, and ReelShelf then downloads your own videos' caption files, within a daily limit you set. It sends your OAuth client ID and secret, and the sign-in tokens. [Terms](https://developers.google.com/youtube/terms/api-services-terms-of-service), [Privacy](https://policies.google.com/privacy).
* **Write-ups** (connect.reelshelf.com, then api.anthropic.com). Once you connect YouTube, each video's transcript is sent to ReelShelf Connect, which has Claude (Anthropic) write its summary, overview, chapters and topics. With your own Anthropic key (advanced), it goes straight to api.anthropic.com instead. [Terms](https://www.anthropic.com/legal/commercial-terms), [Privacy](https://www.anthropic.com/legal/privacy).
* **YouTube embedded player and thumbnails** (youtube-nocookie.com, i.ytimg.com). Loaded in your visitors' browsers: thumbnails when a page shows videos, and the player only when a visitor presses play. [Terms](https://www.youtube.com/t/terms), [Privacy](https://policies.google.com/privacy).

== Changelog ==

= 0.7.0 =
* Write-ups are included: once you connect YouTube, ReelShelf writes up your videos with no account or key of your own, within a monthly allowance. Your own Anthropic key is still an option, under advanced settings.
* Plainer wording throughout.

= 0.6.0 =
* No Google Cloud setup needed: Connect YouTube signs in through ReelShelf Connect and imports your channel straight away, or just type your @handle.
* Welcome screen after activation, and a one-click "Create a video page".
* Your own Google keys moved to an advanced section; API keys are checked when saved, and channel errors stay visible.

= 0.5.0 =
* Transcripts: connect your YouTube channel to download captions (within a daily quota you set), or add caption files by hand.
* AI summaries, overviews, chapters and topics by Claude, on your own Anthropic key; new videos only by default, with a cost estimate for older ones.
* Video pages show the overview, clickable chapters and the transcript; chapters and the transcript go into the search data for Google.
* New Search block: search inside videos and jump to the moment.

= 0.4.0 =
* Looks like part of your theme: headings, paragraphs and buttons use your theme's own styles, and ReelShelf reads your theme's link colour, heading font, title size, corner rounding and page width (from theme.json, or by measuring the theme's styles when it has none).
* "Match my theme" is the new default style. The other styles are now Dark and Light.

= 0.3.0 =
* The mini-player can be dragged anywhere and resized from its corner, with the mouse, touch or arrow keys. It remembers where you put it; double-click its bar to send it back to the corner.

= 0.2.0 =
* New design: ambient player that takes its glow from each video, cleaner cards, built-in section titles with arrows and "See all", and a "Match my theme" style. Video pages now use the site's own colours.

= 0.1.0 =
* First version: channel sync with push updates, video pages, Player, Row, Grid, Shorts and Heading blocks, shortcodes, styles, mini-player and VideoObject schema.
