The source code of the Perl TV
Perl CSS JavaScript HTML
Fetching latest commit…
Cannot retrieve the latest commit at this time.


The code behind

The objective of is to collect, tag, annotate, and distribute good, Perl-related videos.

How to run the server?
* cpanm  --installdeps .     (Install the prerequisites)
* perl bin/    (will create a bunch of json files)
* perl bin/            (or plackup bin/

Contributing videos?

* Fork and clone this repository.
* Add files
* Send pull request

* Add files to the data/ directory.
  Each video is described in a single file in the data/videos/ directory.
  The file names will be the page URLs. We prefer to use dash (-) to separate words in the URL rather than (_)

In order to reduce the manual work, running 

    perl bin/

will create the skeleton file for the video. Some fields will need to be changed and filled. Even the filename might need to be changed.

* Fields in the video files:
  id:              The ID on YouTube, Vimeo or other video sharing sites
  src:             [youtube|vimeo|ustream]    (the type of the source where the video is hosted)
  title:           What wi
  speaker:         file-name            the name of a file in the data/people directory, usually the full name of the speaker.
  source:          file-name            the name of the source (usually event) where the talk was given. in the data/sources/ directory.
  view_count:      number               As counted on YouTube. Filled by the script. Not really used now.
  favorite_count:  number               As counted on YouTube. Filled by the script. Not really used now.
  length:          MM::SS               The length of the video.
  date:            YYYY-MM-DD           The date when the video was recorded. (Approximate if you don't have the exact date)
  format:          markdown             Should be always markdown. Probably we should not need that field at all and just let
  featured:        YYYY-MM-DD           Added later. See below.
  modules:         M::N, Module::Name   A list of CPAN modules mentioned in the talk
  language:        [he|nl|de|...]       The language of the video, Currently we don't use this field if the video is in English.
  tags:            tag, tag             Comma separated list of keywords
  abstract:        URL                  Link to the original announcement of the talk (if it is available)

After the header fields there should be a __DESCRIPTION__ string at the beginning of a line. Everything below this mark
will be included as the body of the text on the video page. The format of the text is declared in the "format:" field
above.  (I am not sure if we need to allow anything else or markdown is enough?)

For YAPC talk this can be based on the YAPC talk descriptions - if they are available.

If you can, write a summary of the video, or if you really have time, create a transcription. Not everyone can hear well, and not everyone can
easily understand the spoken English.  It also makes the site more searchable.

Featured videos
Once in a while (not more than once a day, to allow people to watch) we can 'feature' a video by
adding the 'featured:' field to the video file.
This will put the video on the front page of the side and include it in the RSS feed. 
This should be done after the video was annotated (by adding text and links to the __DESCRIPTION__) and tagged.
We should use this opportunity to distribute the URL of this video. Currently only English videos should be featured.
(TODO: create separate RSS feed for featured  videos in other languages? Separate main page for videos in other languages?)

Places where we can promote the featured English video:
  Reddit Perl channel:
  Perl Developers on Facebook:
  GooglePlus (of the Perl Weekly)
  Twitter (of the Perl Weekly)
  Many of the videos are also included the Perl Weekly newsletter.

Videos in other languages can probably have other, more relevant channels.


While most of the videos are in English, we have started to add videos in other languages as well. In order to mark the language of
the video we have a field called 'language:'. A mapping of the languages is currently hard-coded in lib/PerlTV/
(TODO: should be in some external file?)
(TODO: probably there should be pages listing all the videos in a specific language)

Renaming video files
After a video was uploaded we would probably want to make sure incoming links are not going to be broken. So if we want to change
the name of the video file (and thus the URL) we should also set up redirection. Currently redirection is done
using hard-coded Dancer routes in lib/ . Search for 'redirect'.  Updating this need s server restart.
(TODO: this should be move to some config file)

Copyright and License
--------------------- - Copyright Gabor Szabo

License of the source code:
The same as Perl 5.10

License of the data/ files (the content of the web site):

Copyright and License of the videos - their respective authors
See the original site for each video.


vimeo API:
where the "video_id" is something like 77267876 
and the "output" is json, php or xml


Plan for hierarchy:
/v/        one page for each video
/source/   one page for each "source" such as
           "YAPC::NA 2013", or "Salt Lake Perl Mongers"
           or "
           or "Perl Maven Interviews"

           A quick description of the module (fetched from MetaCPAN)
           and the list of videos mentioning that module.
           list of videos having that tag

/people ??? There are speakers at conferences,
     there are interviewers, there are interviewees,
     there might be several participants in a round-table discussion
     or several speakers in a single video.
     For each person create a page with their name, some links,
     and a list of talks. (have the twitter account a G+ link in data fields)

The lists of talks should include
   title, link,
   speaker (or people involved)
   short description

- On the page of the video, when the video is finished display something 
  else and not the default "select a video" option of YouTube.
  Show another random video, or show some info page?

- Create a logo for the site and a favicon.

- Script to update data from youtube and vimeo (probably only viewer count and likes) 

- Take idea from

?- Allow people to up vote videos using their YouTube account on youtube

- Add comments ? (Disqus could be used as a start)

- Add keyword/module search.

- Integrate videos from other sources:

- Languages:
  As an experiment add a video in Hebrew, and then ask for help to add videos
  in other languages as well.

Thinking aloud:
  Have each video as /v/video-name     and inside the video have a field defining
   the language of the talk (language=he  meaning Hebrew)  There are going to
   be videos having the same subject that were given in multiple languages
   so the video-name might still need to cover. YouTube and Vimeo can handle that :)
   But they both have cryptic URLs and I'd like to have meaningful ones.
  /v/he/video-name    clear indication on the URL as of language,
  There can be duplicate videos with the same title anyway and we'll have to
  map them to different video-names even if both are in English.

  What about the /module, /module/Module-Name   /tag /tag/TAG   pages?
  Should we Filter them based on language, or is it ok for now to keep all the
  videos in the list and indicate the language on the page (Eg.

    - video
    - video
    - video
    - video


- Check if we could display some other picture in place of the video before
  even it starts. (e.g. some information about the site?

- The front page should have a large thumbnail of the current video
  The real content including the video will be only on the internal pages only.

  Automatically starting the replay will not be counted by YouTube so we cannot have
  a link on the front page to the specific page and autostart the video there. :(
  Therefore we keep the video on the front page.
  See the update here:

Look at Google Data API v3.0 to see if we can use it