Coder Social home page Coder Social logo

youtube's Introduction

sphinxcontrib.youtube

license PyPi version

Overview

This module provides support for including YouTube, Vimeo and Peertube videos in Sphinx rst documents.

This module defines directives, youtube, vimeo and peertube which insert videos from the respective platforms. They take a single, required argument, which is the video ID:

..  youtube:: dQw4w9WgXcQ
.. vimeo:: 148751763
.. peertube:: 327a21b3-374e-4373-8b2c-494c9f5e1f19

Custom Server for peertube instances:

.. peertube:: 327a21b3-374e-4373-8b2c-494c9f5e1f19

   :instance: peertube.tv

For full usage information, please see the web documentation.

youtube's People

Contributors

12rambau avatar adityatoshniwal avatar aproeme avatar chrisjsewell avatar dham avatar drammock avatar eudoxos avatar jdillard avatar kianmeng avatar lukeschmitt-tr avatar mforbes avatar murmele avatar rkdarst avatar robpol86 avatar sfiera avatar tormodlandet avatar tunalobster avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

youtube's Issues

Pypi release of 1.3.0

currently very old 1.2.0 can be found on pypi as the latest.
Please release the latest to pypi.

And thanks by the way for the very helpful project

Wrapping text around around the video?

Thanks for this excellent tool!

Is there a way to make text wrap around the embedded video? One sided wrapping is all I need, i.e. if the video is aligned right or left.

Thanks again.

1.2.0 fails with "image not found"

Thanks a lot for this neat addon!

With 1.2.0, our docs would fails with

sphinx.errors.ExtensionError: Handler <function download_images at 0x7f4bf7164830> for event 'env-updated' threw an exception (exception: [Errno 2] No such file or directory: '/home/docs/checkouts/readthedocs.org/user_builds/zfit/checkouts/412/docs/_video_thumbnail/nGzyXVXfHnw.jpg')

where nGzyXVXfHnw is the youtube video code in the directive as

..  youtube:: nGzyXVXfHnw
       :width: 320

The whole build and failure can be found here.

With 1.1 it works

Please provide a LICENSE file

According to setup.py, license='BSD'.

However a LICENSE file is required.

... BSD ... special cases ... technically each one is a custom license, because each one has its own copyright line ...

Videos should not be embeded in EPUB files

Hi,

Thank you for the extension.
I am from pgAdmin4 team and we're creating docs with output as - HTML, EPUB and PDF. With this extension, HTML uses embedded and PDF shows links as expected. But, EPUB shows embedded which I think is not correct as EPUB is used for offline viewing. It should show a link just like PDF.
If I may raise a PR, are you willing to accept it to fix this?

Thanks.

Support twitch

It should be possible to support twitch as well?
If you can give me a couple of hints/guidance, I can open a PR to add the functionality.

New release

It would be nice to have a new release as I just hit #40 as well.

No module named 'urlparse'

Fresh pip install in conda environment:

Exception occurred:
  File "/home/ggarrett/miniconda3/envs/tudat-blog/lib/python3.8/site-packages/sphinxcontrib/youtube/youtube.py", line 3, in <module>
    import urlparse
ModuleNotFoundError: No module named 'urlparse'
The full traceback has been saved in /tmp/sphinx-err-8jj48cne.log, if you want to report the issue to the developers.

Dependency missing?

Trying to use it. But how to install it properly?

I am new to Sphinx. I want to use this with my Sphinx document. I've tried adding all these into my conf.py:

import os
import sys
#sys.path.insert(0, os.path.abspath('.'))
#sys.path.insert(0, os.path.abspath('./youtube-1.1.0'))
#sys.path.append(os.path.abspath('youtube-1.1.0'))
#sys.path.append(os.path.abspath('youtube'))
sys.path.append(os.path.abspath('sphinxcontrib'))
extensions = ['youtube']

But I am getting "ERROR: Unknown directive type "youtube" ".

Any help you can offer w/ how I should do the setup would be appreciated. Thanks.

pdf : thumbnail print at the wrong place

Dear all,

I have cloned your repository.
I tried to generate the hml and pdf documents.

For the html documentation, everything is ok as per the .rst file.

  • html

image

For the pdf file, the thumbnail is added at the next page

  • pdf

image

Update PyPI?

Hi,

Are there any plans to update the package available on PyPi? The current one is from 2015.

Thanks

publish to pypi

Please publish the latest version to pypi and extending support for newer python versions

status_iterator alias is deprecated

During a local build I hit this warning today:

/opt/mambaforge/envs/mnedev/lib/python3.10/site-packages/sphinxcontrib/youtube/youtube.py:3: RemovedInSphinx80Warning: The alias 'sphinx.util.status_iterator' is deprecated, use 'sphinx.util.display.status_iterator' instead.

I'll open a quick PR

the position becomes absolute when setting the width

I want to have an video responsive to my page size (use size in percent instead of pixels) and I want to have it centered.

I naively did the following:

.. youtube:: niOUVE8N7wo
    :align: center
    :width: 80%

And by setting the width I've lost the center alignement:

image

No CI

Currently there are no tests. This really needs to be fixed...

support align parameter as for the Image directive

Before discovering this extention, I was using an adaptation of the following gist. It was supporting the align parameter the same way as the image directive and moving to this lib is making all my youtube directive crash.

Do you think you could add this parameter to the directive?

It seems that @LSinterbotix has already opened a PR in this sense, do you think it's sufficient or does it require extra work ?

:privacy_mode: has no effect

Using sphinxcontrib-youtube==1.2.0 and code like this:

.. youtube:: zMAc-UyO0NA
   :privacy_mode:

But the :privacy_mode: parameter does not seem to work, the generated URL is not using the privacy URL. The generated HTML is

<iframe allowfullscreen="true" src="https://www.youtube.com/embed/zMAc-UyO0NA" style="border: 0; height: 345px; width: 560px">
</iframe>

document installation

THe documentation doesn't explain how to install the lib which is not straight forward (sphinxcontrib.youtube)

Show youtube thumbnail on latex export

Currently, the plugin only show a URL link to the YouTube video.

It will be awesome if the plugin could show:

The Thumbnails,ย 
The title
the link URL

All centered and clickable.

use a thumbnail in the latex output

In the current build of sphinxcontrib.youtube, the videos are displayed in the latex output as a link to the video.

Checking on the web I realize that the thumbnail image can easily be acceced so instead of a link the latex output could be a figure with the youtube thumbnail, the title and the link as caption.

I'm happy to make a PR if you guys think it could be useful.

PS: I also check vimeo for the sake of it and it seems to work more or less the same way

Request: add configuration variable to block thumbnail downloading

Would you consider making the new v1.2.0 thumbnail downloading optional? It appears to be happening even when the build target is HTML, even though there do not appear to be any thumbnail references in the generated HTML.

I use your plug-in to generate course sites with hundreds of YouTube and Vimeo links in my reference material, so the downloading represents a huge overhead on any clean build. Branch 1.1.0 builds super-fast without this feature.

Support youtube playlist

Heya, would you support having a youtube-plist directive?

.. youtube-plist:: XYZ

The embedding HTML is essentially the same, but using the playlist shortcode like: https://www.youtube.com/embed/videoseries?list=XYZ

If yes, then I can probably make a PR

Support timestamping

It would be nice to support an option such as :timestamp: 12520 which appends ?t=12520 to the embed URL.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.