-
Notifications
You must be signed in to change notification settings - Fork 101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create a meme generator extension #8
Comments
checks date. Nope, it's not April 1st. So I guess this is really happening. 👍 Proposed syntax:
The catch will be to properly identify the meme_id used by memegenerator, as we don't want to build a list of aliases, do we? (how can we keep up with new memes popping up?) |
I think url of image will be more flexible than meme_id. Can be usable outside of scope of memegenerator and won't have the watermark. |
it depends on the meme generator service to be used by the |
😉 @aalmiray I think you definitely have the right idea. The meme_id could be an id or a URL, and the extension can be smart about what to do. We could also default to English if language isn't specified. Remember, we can use positional attributes to make it shorter...and quotes are only required if there's a comma in the content.
If we get the meme_generator gem working again, it queries for a list of meme characters, so you can always pull it from the commandline. Actually, the list still works, the generator just fails. |
Wait a second, why you need a service at all? All you need is image as a bg to write on top of it in caps impact bold font. Can't we do it without a service? |
@jbaruch: Ugh, no. I don't want to deal with an image manipulation library that requires a local gem to work. @mojavelinux: a downside of using a service is recreating the same image with every build, unless some kind of caching/verification is put in place. Agreed on making English the default lang; I was just stating some of the options that may be used ;-) |
Absolutely we can. mini_magick (works on Ruby and JRuby). In fact, I just implemented something similar for doing the covers for NFJS, the Magazine. See, real work enables play! https://github.com/opendevise/editions/blob/master/lib/editions/cover_annotator.rb |
@jbaruch: on the plus side you can use any image you'd like, not just those available in the memegenerator service. I guess a local generator also solves the problem of duplicate images being uploaded. The other downside I see is grabbing the images in the first place. I guess we can't win them all :P |
Good news. The caching stuff is already implemented as part of Asciidoctor Diagram. That's why I think we could actually build on Asciidoctor Diagram APIs to make this extension...at least handle all the outer parts of managing the image and cache. |
I'd start with using the service, then add the local build as the code matures. hahaha, meme code maturing...isn't that an oxymoron? Or just a moron? |
methinks we need a new meme for this case 😸 |
It's a shame ruby doesn't have a graphics api in the std lib. If depending on Java is ok, this kind of code is pretty trivial to write with Graphics2d. The only downside is that you're going to have to provide a URL to the base image; beyond that the syntax can be the same as what was proposed above. The memegenerator.net service doesn't seem to be very reliable. I was browsing it a bit and I get lots of timeout errors. |
This is now implemented in Asciidoctor Diagram. Shall we close this issue? See https://github.com/asciidoctor/asciidoctor-diagram#the-meme-extension
|
The diagram implementaties does the image processing locally though. I had a look at using existing generator services but I couldn't figure out how to make those work without either having to do a search query (and possibly using the wrong image) or specifying the base image via its numeric id. Both seemed rather impractical. |
That's how the YouTube and Vimeo support work, so it's certainly not a foreign concept in the ecosystem. |
Let's ruin the internet. R U with me?
The text was updated successfully, but these errors were encountered: