# pymarkdown-video
Extension for [python-markdown](https://python-markdown.github.io/), that will convert markdown picture that are vide
file into the HTML5 `video` tag instead of the `img` tag.
## Example
```markdown
![Big Buck Bunny](http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4 "Big Buck Bunny video")
```
will be rendered as
```html
<p>
<video alt="Big Buck Bunny" controls="controls" title="Vidéo de Big Buck Bunny">
Your browser does not handle the video <a href="http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4">http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4</a>
<source src="http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4" type="video/mp4"></source>
</video>
</p>
```
## Usage
```shell
pip install pymarkdown-video
```
```python
from markdown import Markdown
text = '![Big Buck Bunny](http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4 "Big Buck Bunny video")'
md = Markdown(extensions=['pymarkdown-video'])
print(md.convert(text))
```
You can also use it with [MkDocs](https://www.mkdocs.org/).
After installing the package with pip, in your `mkdocs.yml`, add:
```yaml
markdown_extensions:
- pymarkdown-video
```
Raw data
{
"_id": null,
"home_page": "https://github.com/orobardet/pymarkdown-video",
"name": "pymarkdown-video",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3",
"maintainer_email": null,
"keywords": "markdown image video",
"author": "Olivier Robardet",
"author_email": "olivier.robardet@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/d9/ca/0b498cd32568482719de2efe3a469e8db4477aa64d191a5d16d1ed7e9039/pymarkdown-video-1.1.0.tar.gz",
"platform": null,
"description": "# pymarkdown-video\n\nExtension for [python-markdown](https://python-markdown.github.io/), that will convert markdown picture that are vide\nfile into the HTML5 `video` tag instead of the `img` tag.\n\n## Example\n\n```markdown\n![Big Buck Bunny](http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4 \"Big Buck Bunny video\")\n```\n\nwill be rendered as\n\n```html\n<p>\n <video alt=\"Big Buck Bunny\" controls=\"controls\" title=\"Vid\u00e9o de Big Buck Bunny\">\n Your browser does not handle the video <a href=\"http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4\">http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4</a>\n <source src=\"http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4\" type=\"video/mp4\"></source>\n </video>\n</p>\n```\n\n## Usage\n\n```shell\npip install pymarkdown-video\n```\n\n```python\nfrom markdown import Markdown\n\ntext = '![Big Buck Bunny](http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4 \"Big Buck Bunny video\")'\nmd = Markdown(extensions=['pymarkdown-video'])\nprint(md.convert(text))\n```\n\nYou can also use it with [MkDocs](https://www.mkdocs.org/). \nAfter installing the package with pip, in your `mkdocs.yml`, add:\n\n```yaml\nmarkdown_extensions:\n - pymarkdown-video\n```\n\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Render video tags in python markdown for images that are video",
"version": "1.1.0",
"project_urls": {
"Homepage": "https://github.com/orobardet/pymarkdown-video"
},
"split_keywords": [
"markdown",
"image",
"video"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "d9ca0b498cd32568482719de2efe3a469e8db4477aa64d191a5d16d1ed7e9039",
"md5": "3a94d855994dc7ffb6b4b7f55fa2a22f",
"sha256": "fc14a485407ef8fd22f76d789066d2e9cf79c74d05b7f6831d6c102b10a39039"
},
"downloads": -1,
"filename": "pymarkdown-video-1.1.0.tar.gz",
"has_sig": false,
"md5_digest": "3a94d855994dc7ffb6b4b7f55fa2a22f",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3",
"size": 3177,
"upload_time": "2024-06-12T15:52:06",
"upload_time_iso_8601": "2024-06-12T15:52:06.224327Z",
"url": "https://files.pythonhosted.org/packages/d9/ca/0b498cd32568482719de2efe3a469e8db4477aa64d191a5d16d1ed7e9039/pymarkdown-video-1.1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-06-12 15:52:06",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "orobardet",
"github_project": "pymarkdown-video",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "pymarkdown-video"
}