- Elisp client for imgflip
- Snippets for org-mode that allow users to easily embed memes in their org files.
This plugin is not currently available on any repository, so the simplest way to install is via straight.el.
(use-package imgflip.el :straight (imgflip.el :host github :repo "iocanel/imgflip.el")
:custom (imgflip-download-dir "~/.imgflip" "Where my images will be downloaded"`)
:config
(setq imgflip-username "< your username >"
imgflip-passowrd "< your password >"))Using the function below you will get an alist with the top templates description and id’s
(imgflip-get-top-templates)(imgflip-download-caption-image "<template id>" "<Top text (text0)>" "<Bottom text (text1)>")To make it easier, the function can work without a template id, by passing a `template query string`. This will only work for templates in the `Top 100` list. Matching of the quesry string is done based on the most common words between the string and the template description.
(imgflip-download-caption-image "Morpheus" "What if I told you..." "that it works even without a template id?")An `imgflip` snippet is also provided for `org-mode` that gets as field values:
- The template id or query string
- The top text (text0)
- The bottom text (text1)
And expands to an org link to the downloaded image. Once the expansion is complete, the linked image will also be displayed.
For example:
`imgflip` with the following fields:
- Morpheus
- What if I told you?
- that once your press tab the meme will be added to your buffer?
will expand to:
#+CAPTION: Morpheus - What if i told you / that once you press tab the meme will be added to your buffer?
[[~/Downloads/imgflip/Morpheus-What-if-i-told-you-that-once-you-press-tab-the-meme-will-be-added-to-your-buffer?.jpg]]