Skip to content

mweagle/SpartaCast

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SpartaCast

Serverless application that creates a podcast feed from Markdown user input. Episode content and configuration is defined in per-episode Markdown files and rendered to speech using AWS Polly. Polly supports SSML Tags which can be represented in a Markdown

```html
  <speak>
    <amazon:domain name="news">Can you believe it!</amazon:domain>

  </speak>
```

Podcast metadata is defined in a reserved feed.md file at the root of an S3 bucket and must include the necessary tags.

Usage

> go get -u -v ./...
> go run main.go provision --s3Bucket $MY_S3_BUCKET

Trigger

  1. Create a feed.md file and copy it to the user content bucket.
  2. Create one or more episodeN.md files and copy them adjacent to the feed.md file.
  3. Monitor results in the Step Functions Console
  4. Add the public S3 URL to the /public/feed/feed.xml to your favorite podcast player.

Details

The application provisions two S3 buckets, one for user assets and the other for CloudTrail logs.

The CloudTrail bucket is used to create a Trail that can be used to directly trigger an StepFunction from an S3 event. This bucket includes cloudtrailstorage in the name.

The user asset bucket includes eventbucket in the name and is used to store user content. The bucket keyspace is partitioned into the following scopes.

  • / (root) PRIVATE
    • Source user content
    • Examples: feed.md, episode1.md
  • /public PUBLIC
    • /feed
      • Generated podcast
      • Polly generated MP3s
    • /metadata
      • Intermediate metadata files

When a new episode.md is uploaded to the event bucket, it triggers a CloudTrail event, which is subscribed to by the EventPattern rule that then invokes, via EventBridge, the rendering and feed generation Step function:

See the lambda.go source file for the full set of recognized properties.

To see the full CloudFormation template, run:

> go run main.go describe --s3Bucket $MY_S3_BUCKET --out graph.html
> open graph.html

Markson Configuration

The Markdown configuration represents a flat Key-Value space. Key-Value pairs can be represented in two different ways:

  • An H1 keyname, whose entire content represents the value.
  • A reserved H1 header named Properties that can represent multiple Key-Value pairs in a Markdown table. See the sample files in /media.

About

Serverless Podcast generation from Markdown and AWS Polly

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages