Giter Site home page Giter Site logo

duckduckgo / zeroclickinfo-goodies Goto Github PK

View Code? Open in Web Editor NEW
979.0 129.0 1.8K 22.14 MB

DuckDuckGo Instant Answers based on Perl & JavaScript

Home Page: https://duckduckhack.com/

License: Other

Perl 80.78% CSS 4.03% HTML 0.13% Shell 0.06% JavaScript 11.68% Raku 0.43% Handlebars 2.88%
instant-answers perl duckduckgo javascript

zeroclickinfo-goodies's Introduction

This repo is now archived

DuckDuckHack went on maintenance mode in 2015 and we aren't in a position to continue it. This repo hasn't been maintained subsequently and so we are archiving it.

Need to report a bug?

If you find a bug or relevancy issue, the best way to report this is via the Feedback button on the DuckDuckGo.com search results page. These issues are compiled and reviewed daily.

Have a suggestion or idea?

The best way to report these is also via the Feedback button on the DuckDuckGo.com search results page.

You can also share your thoughts with our community on Reddit.

zeroclickinfo-goodies's People

Contributors

122131 avatar charles-l avatar codenirvana avatar crazedpsyc avatar gautamkrishnar avatar guiltydolphin avatar hunterlang avatar javathunderman avatar jophab avatar l4570n3 avatar mailkov avatar majuscule avatar manrajgrover avatar mayank7 avatar mintsoft avatar mohan08p avatar moollaza avatar mrchrisw avatar mwmiller avatar navneetsharmaui avatar pjhampton avatar puskin94 avatar rasikapohankar avatar sahildua2305 avatar synbit avatar tagawa avatar vikashvverma avatar wilkox avatar zachthompson avatar zekiel avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

zeroclickinfo-goodies's Issues

"roll 4d6 - L" is no longer showing results from dice.pm

Aww, one of my favorite goodies I worked on back in the day is no longer handling one of its special cases. The code for -L and -H is still in dice.pm but it must no longer be matching its execution pattern correctly.

The deal is to have the dice goodie respond to standard dice notation:

roll 4d6 - L # roll 4 six-sided die and subtract the lowest value
roll 3d12 - H # roll 3 twelve-sided die and subtract the highest value

Trello board

Sorry for the delay in integration lately. We've been trying to work on a better interface between the repositories and the core system, and I've been working on a redesign of the site (almost done). We won't wait until the new interfaces are done to integrate, though. I'll be getting on that ASAP.

Onto the issue!

I've been thinking that a more visual, public request board would be better than the scattered txt files and wikis. I put together a Trello board for this purpose and I'm wondering what you all think about it: https://trello.com/board/goodies/4f08e96d947729b526070890

It is set up for public voting and commenting, so anyone who wants (even without technical skill) can engage with it.

Capitalize is not working

Hey Guys, I noticed capitalize is still on Trello under ideas, I was gonna give it a go implementing it but I noticed its already on here. However, I tried it on DDG and I don't believe its working...

Thought I'd let you know!

UN failing on non-numeric queries

@400000004fd35af51f86bb6c Argument "\x{68}\x{75}..." isn't numeric in sprintf at /usr/local/ddg.cpan/perl5/lib/perl5/Number/UN.pm line 33.

Braille to English conversion

Braille characters searched should return an english translation.

You'll need to expand the trigger to fire whenever a braille character is present. To do this, use a regex trigger so you don't have to list out all the characters. Check out this wikipedia page for the name of the code block. Look here on perldoc for how to reference a unicode block inside a regex (you only need the simple 'single form'). To use the regex instead of a 'word' trigger, it's as simple as triggers any => qr/your_regex_here/.

Once you've got it triggering correctly, look at the cpan package for a braille-to-english conversion function.

Dice: +(l|h) not handled nicely

For example, "roll d6+l". [+-][lh] is matched, but + is not handled in this case at all. Instead it is passed to int(), resulting in a warning (which is fatal on the live platform).

add dpi and clarify emtopx

From email:

"Em is a relative unit. Relative to the current point size of the font.
To have a real conversion from em to px, you must have the point size
of the used font and the dpi of the used display. What duckduckgo
currently returns is just division/multiplication by 16 which is true
for only some very specific font size / display combinations."

