Skip to content

Simple django app for publishing YouTube videos at specified times.

License

Notifications You must be signed in to change notification settings

nrkbeta/youtube_timer

Repository files navigation

YouTube Tea Timer

A simple Django application for publishing videos in the future.

Used by The Norwegian Broadcasting Corporation to postpone airing of YouTube-videos until they've aired on the regular TV Channels.

Requirements

Setup

  • add youtube_timer to your INSTALLED_APPS

  • you need to set the following in your settings-file:

    • YOUTUBE_USERNAME : your YouTube-username
    • YOUTUBE_EMAIL : your Google Account email
    • YOUTUBE_PASSWORD : your Google Account password
    • YOUTUBE_APP_ID : doesn't really matter that much, just use 'youtube-tea-timer'
    • YOUTUBE_APP_LABEL : Use the same name as you used when signing up for the developer key
    • YOUTUBE_DEVELOPER_KEY : Your developer key
  • add (r'^your_endpoint/', include('youtube_timer.urls')) to your urls.py

  • run syncdb

Usage

Simple: Once setup, go to the URL where you've included youtube_timer, and login. From here it's simple to create a new timer.

Management command

There's a management command that's useful in a cron setting. It publishes all jobs that are over their time limit. We run a cron job every minute like this:

* * * * * /path/to/app/youtube_timer/cron.sh

…where cron.sh is a simple wrapper like this (we use this because of our weird env, you might get away with running it directly):

#!/usr/local/bin/bash
DJANGO_SETTINGS_MODULE='project.settings'
export DJANGO_SETTINGS_MODULE

PYTHONPATH=/my/special/path/to/libs
export PYTHONPATH

/usr/local/bin/python /my/special/path/to/libs/project/manage.py run_youtube_timer

About

Simple django app for publishing YouTube videos at specified times.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages