Add a goodie for showing the country corresponding to a ccTLD #581
Conversation
@@ -0,0 +1 @@ | |||
The source of this data is http://mbrownnyc.wordpress.com/misc/iso-3166-cctld-csv/. |
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.
Is this a reliable source? Are they equal to the ones in Wikipedia?
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.
@jagtalon Browsing over this list of ccTLDs looks accurate- will implement what you suggested.
Hey, thanks for this. Looking at it now. |
Please increase the font-size to match the other Goodies such as https://duckduckgo.com/?q=convert+celsius+to+fahrenheit (check out https://github.com/duckduckgo/zeroclickinfo-goodies/blob/master/lib/DDG/Goodie/Conversions.pm) |
I think I would like it to trigger with "tld of us" or "tld in united states" as well. |
|
||
use DDG::Goodie; | ||
|
||
my %triggers = share('cctld.txt')->slurp; |
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.
Looks like you'd have to do something like
split("\n", share('cctld.txt')->slurp());
To remove the newlines instead of concatenating newlines below.
Here's a good IA that inverts the country code and the country name https://github.com/duckduckgo/zeroclickinfo-goodies/blob/master/lib/DDG/Goodie/CallingCodes.pm. You can probably get some ideas there for queries like "tld in the us" |
Any news on this one? The tests are currently failing. |
I don't think that failing test was the fault of this IA - seems like somehow ever test failed on that particular build. It passed for the other version of Perl though |
ping @ehsan are you still planning on finishing this? If you're busy we can close this and reopen whenever you're free :) |
Closing as this is stale |
@moollaza I'd love to see this go live- I can take this up, unless this has already been implemented elsewhere. |
@javathunderman I can't find any overlapping IA's that are live so I'd say go for it! |
👍 |
Apparently rediscovered this while browsing through Abandoned labeled PRs...will get started. :) |
This implements the idea here: https://duck.co/ideas/idea/1606/country-s-domain