Multiple rolls

This came in over feedback:

Hey it's pretty cool that DDG can roll dice for queries like "3d6+4"!

And it even accepts irregular dice like 3d17 :-)

But can you also make it accept multiple dice, such as "3d10 + 2d6 + 3" ?

And maybe multiple rolls, like "1d20+7, 2d4+1" (which wouldn't summ all results, but rolls to-hit and damage at the same time and reports both).

Make "flip" (FlipText) reversable

"flip abc" gives ɔqɐ so "flip ɔqɐ" should give "abc."

If you take a look at the fliptext-reverse branch, I've extended the hash to include reversed elements for each of the unicode characters.

This isn't enough though; it's still not working in duckpan query. If you can make it work, please submit a pull request with your changes.

Binary false positives

It seems people search binary * a bit and don't want/expect to get the goodie. Is there another way to segment it out like * (in|to) binary?

Role dice three digits

Edited from feedback:

Why can I not roll more than 2 digits worth of dice; for example, I can roll 99d6, but I cannot roll 100d6. I imagine you coded it like this for a reason, however if you could up that to maybe 4 digits, it would be better.

unicode goodie does not take unicode input during duckpan goodie test

Query: unicode U+2000

DDG::ZeroClickInfo  {
    Parents       WWW::DuckDuckGo::ZeroClickInfo
    Linear @ISA   DDG::ZeroClickInfo, WWW::DuckDuckGo::ZeroClickInfo, Moo::Object
    public methods (4) : has_ttl, is_cached, new, ttl
    private methods (0)
    internals: {
        answer   "  U+2000 EN QUAD, decimal: 8192, HTML:  , UTF-8: 0xE2 0x80 0x80, block: General Punctuation, decomposition: U+2002",
        answer_type   "unicode_conversion",
        is_cached   1
    }
}

Query: unicode ü

Sorry, no hit on your goodies

I'm writing a IDN/Punycode goodie, but I'm not sure how to test it for Unicode input as 'goodie test' does not appear to handle it correctly.

Days between mark inclusive

Query: days between 1/1/2000 1/1/2001
reports: 366 days between

I suppose that means inclusive? We should note this or present both options like

365 (in between), 366 days (inclusive), 364 (not counting either end)

Calculator comma formatting

https://duckduckgo.com/?q=424334%2B2253828

vs

https://duckduckgo.com/?q=4%2C24%2C334%2B22%2C53%2C828

The issue here is with comma -> period conversion, which is in place right now because of the way some non-U.S. numbers are formatted with commas. That line should be qualified with a check to make sure the comma formatting is appropriate before turning commas into periods. If the formatting isn't appropriate (e.g. this case) the numbers will fall through to the line that strips all the commas and the answer will be shown as desired.

roll dice

From a feedback email:

'roll dice' not working
While 'roll die', 'roll 2 dice', 'throw die', 'throw dice', and 'throw 2 dice' are all working, 'roll dice' is not.

GUID copy/paste

From feedback email:

guid / uuid
The GUID generator is a very useful feature.
However, could you please put some spaces before the GUID and at the end, and put the (randomly generated) on a separate line if you have to have it? It's very hard to select the GUID to copy/paste it presently.

Binary for non-ascii

Feedback:


Binary for nonascii characters

When trying "binary" in search I do not get binary representation of nonascii characters. I get eight bits of something that I believe is first byte of its UTF-8 representation.

N letter words more context

Right now the output looks like this: 5 letter words: fuzzy, upend, cared, mauls, quill, chips, wanes, spend, boron, laces, bayou, bluff, fight, bimbo, hoops, learn, vices, moths, rehab, imply, aegis, broil, thief, users, swear, trump, kiddo, nukes, vexed, mulch

I wonder if we should say it is random, like Random 5 letter words.

End with a period?

"heads or tails" should trigger the coin flip Goodie

Given the current implementation of the Coin Goodie, this might not be as easy as it probably should be to extend. It should probably be re-written to be a little more flexible with the kinds of queries it can handle.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.