duckduckgo / zeroclickinfo-fathead Goto Github PK
View Code? Open in Web Editor NEWDuckDuckGo Instant Answers based on keyword data files
Home Page: https://duckduckhack.com/
License: Other
DuckDuckGo Instant Answers based on keyword data files
Home Page: https://duckduckhack.com/
License: Other
Hello!
First, I'd like to say thanks for this add-on. It's really useful, especially for quickly looking up a pokémon's type in battle. I would like to suggest that there be more options for the "Read More"/"More Info" links. For example, Umbreon's card only shows a link to the Pokémon Wikia, but it could link to other sources as well, such as Bulbapedia. (I'm not sure if it already does this for other pokémon or if different sources already show up, sorry about that if I'm wrong.) It's not a major issue, but it would be nice for people who prefer a certain source (like me 😛)
I get the following error when running the airport code parser. https://github.com/duckduckgo/zeroclickinfo-fathead/blob/master/share/fathead/airports/parse.py
DEBUG:root:Index: A
Traceback (most recent call last):
File "parse.py", line 222, in <module>
parser.get_airports()
File "parse.py", line 153, in get_airports
table = self.soup.find_all('table')[1]
IndexError: list index out of range
The svn "fathead" links to out-of-date docs (1.5). The latest is 1.7 and 1.8 is in draft now.
IA Page: http://duck.co/ia/view/subversion
An alternative is to not link to specific version numbers. "python pip" would show https://pypi.python.org/pypi/pip/1.1, but we could just use https://pypi.python.org/pypi/pip/ to give us the latest package every time.
Unix man seems to be missing a lot. I've tried man bash
, man dd
, man sh
... these are not obscure, but they're not getting picked up. If it's an issue with the source, I wonder if this may need to be revised. I might also recommend the man pages from die.net.
I'm happy to contribute, if that's what it would take. Wanted to bring up the issue, though, before getting into the code.
Seems like the source url mentioned in the data.url file is broken - http://www.iso.org/iso/list-en1-semic-3.txt
Tried searching for us iso
and iso tk
as mentioned in the fathead script, not working.
$ duckpan query
Checking for latest App::DuckPAN ... 0.132
Checking for latest DDG Perl package... 0.118
Using the following DDG instant answers:
- DDG::Fathead::ArchPkgs (Any)
- DDG::Fathead::Bible (Any)
- DDG::Fathead::CSSRef (Any)
- DDG::Fathead::CVE (Any)
- DDG::Fathead::CppreferenceDoc (Any)
- DDG::Fathead::FileFormats (Any)
- DDG::Fathead::FirefoxAboutConfig (Any)
- DDG::Fathead::HGNCGeneNames (Any)
- DDG::Fathead::HTMLRef (Any)
- DDG::Fathead::HelloWorld (Any)
- DDG::Fathead::ISO3166Codes (Any)
- DDG::Fathead::Java (Any)
- DDG::Fathead::LDraw (Any)
- DDG::Fathead::LegalDocs (Any)
- DDG::Fathead::MDNJS (Any)
- DDG::Fathead::MIMETypes (Any)
- DDG::Fathead::NodeJS (Any)
- DDG::Fathead::PCIIDs (Any)
- DDG::Fathead::Perl6Doc (Any)
- DDG::Fathead::Plone (Any)
- DDG::Fathead::PyPI (Any)
- DDG::Fathead::RFC (Any)
- DDG::Fathead::RedisCommands (Any)
- DDG::Fathead::Scholrly (Any)
- DDG::Fathead::TclRef (Any)
- DDG::Fathead::UnixMan (Any)
- DDG::Fathead::XEP (Any)
- DDG::Fathead::YUI3 (Any)
(Empty query for ending test)
Query: Hello
You entered: Hello
Caught error:
Can't locate object method "handle_request_matches" via package "DDG::Fathead::ArchPkgs" at /home/dvogel/perl5/lib/perl5/DDG/Block.pm line 186.
Query:
For example, Edge now supports partial support for CSS Filter Effects, but it doesn't say that in our IA: https://duckduckgo.com/?q=can+i+use+CSS+Filter+Effects&t=ffab&ia=about&iax=1
This might need an update.
As of commit bf16240
$ duckpan query
Checking for latest App::DuckPAN ... 0.132
Checking for latest DDG Perl package... 0.118
Using the following DDG instant answers:
- DDG::Fathead::ArchPkgs (Any)
- DDG::Fathead::Bible (Any)
- DDG::Fathead::CSSRef (Any)
is not a valid URL. at lib/DDG/Fathead/CVE.pm line 14.
Compilation failed in require at /home/dvogel/perl5/lib/perl5/App/DuckPAN/Cmd.pm line 22.
$ grep -n "icon_url ..;" lib/DDG/Fathead/*.pm
lib/DDG/Fathead/CppreferenceDoc.pm:18:icon_url "";
lib/DDG/Fathead/CVE.pm:14:icon_url '';
lib/DDG/Fathead/MDNJS.pm:15:icon_url "";
lib/DDG/Fathead/Scholrly.pm:15:icon_url "";
User reported here: http://www.reddit.com/r/duckduckgo/comments/1ll0pv/help_us_find_bad_instant_answers/
One I've noticed is that if you search for a two-digit bible chapter, it splits those two digits and gives you a one-digit chapter and a one-digit verse. For instance, look at a search for Exodus 12[1] . It quotes Exodus 1:2 at me, when I clearly wanted Exodus 12 instead.
When DDG-ing for mysql substring
, the example view contains:
SUBSTRING(str,pos), SUBSTRING(str FROM pos), SUBSTRING(str,pos,len), SUBSTRING(str FROM pos FOR len):
mysql> SELECT SUBSTRING('Quadratically',5); -> 'ratically' __NEWLINE__mysql> SELECT SUBSTRING('foobarbar' FROM 4); -> 'barbar' __NEWLINE__mysql> SELECT SUBSTRING('Quadratically',5,6); -> 'ratica' __NEWLINE__mysql> SELECT SUBSTRING('Sakila', -3); -> 'ila' __NEWLINE__mysql> SELECT SUBSTRING('Sakila', -5, 3); -> 'aki' __NEWLINE__mysql> SELECT SUBSTRING('Sakila' FROM -4 FOR 2); -> 'ki'
It contains linebreaks __NEWLINE__
and prefix mysql>
.
Instead, this would be much more readable:
SUBSTRING(str,pos), SUBSTRING(str FROM pos), SUBSTRING(str,pos,len), SUBSTRING(str FROM pos FOR len):
SELECT SUBSTRING('Quadratically',5); -> 'ratically'
SELECT SUBSTRING('foobarbar' FROM 4); -> 'barbar'
SELECT SUBSTRING('Quadratically',5,6); -> 'ratica'
SELECT SUBSTRING('Sakila', -3); -> 'ila'
SELECT SUBSTRING('Sakila', -5, 3); -> 'aki'
SELECT SUBSTRING('Sakila' FROM -4 FOR 2); -> 'ki'
IA Page: http://duck.co/ia/view/my_sql
The module information for the pypi instant answer is out of date. The Latest Version is incorrect and also the 'More at Python Package Index' points at the location of the old package.
In case of certifi the package points to version https://pypi.python.org/pypi/certifi/14.05.14 while the latest version is a year newer. This is not only with the certify module but I tried other modules as well. Try python requests or python panda
IA Page: http://duck.co/ia/view/py_pi
Sometimes this IA is triggered but sometimes the standard Wikipedia fathead is triggered instead, or even no IA at all. For example...
Works (triggers country languages IA):
https://duckduckgo.com/?q=afghanistan+language
Triggers Wikipedia fathead IA:
https://duckduckgo.com/?q=language+in+brazil
https://duckduckgo.com/?q=mexico+language
https://duckduckgo.com/?q=language+in+mexico
Doesn't trigger any IA:
https://duckduckgo.com/?q=brazil+language
There's no instant answer box when you search for "perl 6 str". The first regular hit is great, but it's probably better if the first documented example worked as expected :-)
The examples "Str.rindex" and "Int.div perl6" work fine.
IA Page: http://duck.co/ia/view/perl6doc
There's a (
showing up at the end of the abstract text. Just need to update the parser to remove the internal links inside the ()
.
Here's the source data for this entry as an example.
Document description: Bylaws for Delaware Corporation is an open source legal document (<a href="http://www.docracy.com/doc/showalltagged?tag=governance">governance</a>, <a href="http://www.docracy.com/doc/showalltagged?tag=startup">startup</a>, <a href="http://www.docracy.com/doc/showalltagged?tag=delaware">delaware</a>, <a href="http://www.docracy.com/doc/showalltagged?tag=incorporation">incorporation</a>). <a href="http://www.docracy.com/sign/usedoc?signing=false&docId=45">[download]</a> http://www.docracy.com/45/bylaws-for-delaware-corporation
File Formats IA relies on all extensions being present in this URL:
https://en.wikipedia.org/wiki/List_of_filename_extensions_(alphabetical)
But this list has been splitted into different pages, so it does not work anymore.
IA Page: http://duck.co/ia/view/file_formats
There is only an item for "h1-h6" (https://duckduckgo.com/?q=html+h1-h6) in html_ref.There should be items for h1, h2, h3, h4, h5, and h6 that redirect to "h1-h6." This should be an easy one to fix.
Just tried clicking the MoreAt link when searching for e.g. git push
and got a 404. Maybe we need a new source?
IA Page: http://duck.co/ia/view/git_manual
The Definition (wordnik) IA is triggered, however the title is changed as the PyPI.pm flathead is also triggered, this is incorrect.
Reproduce Issue:
https://duckduckgo.com/?q=suitable
Expected result:
<title>suitable at DuckDuckGo</title>
Actual result
<title>suitable (Python) at DuckDuckGo</title>
For example in https://duckduckgo.com/?q=can+i+use+css+animation&t=ffab&ia=about&iax=1 I think it should say "Safari 9+" because -webkit
was dropped in that version.
Hello @rpicard ,
I was looking and testing some queries in duckduckgo, and searching for "html video" it returned to me the Wikipedia source, instead of HTML5Doctor's trough my plugin. What's going on?
More: I've noted that my plugin only works with I search with something like this: "html tag". What happened with my other queries, like "tag abbr", "html5 table" and so on?
IA Page: http://duck.co/ia/view/mdnjs
If you ask ddg for markdown cheat sheet, instant answer provides a link to a github page with a markdown cheat sheet. Think it should provide the cheat sheet instead.
IA Page: http://duck.co/ia/view/git_hub
Maybe something with the extra parentheses?
https://duckduckgo.com/?q=plural+moose&ia=about
IA Page: http://duck.co/ia/view/plural
Both these emoticons:
;)
;-)
can be used to mean "winking".
I was checking out the fathead IAs and noticed on the docs the following part:
and if necessary, will be run periodically to keep the database current
However, I couldn't find details on how to instruct this, I checked some existing fathead IAs and I assume they are not specified on meta.txt or .pm, but you maybe add a cron on per-case basis?
In any case, it would help to clarify this at the docs.
Lastly, I did a search using the Airport fathead, for a new airport that was added on Sept 2014 and it seems absent from the index: https://duckduckgo.com/?q=airport+AHJ obviously the same case could be for other IAs.
When you search for a Mercurial command, like hg commit
, it gives a short description from the documentation site. However, clicking on that to go to the documentation site doesn't show you the correct spot on the page.
It links to http://www.selenic.com/mercurial/hg.1.html#hg commit
, when it should be http://www.selenic.com/mercurial/hg.1.html#commit
. (The difference is the last part, after the #
. It should just be the command name, without hg
in front of it.
Searching for Notre Dame returns the IA subheading "Affichage 186 ÉLéments". This should be "Affichage 186 Éléments" (lower case L).
This is a reminder to myself.
Query like Str.clone
should point to Mu.clone
. Query like perl6 clone
shouldn't show a clone
method for every single object in a language, but just Mu.clone
and possibly objects that override it (if there are any).
Creating this issue for any discussion to take place.
E.g. the query https://duckduckgo.com/?q=railcard&ia=about displays the plural IA which seems redundant.
Raised on Twitter: https://twitter.com/jackhughesweb/status/636197752028962817
IA Page: http://duck.co/ia/view/plural
While going through the Basic Fathead Tutorial I noticed it has an example link of the "hello world" Instant Answer. That link has a fullstop in search. I tried removing it and the instant answer stopped working entirely.
Doesn't Work:
hello world scala
link
hello world javascript
link
However this does work (added fullstop at the end):
hello world scala.
link
hello world javascript.
link
python
and ruby
both work with and without the fullstops so this doesn't seem to be consistent.
IA Page: http://duck.co/ia/view/hello_world
Like NSStatusItem
MDN fathead currently only pulls docs on global JS objects. Would be very useful if we could cover more of the other sections too.
https://developer.mozilla.org/en-US/docs/Web/CSS/Reference
https://developer.mozilla.org/en-US/docs/Web/HTML/Element
https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes
https://developer.mozilla.org/en-US/docs/Web/API
Looks like the parser is adding []
around it the "More at" link which is causing problems. We can remove them as the source has rebranded itself anyways: https://searchcode.com/
It triggers on "can i use css filters" and "can i use css filter effects" but not on "can i use css filter" or "can i use css filter effect"
Example: Zeroclick for https://duckduckgo.com/?q=github+ranger should really point to https://github.com/hut/ranger rather than https://github.com/ralesi/ranger.el
(I'm sure ralesi's repo is good, but I would imagine ZeroClick should try to present somewhat "canonical" results based on notability, etc.?)
Note: the DDG search results has hut's repo at the top.
IA Page: http://duck.co/ia/view/git_hub
The C++ documentation plugin is completely broken at the moment -- all target links are invalid. Take, for example, search query std::unordered_map
. The returned link points to http://www.cplusplus.com/%5Bhttp://en.cppreference.com/w/cpp/container/unordered_map%20Cppreference%5D
which is an invalid link.
In addition to that, newlines are displayed as \n
.
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.