These are the old docs, and are outdated.
The new documentation can be read here and the repository is hosted here.
Any feedback, thoughts, or pull requests about the new docs are welcome, please let us know at [email protected]
Deprecated - OLD - See Below
License: Other
These are the old docs, and are outdated.
The new documentation can be read here and the repository is hosted here.
Any feedback, thoughts, or pull requests about the new docs are welcome, please let us know at [email protected]
On the cheat sheets page: https://duck.co/duckduckhack/goodie_cheat_sheets there's a line:
"Erase any pre-filled contents, and enter the values for your cheat sheet using the cheat sheet JSON syntax. "
but we didn't yet tell the user to use an example json file. So when you, "create a new file" it will create itself as a blank file. We should probably provide a reference to copy+paste and then use the Syntax file to help annotate.
OR comment out vim.json in the same style as the syntax guide.
thoughts? //cc @talsraviv
Maybe we can put that they need to contact us first if the API is not free.
Should be added to an Advanced section or the FAQ.
I've explained most of it here:
duckduckgo/zeroclickinfo-goodies#477 (comment)
Things like http://scrapy.org/
CouponMountain IA was removed, documentation requires updating. Self reminder to fix!
When creating a Goodie, the original query should not be directly returned as html as this creates the possibility for XSS to occur.
Returning the original query in the plain-text Goodie output is alright though as we already escape it.
I suggest this be added to the FAQ and should also be mentioned in the Goodie tutorial.
This issue was originally mentioned in duckduckgo/zeroclickinfo-goodies#223
Only Walkthrough#1 seems to be accessible. Clicking on the other 3 walkthroughs doesn't seem to bring me to the others.
I see it in the spice_frontend_walkthroughs.md
file but not able to view it on DuckDuckHack itself.
In https://duck.co/duckduckhack/duckduckhack_vision because it's showing the old site.
All the possible inputs to Spice.render()
should be covered and documented. Each parameter should also be documented as required or not, and under what circumstances.
Eg. spice_name
is required when using any of the DDG Spice templates (ie. carousel, list, etc)
Currently the docs do not explain the method required to slurp content containing UTF-8 chars.
An example of this functionality can be found here: https://github.com/duckduckgo/zeroclickinfo-goodies/blob/92ff7d54507d66aead2df544426c85b79319148e/lib/DDG/Goodie/Shortcut.pm#L20
The link in this line at the end is broken: "For more detailed guidelines specific to individual instant answers please see the instant answer Specific Design Style Guide"
This change should be made more clear in the PR-Templates themselves and in the documentation (submitting section)
Step 1 in https://duck.co/duckduckhack/spice_testing_triggers should link to https://duck.co/duckduckhack/installing_duckpan instead so that the instructions to install DuckPAN are consistent.
Reading through the DuckPAN install documentation https://duck.co/duckduckhack/installing_duckpan I noticed some wierdness on the site:
long dash rendered wrong:
link broken by including the closing parentheses:
Neither of those errors exist in the markdown here on github, it renders as it's supposed to. I'm wondering if the cause is simplly that the site is not up-to-date, or if it's because the markdown is translated to html by a different tool on the site?
Currently Spice and Goodies have a couple helper functions defined here: https://github.com/duckduckgo/duckduckgo/blob/45c44d14da86e19ccff8c07682722140b17bc020/lib/DDG/Meta/Helper.pm
We should probably add these to the Spice API and create a Goodie API page as well that contains share
, html_enc
and uri_esc
"Spice instant answers are triggered by a backend Perl component that then calls the JSON API of an upstream service. "
The Invoke an Immediate Function section of the Spice Basic Tutorial has a typo in the text:
"After creating our module, we then we turn on JavaScript's Strict Mode which also offers various benefits."
It should probably read:
"After creating our module, we then turn on JavaScript's Strict Mode which also offers various benefits."
I just noticed, due to a question on the Community Platform that the docs don't explain how Goodies are able to return HTML and/or Plaintext results.
This should be documented!
Following on from the conversation about the words goodie I think some rough guidance should be added to the Goodie documentation; the closest we've got at the moment is @moollaza here: duckduckgo/zeroclickinfo-goodies#816 (comment)
Can we get some "firm" boundaries defined and doc'd?
I think it's worth documenting how we process the output.txt
behind the scenes. For example, it's hard to tell if:
Date.parse()
such as Date.parse
, Date parse
, and Date parse()
?jquery each
instead of just each
?CC @jdorweiler
We prefer using HTTP over HTTPS because HTTP connections are faster. The API request is still secure though because DuckDuckGo proxies the HTTP request through DuckDuckGo's servers via HTTPS, like so:
https://duckduckgo.com/js/spice/movie/mib
I think this belongs in the FAQ and should be mentioned in the tutorial and/or the explanation of spice to
It should be already there but we need to make it clearer in the DuckPAN install docs.
We aren't explicitly mentioning how to submit your IA here: https://duck.co/duckduckhack/submission_and_review
For example, if you create a cheat sheet and then click on the Submitting section ---> you never see the commands for how to do so. Git commit? PR from the web client?
should specify there.
Markdown in duckduckhack/testing/spice_tests.md is not properly parsed here : https://duck.co/duckduckhack/spice_tests . The backticks are correct and on GitHub it is fine too. On the site though, it's not what was intended.
Not sure how that came to be...we should indicate it's location at the beginning of the Frontend Section
I was looking through the DDG RequestHandler code (I was curious about the other kinds of parts of the query you could handle besides the remainder, as mentioned in the Spice basic tutorial). I noticed there's a Language API exposed with the $lang
variable, similar to the $loc
one for the Location API.
I was thinking it might be pretty useful for IA developers to know that this feature exists, especially if you're interested in getting non-English language speakers to use DDG.
Would you like me to do a quick writeup of that feature and stick it in a PR?
So, I was going through the Goodie Quickstart tutorial and as I got to the step 9, I got a bunch of errors and I was unable to start the server, therefore, not able to continue with this tutorial.
Output:
add_country_alias(): alias already in use: Antigua
at /home/codio/perl5/perls/perl-5.18.2/lib/5.18.2/Locale/Codes/Country.pm line 71.
add_country_alias(): alias already in use: Barbuda
at /home/codio/perl5/perls/perl-5.18.2/lib/5.18.2/Locale/Codes/Country.pm line 71.
add_country_alias(): alias already in use: Russia
at /home/codio/perl5/perls/perl-5.18.2/lib/5.18.2/Locale/Codes/Country.pm line 71.
add_country_alias(): alias already in use: Tobago
at /home/codio/perl5/perls/perl-5.18.2/lib/5.18.2/Locale/Codes/Country.pm line 71.
add_country_alias(): alias already in use: Trinidad
at /home/codio/perl5/perls/perl-5.18.2/lib/5.18.2/Locale/Codes/Country.pm line 71.
add_country_alias(): alias already in use: America
at /home/codio/perl5/perls/perl-5.18.2/lib/5.18.2/Locale/Codes/Country.pm line 71.
add_country_alias(): alias already in use: Vatican
at /home/codio/perl5/perls/perl-5.18.2/lib/5.18.2/Locale/Codes/Country.pm line 71.
add_country_alias(): alias already in use: US Virgin Islands
at /home/codio/perl5/perls/perl-5.18.2/lib/5.18.2/Locale/Codes/Country.pm line 71.
`DDG::Goodie::IsAwesome::aleksandar-todorovic' is not a module name
Could you update your tutorial to circumvent these issues?
We specify that brackets need escaped w/ a backslash but need to also specify the same for quotes.
It's a little unclear for non-tech folk, I suppose.
When I'm on this page - https://duck.co/duckduckhack/spice_handlebars_helpers/#keys , almost all the urls in the sidebar are broken. They are anchored like this -
<a class="sub-item__title sub-item__link" href="preparing_for_a_pull_request">Preparing for a Pull Request</a>
The href
is obviously broken when on this URL. There might be other URLs too for which it might occur.
On this page: https://github.com/duckduckgo/duckduckgo-documentation/blob/master/duckduckhack/styleguides/design_styleguide.md
on the last line, there's a link instant answer Specific Design Style Guide. When I click it I get link to 404 page on Github. It's just a very tiny issue. I want to fix it myself but I don't know what the correct link is, sorry :)
We could probably have duck.co render this xslate directly (with caching?)
Example usage:
https://github.com/duckduckgo/zeroclickinfo-spice/blob/master/share/spice/drinks/drinks.js
The Aux Box no longer takes a sub-template, but simply an array of data.
We're starting to build up a couple of nice work patterns around Goodies and Spices wrt to the "best way" to handle things; for example the NumberStyler
and Dates
role things.
I think it'd be nice if the docs show people what's available for reuse easily in a more focused way; currently I think users have to be hunting for them already to actually find them. Most people probably end up writing their own, do the PR and then get told "btw this just works, all your labour can be scrapped!"; which seems kinda wasteful.
What do others think? Some sort of "common practises" section?
Noticed this here: https://duck.co/duckduckhack/templates_reference#variants
![templates_reference___instant_answer_display___duckduckhack](https://cloud.githubusercontent.com
/assets/873785/8167218/c4c480b4-136a-11e5-96f9-337dd0254fa5.png)
/cc @talsraviv
At the moment, the process is:
Why not suggest starting the duckpan install at the very beginning of the tutorial, so it can get a head start while you work through the tutorial?
Hey,
IMO, the testing page could do with explaining that the text, html and heading outputs need to be tested as a whole. Currently this isn't obvious and I can't actually find an example in the docs of the html or headings being tested!
Thanks,
After clicking the DuckPAN New Goodie tab in Codio (step 1 here, pressing enter creates a new goodie named:
e.g. after clicking "cd ~/workspace/zeroclickinfo-goodies && duckpan new
We've seen a few PR's where the contributor has modified the prototype of a native object such as Array.prototype
. This practice should be avoided because this affects the prototype globally, even though our Spice callback functions are declared inside a closure.
We should probably add this to the FAQ or possibly common pitfalls
cc// @jagtalon
If we receive a goodie that reads a file, be sure to check if the files will be expanded (say, a list of electronic parts) or if they are a few MBs big. In that case, it might not be a good idea to keep the IA as a goodie because memory usage will grow since size of the file that was read * number of processes created
will be occupied.
Many of the Spices listed under certain example "template groups" as examples use different templates.
Example:
Gravatar spice is listed as using the info
template however it actually uses the base
template.
New Views:
Maybe it's better to generalize this as Perl because it's possible that people might think that it's okay to make network requests in the Perl side of Spice IAs.
https://github.com/duckduckgo/zeroclickinfo-spice/pull/859/files#discussion_r13714513
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.