duckduckgo / zeroclickinfo-fathead

DuckDuckGo Instant Answers based on keyword data files
https://duckduckhack.com/
Other
318 stars 365 forks source link

New Instant Answer: MDN CSS Fathead #226

Closed moollaza closed 8 years ago

moollaza commented 8 years ago

We previously had a CSS Fathead, but it was internal, and eventually become very outdated.

We need a new CSS Fathead and MDN is an excellent data source. It has a CSS Reference we can easily crawl to build a Fathead.

Improving our CSS search experience is also directly in-line with our Programming Mission, so this would be a big win!

@duckduckgo/duckduckhack-contributors is anyone out there interested in writing a CSS Fathead?

This doesn't need to be written in Perl (though we'd prefer it 😉 ) -- Python, Ruby, and other well-known languages are acceptable.

There is an existing MDN JavaScript Fathead (written in Python) which could server as a starting point for this Instant Answer.


As well, it looks like CSS-Tricks.com has coverage of useful Snippets and more. We could very likely create a Fathead for their snippets and other data. It would be good to namespace these Instant Answers accordingly: DDG::Fathead::CSS::MDN, DDG::Fathead::CSS::CssTricks

pjhampton commented 8 years ago

If there is no uptake on this I can take it forward... but anybody else more keen or with more time please feel free 😄

hchienjo commented 8 years ago

I am interested.

moollaza commented 8 years ago

@pjhampton, @hchienjo thanks for the offering to help!

@hchienjo do you need help getting started?

hchienjo commented 8 years ago

Yes I do.

hchienjo commented 8 years ago

If you can point out a similar instant answer I would be pretty well off.

gaulrobe commented 8 years ago

@hchienjo the document here is really helpful! http://docs.duckduckhack.com/resources/fathead-overview.html

As @moollaza pointed out a good one to start looking through is https://github.com/duckduckgo/zeroclickinfo-fathead/tree/master/lib/fathead/mdnjs

Let us know if you have any additional questions! :smile:

hchienjo commented 8 years ago

Great. Thanks. Will take a look first thing in the morning. It's 0233 hours right now on my side.

hchienjo commented 8 years ago

Am I free to use such modules as Mojo::* especially Mojo::DOM and Mojo::UserAgent during fetching and parsing of html as I am more comfortable with it. Will such modules pose a problem during further deployment into production? @moollaza @pjhampton @gaulrobe

gaulrobe commented 8 years ago

@hchienjo other Fatheads (such as https://github.com/duckduckgo/zeroclickinfo-fathead/blob/85911ef28b2b7c00eeedb2e2219910a7f7e90a62/lib/fathead/duckduckhack/parseDocs.pl) are using Mojo::DOM so I don't think that'll be an issue... unless there is an issue that I am not aware of. :)

hchienjo commented 8 years ago

Wonderful. Thanks.

hchienjo commented 8 years ago

I am designing the extractor and I need a little help. From here MDN CSS, do I extract only the KEYWORDS INDEX only or I even include data from SELECTORS? Thanks.

gaulrobe commented 8 years ago

@hchienjo I think there is a lot of value having both of those in this IA!

hchienjo commented 8 years ago

I need a little clarification, for instance, the :active pseudo class (https://developer.mozilla.org/en-US/docs/Web/CSS/:active] element page, do I extract the Summary as well as the Example code snippets (the CSS and the HTML inclusive)?

hchienjo commented 8 years ago

Meanwhile, I have reached here in the actual coding. @moollaza @pjhampton @gaulrobe

sahildua2305 commented 8 years ago

@hchienjo Since you have already started working on it, I think you should submit a PR so that you can ask for help directly there without anyone having to go to your repo:branch for feedback :)

hchienjo commented 8 years ago

@sahildua2305 Done Looking forward to guidance from all you guys.

hchienjo commented 8 years ago

@moollaza it is still incomplete. Working on the parsing.

hchienjo commented 8 years ago

Submitted PR so that in case I run into pronlems I can be guided along.