npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

s3-podcast

v0.0.4

Published

A package for easily publishing podcasts using [Amazon S3](https://aws.amazon.com/s3/).

Downloads

4

Readme

S3 Podcast

A package for easily publishing podcasts using Amazon S3.

Example usage:

const s3Podcast = require("s3-podcast");

const data = {
  title: "Literature Podcast",
  description: "The first paragraph from popular books.",
  items: [{
    title: "Alice in Wonderland",
    description: "Lewis Carroll",
    localPath: "./alice.mp3",
    pubDate: new Date("2006-11-11T00:00:00Z")
  }, {
    title: "A Tale of Two Cities",
    description: "Charles Dickens",
    localPath: "./cities.mp3",
    pubDate: new Date("2014-03-30T00:00:00Z")
  }]
};

const bucketName = "podcast-test";
s3Podcast(bucketName, data);

In this example, the URL of the podcast will be https://s3.amazonaws.com/podcast-test/feed.rss (since the bucket name in this case is podcast-test).

Installation and Setup

You can install the package using npm:

npm install s3-podcast

This package wraps the AWS SDK for Node.js. Before using this package, you'll need to provide the SDK with a valid set of credentials. This is typically done by creating a file at ~/.aws/credentials (on Mac/Linux) with a format like this:

[default]
aws_access_key_id = your_access_key
aws_secret_access_key = your_secret_key

Amazon's documentation provides more comprehensive instructions for configuring the SDK.

Usage

s3Podcast(bucketName, config, [logger])

bucketName

If bucketName doesn't exist, the function will attempt to create it.

Note that S3 bucket names must be universally unique, so you'll need to choose a name that isn't already being used.

config

The config object has the following schema:

  • title
  • description
  • items: an array of item objects (see below)

Each item has the following schema:

  • title
  • description
  • localPath: the path to the audio file, relative to the current directory
  • pubDate (a Date instance)

[logger]

The optional logger argument, if specified, should be an instance of a winston logger. (Or something that implements a compatible interface.)

Development

To develop against this repository, run npm install from the repository root to install development dependencies.

Tests cover generating a podcast and staging that podcast to an S3 bucket, so you'll need to follow the Installation and Setup instructions first.

To run tests:

S3_PODCAST_TEST_BUCKET_NAME=some-bucket npm test