Conversation
@mwmiller The source is this file. It looks like it's based on the informartion from Mincraft XL. Yes, I forgot to ask about the hotlinking of the images. Keep me updated 😃 |
@larseng I saw that you had the source listed on your forum post. It would be nice to have in the code itself so:
I have some working, but as yet unmerged, code which will allow goodies to serve images out of their |
@mwmiller Absolutely, but I'm not sure if I understand where you want me to put the attribution? In the attribution-part in Minecraft.pm? Cool! Just let me know, shouldn't be a problem. |
Yep, see the CallingCodes goodie for an example. Most goodies don't not have "non-code sources", so I'm not surprised you were unaware of this attribute.
Well, it's a bit different use-case than my current example. I don't think we'd want to preemptively cache all of the possible minecraft images in the perl process, so it may actually lead me to pursue a slightly different architecture. May we live in interesting times. 😁 |
Actually, what about simply trigger on Minecraft? I think many would search for "minecraft tnt" to get the recipe, which is also the first answer. |
code_url 'https://github.com/duckduckgo/zeroclickinfo-goodies/blob/master/lib/DDG/Goodie/Minecraft.pm'; | ||
attribution | ||
web => ['http://engvik.nu', 'Lars Jansøn Engvik'], | ||
github => [ 'larseng', 'Lars Jansøn Engvik']; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I admittedly suck at knowing the answers to these kind of questions:
Would this be safer (for our ability to be sure we get the attribution correct) with use utf8;
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Honestly, I have no idea either 😄 Haven't been mentioned in my earlier contributions as far as I know.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI, I now believe this is actually a problem, based on the trouble @jarmokivekas noted with the attribution on his contributions.
@russellholt @MariagraziaAlastra @jagtalon Do we know if use utf8
in these sources will help with the attribution on the IA pages?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mwmiller I am having utf8 issues with these, so maybe so. it's worth trying, I hadn't considered this.
@mwmiller How does this look? I'm no regex-master, but it works 😄 It can now trigger on:
|
@mwmiller for proxying images I believe you should use URLS like this (stolen from Currency in the Spice Repo): |
@mintsoft I'm not sure if that is available and recommended for general-purpose images. |
@mwmiller Ah, man, you're right. That might be a solution. I'll look further into it. |
Neither am I! |
@larseng @mwmiller @mintsoft regarding the image proxying, @mintsoft was correct please route them through It's just a general proxy for images that prevents the client from making a direct request to the host. We have other proxies as well for other types of content (audio for example). They should always be used whenever content needs to be requested by the client :) |
I'm kinda swamped these days, but I will get back to this PR as soon as I can. Sorry for the inconvenience. |
No problem @larseng , I'll label the PR as "On Hold" for now. |
So, I tried @mwmiller suggestion with using a list of good and bad words. It worked okay, but the problem is that we have recipes called I've looked through the recipes and I think these two are the only ones that would cause any trouble. What I ended up doing was to strip "okay words" ( |
"name": "Firework Rocket", | ||
"image": "http://www.minecraftxl.com/images/wiki/recipes/firework-rocket-crafting.gif", | ||
"ingredients": "Gunpowder + Paper + Firework Star", | ||
"description": "Firework that can be launched into the sky and explore. Adding more gunpowder increases the duration of the rocket. Up to three gunpowder can be used. Multiple firework stars can also be used, in which case all will go off simultaneously when the rocket d" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, @larseng! It looks like the description here was cut off?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey, @jagtalon! You're right. The source also have this cut off and the same over at MinecraftXL. I think I've found the complete text, so I'll drop the creator of the json-file an e-mail and update this.
Right again, @jagtalon. Didn't find the missing descriptions as easy as the first one. I'll look furhter into it. |
@larseng Thanks! |
Tried contacting MinecraftXL, but haven't heard from them yet, @jagtalon. Or from the author of the JSON-file either. Finding a suitable description wouldn't be hard, but the source would differ from the file we use (well, it already does because of the Firework Rocket update). |
@abeyang Sure 😄 I'll look into the recipe linking and see what I can do. Still havent't heard from any of the sources, so I'll just update them myself. |
Happy New Year @larseng Any update on this? 😄 |
Hi and happy new year! Sorry, been busy during the holidays, but I'll get to it this weekend. Actually got an reply from MinecraftXL as well, but still no updates. |
@larseng No problem! Great to hear you received a reply from MinecraftXL. I'm really looking forward to seeing this Goodie live 😄 |
@larseng Thanks! Putting it up on a server for final review! |
@larseng It looks really good. Just one more thing--the image is too close to the text. Is it possible to add a little spacing? Thank you! |
👍 |
Goodie: Minecraft crafting recipes.
Nice 😄 |
@larseng it's looking better! However, can we make the following changes so it'll more look like this: Changes:
Finally, we should be using the standard template classes, like the title should be zci__header and the description should be zci__content. Maybe @jagtalon can help you with that? Thanks! Almost there! |
@larseng I can make a PR for these changes and get it out as soon as I can! |
@jagtalon Thanks, that would be great as I can't get to this until sunday at earliest. |
Hey guys, I'm moving the design updates to an issue. Hopefully someone from the community can tackle this! |
@larseng congrats! It's live: https://duckduckgo.com/?q=how+do+i+craft+a+cake+in+minecraft&ia=minecraft Thanks again for taking the time to contribute! We really appreciate it. Feel free to stick around and comment/help on other PR's & Issues or even submit more Instant Answers! |
Apologies for the long delay, we used this IA as a candidate for the new Goodie templates. It was the first live Goodie to use the new templates! |
What does your Instant Answer do?
Return the crafting recipe for something that can be crafted in Minecraft.
What problem does your Instant Answer solve (Why is it better than organic links)?
A faster and cleaner answer.
What is the data source for your Instant Answer? (Provide a link if possible)
A static file.
Why did you choose this data source?
It contains most of the recipes.
Are there any other alternative (better) data sources?
No, not that I know of.
What are some example queries that trigger this Instant Answer?
ladder in minecraft
minecraft craft tnt
Which communities will this Instant Answer be especially useful for? (gamers, book lovers, etc)
Minecraft players.
Is this Instant Answer connected to a DuckDuckHack Instant Answer idea?
Yes, this.
Which existing Instant Answers will this one supercede/overlap with?
None.
Are you having any problems? Do you need our help with anything?
Where did you hear about DuckDuckHack? (For first time contributors)
Not my first contribution.
What does the Instant Answer look like? (Provide a screenshot for new or updated Instant Answers)
Checklist
Please place an 'X' where appropriate.