Skip to content

szabgab/perltv.org

Repository files navigation

The code behind http://perltv.org/

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


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


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/fetch.pl https://www.youtube.com/watch?v=abcdef

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 fetch.pl script. Not really used now.
  favorite_count:  number               As counted on YouTube. Filled by the fetch.pl 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: http://www.reddit.com/r/perl
  Perl Developers on Facebook: https://www.facebook.com/groups/100858186649890/
  GooglePlus (of the Perl Weekly) https://plus.google.com/+Perlweekly
  Twitter (of the Perl Weekly) https://twitter.com/perlweekly
  Many of the videos are also included the Perl Weekly newsletter.

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


Languages
---------

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/Tools.pm
(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/PerlTV.pm . Search for 'redirect'.  Updating this need s server restart.
(TODO: this should be move to some config file)


Copyright and License
---------------------

PerlTV.org - 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):
http://creativecommons.org/licenses/by-sa/3.0/deed.en_US

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


Notes
-----

vimeo API: https://developer.vimeo.com/apis/simple#video-request
http://vimeo.com/api/v2/video/video_id.output
where the "video_id" is something like 77267876 
and the "output" is json, php or xml



TODO
-----

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"

/module/Module::Name
           A quick description of the module (fetched from MetaCPAN)
           and the list of videos mentioning that module.
/tag/TAG
           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)
   source
   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?
  https://developers.google.com/youtube/js_api_reference

- 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 http://www.confreaks.com/

?- 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:
  http://www.presentingperl.org/
  http://yapc.tv/

- 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.

  English
    - video
    - video
  Hebrew
    - video
    - video
  etc.

NOT TODO
---------

- 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: https://developers.google.com/youtube/js_api_reference



http://www.techtalkshub.com/perl-web-love-story/


Look at Google Data API v3.0 to see if we can use it
https://developers.google.com/youtube/getting_started#data_api