“Tweet of the Day” added to slashie.net

Added a component to my project’s website called “tweet of the day”, it picks a project from the list and then formats its data as a tweet.

totd

At some point in the future I might set it up so that the tweet is done automatically, for now, I myself am copying it, editing it (sometimes picking a better URL than it currently does), tagging contributors correctly, etc. All these things I might automatize sometime.

In order to give each project a fair chance of appearing, and not repeating projects too often, I’m shuffling the projects using seededshuffle, and then picking one based on the day of the epoch.

const ss = require('seededshuffle');
projects = ss.shuffle(projects, 'patienceIsTheKey', true);
const now = new Date();
const fullDaysSinceEpoch = Math.floor(now/8.64e7);
project = flatProjects[fullDaysSinceEpoch % projects.length];

As an added thing, when it picks a project that is currently unavailable, I’m trying to come up with at least a gameplay video or something that shows what it was like. Right now there are lots of dead links in the page (naturally).

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s