LDraw.org Discussion Forums
LDraw Part Tracker plugin for DuckDuckGo search engine - Printable Version

+- LDraw.org Discussion Forums (https://forums.ldraw.org)
+-- Forum: LDraw Programs (https://forums.ldraw.org/forum-7.html)
+--- Forum: All Other Programs. (https://forums.ldraw.org/forum-26.html)
+--- Thread: LDraw Part Tracker plugin for DuckDuckGo search engine (/thread-5539.html)



LDraw Part Tracker plugin for DuckDuckGo search engine - Jim DeVona - 2012-07-17

A few months ago I wrote an LDraw Part Tracker plugin for DuckDuckGo. I've just been notified that is now live!

For example, try this query: https://duckduckgo.com/?q=98263.dat (the plugin generates the box at top)

Some background: DuckDuckGo is a search engine that accepts user-contributed plugins to provide "instant answer" responses for domain-specific queries. See DuckDuckHack for an overview of the plugin architecture. A couple different kind of plugins are possible; mine is a "fathead" plugin, which responds to keywords (part numbers) read from a data source (the tracker's part list). More fathead plugin details and examples are available here. Last but not least, here is the source code for the LDraw plugin.

Please feel free to fork and improve the plugin. The DuckDuckGo team responds to pull requests and may integrate approved changes with their site. (I think they are investing more emphasis on plugins now; the DuckDuckHack overview site did not exist when I first tried writing this plugin.)

I've listed some ideas for improvements under "Limitations" in the Readme for the plugin. The two most obvious would be to support part number-lookup-by-name (right now it's name-lookup-by-number; seems like an easy swap to make) and, especially, support for the full part library, not just the unofficial parts in the tracker. That will be a little more work, since it would need to read multiple sources. However, I think it'd be worthwhile. DuckDuckGo does some clever things with the data output by the plugin, such as auto-generating tables by category.


Re: LDraw Part Tracker plugin for DuckDuckGo search engine - Roland Melkert - 2012-07-18

This is very cool,

I just recently changed to duckduckgo as my main search engine, and things like this makes me look back even less Smile

I there a way to use the plugin exclusively in order to search e.g. 'technic figure' parts?


Re: LDraw Part Tracker plugin for DuckDuckGo search engine - Jim DeVona - 2012-07-18

Roland Melkert Wrote:I there a way to use the plugin exclusively in order to search e.g. 'technic figure' parts?

I'm not sure. The plugin basically generates a table of keywords that DuckDuckGo uses to generate its results, but I don't know how many kinds of queries will trigger it. So, it may be possible to restrict searches with the right syntax, but if so I don't know it.

It is somewhat flexible: I see you can search for "30072.dat" or "ldraw 30072" to get the same results. A search for a recognized category such as "ldraw bricks" presents a lists of matches, which may hint how to search only e.g. technic figure parts.

I did not have the opportunity to test search with the plugin when I wrote it - I was just following the output format of another example plugin. Now it is easier to see how the output is used and this may suggest ways to make it better in the future.

Anyway, glad you like it.