https://github.com/polm/bontan
Get embed code for a link, using OEmbed as appropriate.
https://github.com/polm/bontan
oembed
Last synced: 5 months ago
JSON representation
Get embed code for a link, using OEmbed as appropriate.
- Host: GitHub
- URL: https://github.com/polm/bontan
- Owner: polm
- License: wtfpl
- Created: 2020-05-30T05:53:04.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2020-05-31T07:48:39.000Z (about 6 years ago)
- Last Synced: 2025-10-31T16:07:33.147Z (8 months ago)
- Topics: oembed
- Language: Nim
- Size: 415 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# bontan
A program to generate html embeds from URLs. You might want to use this to
generate embeds in a static blog without losing the source URL.

Photo by [Phoenix Han](https://unsplash.com/@phienix_han) on Unsplash
This just takes the URL, checks for a link to JSON OEmbed data, and pulls the
embeddable HTML out of that. That's simple but it works for YouTube, Vimeo, and
Twitter.
## Usage
You don't have to specify a width and height, but you can to get appropriately
sized content from the provider.
Usage:
getEmbed [required&optional-params]
Options:
-h, --help print this cligen-erated help
--help-syntax advanced: prepend,plurals,..
-u=, --url= string REQUIRED set url
-w=, --width= int -1 set width
--height= int -1 set height
Example:
./bontan -w 700 -u https://www.youtube.com/watch?v=tgdY9k5_nEU
Output:
## To Build
bontan is written in Nim. If you have nim and nimble installed:
nimble build
Should do it.
## License
WTFPL, do as you please.