Skip to content
This repository has been archived by the owner on Oct 15, 2022. It is now read-only.

Add a goodie for showing the country corresponding to a ccTLD #581

Closed
wants to merge 1 commit into from

Conversation

ehsan
Copy link
Contributor

@ehsan ehsan commented Aug 10, 2014

This implements the idea here: https://duck.co/ideas/idea/1606/country-s-domain

@@ -0,0 +1 @@
The source of this data is http://mbrownnyc.wordpress.com/misc/iso-3166-cctld-csv/.
Copy link
Member

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?

Copy link
Collaborator

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.

@jagtalon
Copy link
Member

Hey, thanks for this. Looking at it now.

@jagtalon
Copy link
Member

@jagtalon
Copy link
Member

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;
Copy link
Member

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.

@jagtalon
Copy link
Member

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"

@mwmiller
Copy link
Contributor

Any news on this one? The tests are currently failing.

@moollaza
Copy link
Member

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

@moollaza
Copy link
Member

ping @ehsan are you still planning on finishing this? If you're busy we can close this and reopen whenever you're free :)

@moollaza
Copy link
Member

moollaza commented Oct 2, 2014

Closing as this is stale

@moollaza moollaza closed this Oct 2, 2014
@javathunderman
Copy link
Collaborator

@moollaza I'd love to see this go live- I can take this up, unless this has already been implemented elsewhere.

@mintsoft
Copy link
Collaborator

@javathunderman I can't find any overlapping IA's that are live so I'd say go for it!

@moollaza
Copy link
Member

👍

@javathunderman
Copy link
Collaborator

Apparently rediscovered this while browsing through Abandoned labeled PRs...will get started. :)

@javathunderman javathunderman mentioned this pull request Apr 25, 2015
@javathunderman
Copy link
Collaborator

@moollaza as @MrChrisW pointed out in #1120, most of these ccTLDs are handled by the Wiki IA...Therefore I think we can get rid of the Abandoned label.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants