Bitbucket is a code hosting site with unlimited public and private repositories. We're also free for small teams!

Close

The code lives at http://bitbucket.org/cliff/rstyoutube. Bug reports, feature requests, and contributions are all welcome. If you find the code useful, hop on bitbucket and send me a quick message letting me know.

Usage

To use with pelican or another docutils-based system, add the following to your pelican configuration file:

import rstyoutube


To use rstyoutube in standalone rst files, you can use the included rst2html+youtube.py script, which should get installed onto your PATH.

In your reST document, include a youtube directive with the video's id as the sole argument as follows:

===============
===============

This is my document

Hope you enjoyed the video.


That's all it takes.

Options

If you want more fine-grained control, you can add various options:

.. youtube:: 5blbv4WFriM
:start: 67
:width: 640
:height: 480
:ssl:
:hd:


start

The number of seconds into the video where you want to start playback.

width / height

The size of the embedded viewer. Defaults to 640x480, or if the hd option is set, defaults to 1080x720.

ssl

This option takes no arguments. If it is present, the player is embedded over https, rather than http.

hd

This option takes no arguments. If it is present, the embedded video is shown in HD. The player's default size becomes 1080x720, but can still be overridden using the width and height options.

Initial release

To Do

• Add options to allow people to customize their videos.

Recent activity

Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.