Software Engineer x UX Designer

Plex Movie Reviews to Jekyll Blog Posts

This script allows you to automatically generate blog posts from your Plex movie ratings and reviews. It connects to your Plex server, fetches movies you’ve rated, and creates Jekyll-formatted markdown files ready to be published on your blog.

Features

Requirements

Installation

  1. Make sure you have Python installed
  2. Install required packages:
pip install plexapi pyyaml python-slugify
  1. Make the script executable:
chmod +x plex-reviews-to-posts.py

Usage

Direct Connection

./plex-reviews-to-posts.py --url "http://your-plex-server:32400" --token "your-plex-token"

Using Plex Account

./plex-reviews-to-posts.py --account --username "your-username" --password "your-password" --server "Your Server Name"

Options

Examples

Generate posts for all movies rated 7 or higher:

./plex-reviews-to-posts.py --url "http://your-plex-server:32400" --token "your-plex-token" --min-rating 7

Get the 5 most recent reviews:

./plex-reviews-to-posts.py --url "http://your-plex-server:32400" --token "your-plex-token" --limit 5

Only include reviews from the last 30 days:

./plex-reviews-to-posts.py --url "http://your-plex-server:32400" --token "your-plex-token" --days 30

Finding Your Plex Token

You need your Plex token to authenticate with your server. Here are a few ways to find it:

  1. From the Plex Web App:
    • Log into Plex
    • Open the developer tools (F12)
    • Go to the Network tab
    • Look for any request to your Plex server
    • Find the “X-Plex-Token” parameter in the URL
  2. From your Plex configuration files (location varies by OS)

  3. Using this Python command:
    from plexapi.myplex import MyPlexAccount
    account = MyPlexAccount('your-username', 'your-password')
    print(f"Your Plex token is: {account.authenticationToken}")
    

Customization

Creating a Movies Tag

Make sure to create a tag file for movies reviews:

mkdir -p tag
echo "---
layout: tag
tag: movies
title: \"Movie Reviews\"
permalink: /tag/movies/
---" > tag/movies.md

License

This script is provided as-is under the MIT License. Feel free to modify and use it as needed.