{"id":21013804,"url":"https://github.com/pyro2927/plexnewslettergenerator","last_synced_at":"2025-08-30T09:33:52.212Z","repository":{"id":30668518,"uuid":"34224287","full_name":"pyro2927/PlexNewsletterGenerator","owner":"pyro2927","description":"Code to generate \u0026 send a Plex newsletter","archived":false,"fork":false,"pushed_at":"2015-10-04T22:16:40.000Z","size":604,"stargazers_count":3,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-08-21T00:51:46.071Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pyro2927.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-04-19T21:01:47.000Z","updated_at":"2021-06-28T22:10:40.000Z","dependencies_parsed_at":"2022-08-17T17:00:49.238Z","dependency_job_id":null,"html_url":"https://github.com/pyro2927/PlexNewsletterGenerator","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/pyro2927/PlexNewsletterGenerator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pyro2927%2FPlexNewsletterGenerator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pyro2927%2FPlexNewsletterGenerator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pyro2927%2FPlexNewsletterGenerator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pyro2927%2FPlexNewsletterGenerator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pyro2927","download_url":"https://codeload.github.com/pyro2927/PlexNewsletterGenerator/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pyro2927%2FPlexNewsletterGenerator/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272833298,"owners_count":25000870,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-30T02:00:09.474Z","response_time":77,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-19T09:44:13.541Z","updated_at":"2025-08-30T09:33:52.191Z","avatar_url":"https://github.com/pyro2927.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Plex Weekly Email Generator\n\nThis is greatly inspired by jakewaldron's [PlexEmail](https://github.com/jakewaldron/PlexEmail) project. I decided to make this for a few reasons:\n\n  * Python isn't my thing, Ruby is\n  * The configuration/settings of PlexEmail seemed too complex and over the top\n  * A smaller feature set felt easier to manage\n  * I didn't want to worry about uploading movie posters to imgur\n  * I wanted to run my email generator remotely\n\nNow you can generate and send weekly Plex emails with just two commands!\n\n    $ rake email:generate\n    $ rake email:send\n\n![](./screenshot.png)\n\n## General Info\n\n### email:generate\n\nThe script itself is pretty simple.  It connects to your Plex server and pulls a few pieces of information:\n\n  * The 4 most recently added movies (as recently released movies may not change often)\n  * The 4 most recently aired TV shows\n  * (Optionally) your movie pick of the week (specified by POTW in `.env`)\n\nThe information for those is then injected into the [Erubis](http://www.kuwata-lab.com/erubis/) `email.html.erb` template.  The completed email is written to `rendered.html`.  Posters for movies are pulled from [IMDB](http://www.imdb.com/), and TV shows from [The TVDB](http://thetvdb.com/).  The rest of the meta-data is pulled from Plex itself.\n\nYou can then send this right away, or modify it first, in case you want to add an announcement to the top or something of the sort.\n\n### email:send\n\nTakes `rendered.html` and sends it out via the specified SMTP server with the help of [pony](https://github.com/benprew/pony).\n\n## Setup\n\nAll configuration and setup is done through the `.env` file.  There is an included sample at `.env.sample`. Copy that to `.env` and update the values.\n\n### .env Keys\n\n`TVDB_KEY`: required to fetch TV posters.  Can be obtained at \u003chttp://thetvdb.com/?tab=apiregister\u003e.\n\n`PLEX_TOKEN`: used to connect to your Plex server's API.  How to obtain it can be found [here](https://support.plex.tv/hc/en-us/articles/204059436-Finding-your-account-token-X-Plex-Token).\n\n`PLEX_IP`: your Plex server's IP address.\n\n`PLEX_MOVIE_SECTION`: the ID of the library section that has your movies. Can be found with `rake plex:sections`.\n\n`PLEX_TV_SECTION`: the ID of the library section that has your TV shows. Can be found with `rake plex:sections`.\n\n`EMAILS`: the email addresses you would like to send your newsletter too, separated by spaces.\n\n`SMTP_ADDRESS`: the SMTP host you want to send emails through.  If you use [Mandrill](https://mandrill.com/), this will be `smtp.mandrillapp.com`.\n\n`SMTP_PORT`: self explanatory, defaults to 587.\n\n`SMTP_USER`: username.\n\n`SMTP_PASS`: password.\n\n`SMTP_DOMAIN`: the domain your email should appear to originate from.\n\n`POTW`: the movie title for your pick-of-the-week.  **Not required**.  If included, your newsletter will have the pick-of-the-week at the top of the email.\n\n### SMTP Server\n\nYou can use any SMTP server you want to send emails, though I find [Mandrill](https://mandrill.com/) quite easy to use, and you get 12,000 free emails a month.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpyro2927%2Fplexnewslettergenerator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpyro2927%2Fplexnewslettergenerator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpyro2927%2Fplexnewslettergenerator/lists"}