Skip to main content

A plugin for Python-Markdown that allows you to embed media files as in Obsidian.

Project description

Obsidian media embedder

Made by Ukrainian License

This is an extension for Python-Markdown which allows you to embed audio or video files as easily as images by simply writing:

![my song](assets/music/my-last-song.mp3)
![my video](assets/video/interview.webm)

Additionally, this plugins allows to specify an image size the Obsidian way, e.g.:

![400x300](assets/images/photo.jpg)  <!-- width and height -->
![400](assets/images/photo.jpg)      <!-- only width -->

Supported formats are:

  • Images: avif, bmp, gif, jpeg, jpg, png, svg, webp.
  • Audio: mp3, wav, m4a, ogg, 3gp, flac.
  • Video: mp4, webm, ogv, mov, mkv.
  • Other: md, pdf not yet.

MkDocs

It can be used with MkDocs as following:

# mkdocs.yml
markdown_extensions:
  - obsidian_media

For the best results, I recommend using it together with my mkdocs-obsidian-bridge. This would allow you to simply write:

![[assets/audio/my favourite song.mp3]]
![[assets/video/birthday party.mov]]

![[images/photo.jpg|400x300]]
![[images/photo.jpg|200]]

Credits

This extension is heavily inspired by orobardet/pymarkdown-video and motivated by @pipe-organ in GooRoo/mkdocs-obsidian-bridge#17.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

obsidian_media-1.0.0.tar.gz (10.5 kB view details)

Uploaded Source

Built Distribution

obsidian_media-1.0.0-py3-none-any.whl (5.2 kB view details)

Uploaded Python 3

File details

Details for the file obsidian_media-1.0.0.tar.gz.

File metadata

  • Download URL: obsidian_media-1.0.0.tar.gz
  • Upload date:
  • Size: 10.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.14

File hashes

Hashes for obsidian_media-1.0.0.tar.gz
Algorithm Hash digest
SHA256 c113a33dbe9299fe73b309287bf46fed93ac5a98bb686224681a967ded711954
MD5 50846956b7afa21db54eeb798f0908d3
BLAKE2b-256 86aec0c8bf4ff20b62a998079f13be018da569fe75f8f95343a975fddb867036

See more details on using hashes here.

File details

Details for the file obsidian_media-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for obsidian_media-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f4f0e1d1abba30e4ee0c50b7968885f71dd2d74a8230c2c43c9807a0654881c7
MD5 f55ee8cd839966c29f20b50f4d9d74c3
BLAKE2b-256 0ca9c84ed442d3ee0271396c557d46f935fa05416b4908c77bb2c46b7e8b4c16

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page