• Stars
    star
    172
  • Rank 221,201 (Top 5 %)
  • Language
    C#
  • License
    MIT License
  • Created about 7 years ago
  • Updated 18 days ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

http://quickinfo.io - a search textbox with extensible "answers" (calculator, unit-converter, colors, ascii/unicode, etc). See demo at http://quickinfo.io/?demo

http://quickinfo.io

Extensible set of little one-off features that Google or Bing are missing, such as color and unit conversions, etc.

NuGet package

screenshot

Demo: http://quickinfo.io/?demo

Motivation

There is a class of search engine queries that search engines aren't great at without dedicated support. These queries have exactly one well-defined answer that is computable or readily available. Search engines by default just show a list of (often poor quality and full of ads) websites instead of showing the answer directly as you type.

Search engines are getting better at it by implementing dedicated "answer" UI, without the need to visit any websites. Examples are calculator, unit conversions, currency exchange rates, stock tickers, etc. But sometimes they still fail, for instance as of October 2015 search engines don't return satisfactory results for RGB(23,175,195). If you have to visit a site for an answer like this, the search engines have failed here.

Quickinfo.io attempts to fill the gap when the search engine doesn't provide an "answer", or their answer is not satisfactory. One should note that http://duckduckgo.com is known for its great extensive collection of answers. http://wolframalpha.com is another example of an "answer" website, which gives great answers, but it also doesn't cover many scenarios, and is also too slow to be useful as a quick one-off lookup tool (doesn't provide results in real-time as you type). I like the vision of Wolfram Alpha, but it is still not extensible by me (I can't plug my own one-off solutions). I want a platform where I can easily add new answers myself using a very simple C# extensibility API. http://duckduckgo.com's answers collection is impressive, but there is no easy extensibility in C#.

All the answers on http://quickinfo.io are instant as-you-type results, no need for the search button.

Currently supported answers

  1. Unit conversions:
    1. Weight: pounds to kg and vice versa (190 pounds, 200lb, 43 kg in lb)
    2. Temperature: fahrenheit/celsius (75f, 75 f, 75 fahrenheit, 23c, 23 c, 23 c to f)
    3. Distance: 12 miles, 100 miles in km
    4. Speed
    5. Volume
    6. Area: 1670 sq.ft
    7. Fuel efficiency (29mpg)
  2. Hex/decimal (just type a number)
  3. Ascii table ascii
  4. List of colors: color, colors
  5. Color conversions - convert an RGB triplet to Hex color or hex color to RGB (23 145 175, #eeaaf0)
  6. Factor an integer 2520
  7. Generate a random Guid guid
  8. My IP address ip
  9. Math/arithmetic expressions (24 * 365) * 4 - 1, 22/7 - pi, rnd, Random(100)
  10. Quick sum/average/product of a list of numbers, sort a list (separated by space or comma) 3 7 21 3 3 2 11
  11. Unicode: type a codepoint to see what char it is: U+2021 \u3333
  12. Url decode: 2%20%2B%203 shows the original string (fun exercise: 2%2525252520%252525252B%25252525205)

Type ? for help.

Historical information

It all started when I caught myself using the Windows Calc to convert a hex color to RGB. I thought to myself: this is ridiculous, I'm sitting in front of a supercomputer and punching buttons one by one instead of getting an immediate answer as I type it in.

I kept catching myself, how do I generate a random Guid from command line? Which is a good unit-converter app without ads? What is 130000 * (96 - 36) / 192? I've realized that there are apps and websites to answer all these, but it will take me longer to find a good app than to calculate the answer myself.

So I got into the mindset of "does this question have a single, well defined, computable answer"? "Can I type the question into a simple search box and expect a computer to give an immediate result?" Turns out, this class of questions is more expansive than one might think. I'm thinking of adding ToString() syntax for DateTime, string.Format cheat sheet, some man pages that I often look up, basically make carefully curated information easily accessible from a simple search box. I think it'll be beneficial to centralize all these little lookup utilities and make it so I can customize and extend it to fit my needs.

API and architecture

The core library of answers is in QuickInfo.dll, available as a NuGet package here: https://nuget.org/packages/GuiLabs.QuickInfo. There are multiple front-ends such as QuickInfoWeb (that powers http://quickinfo.io) and Info.exe (console app). Here's how the console app instantiates the engine and gets the answers for the search string:

var engine = new Engine
(
typeof(Ascii),
typeof(Color),
typeof(QuickInfo.DateTime),
typeof(Emoticons),
typeof(Factor),
typeof(Hex),
typeof(HttpStatusCode),
typeof(QuickInfo.Math),
typeof(NumberList),
typeof(RandomGuid),
typeof(UnitConverter),
typeof(UrlDecode)
);
var query = new Query(commandLine);
var answers = engine.GetResults(query);
foreach (var answer in answers)
{
ConsoleRenderer.RenderObject(answer.processorName, answer.resultNode);
}

The result objects returned from the API are an abstract object model: https://github.com/KirillOsenkov/QuickInfo/blob/master/src/QuickInfo/Dom/Node.cs

Basically Node has a set of attributes (name/value pairs) and an optional List of child nodes. HtmlRenderer in QuickInfoWeb project then renders Html responses by visiting the Node tree of the results. ConsoleRenderer in the Info.exe console app visits the Node tree and just prints it to the console.

Contributing

Feel free to open issues to suggest/propose ideas. If you want to contribute a PR, please open an issue first so we can discuss. I will consider accepting high quality pull requests, however in each case I will decide whether the PR adds a solution that fits the spirit of what I want to achieve. Sorry if I decline too specific or exotic functionality. I also can't add answers that won't be useful to the majority of users.

Longer term I want to think about letting people easily add their own answers (and store them in their own private account, like OneNote), but this is far out in the future and I'm not sure I have the time and resources to maintain that.

More Repositories

1

MSBuildStructuredLog

A logger for MSBuild that records a structured representation of executed targets, tasks, property and item values.
C#
1,449
star
2

SourceBrowser

Source browser website generator that powers http://referencesource.microsoft.com and http://sourceroslyn.io
C#
1,063
star
3

RoslynQuoter

Roslyn tool that for a given C# program shows syntax tree API calls to construct its syntax tree
C#
822
star
4

XmlParser

A Roslyn-inspired full-fidelity XML parser with no dependencies and a simple Visual Studio XML language service
C#
327
star
5

MetadataTools

Various tools and helpers to read assembly metadata.
C#
178
star
6

CodeCleanupTools

A set of command-line tools to cleanup C# and VB source code.
C#
122
star
7

Undo

Simple .NET Undo/Redo framework with merging and transactions
C#
102
star
8

ContentSync

Directory copy/sync/mirror tool that uses file contents (not timestamps) to avoid touching identical files
C#
64
star
9

LargeAddressAware

A build tools package that adds support for making 32-bit exes LARGEADDRESSAWARE
C#
52
star
10

StructuredEditor

An experimental structured code editor prototype for a subset of C#
C#
50
star
11

LayoutDesigner

A prototype Silverlight UI layout designer. Works with basic panels (StackPanel and Grid). Built entirely using drag-n-drop. XAML can be copied to clipboard. Built with Silverlight 4 and runs in the browser.
C#
48
star
12

LiveGeometry

Interactive geometry CAD-like educational software
Visual Basic 6.0
30
star
13

Bliki

Blog/Wiki/Notes
30
star
14

MathParser

Parser for arithmetic expressions
C#
21
star
15

MEFMetadata

Metadata-based part discovery for MEF, uses the Roslyn metadata reader and is faster than reflection.
C#
18
star
16

MSBuildLog

Source code for http://msbuildlog.com
HTML
16
star
17

NuGetTools

C#
16
star
18

Misc

Various small and one-off projects just barely too big to throw away
C#
14
star
19

dotfiles

My dotfiles and Mac config
Shell
13
star
20

Benchmarks

My collection of benchmarks for random pieces of code
C#
13
star
21

WpfSendKeys

SendKeys for WPF
C#
12
star
22

DumpTools

Tools to analyze managed .dmp files using ClrMd
C#
8
star
23

MEFTools

Tools to help working with MEF
C#
7
star
24

Dia2Dump

Taken from C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\DIA SDK\Samples\DIA2Dump
C++
6
star
25

MyOwnSearchEngine

This repo has moved to https://github.com/KirillOsenkov/QuickInfo
JavaScript
3
star
26

DiagnosticMargin

C#
3
star
27

VSInstanceFinder

Finds the locations of all installed VS 2017 instances
C#
2
star
28

ColorTools

JavaScript
2
star
29

MagicSquare

Simple addition/multiplication table for kids
C#
2
star
30

ApplyPatch

Simple utility to apply a patch to a set of files
C#
1
star
31

MefHost

Test MEF host to repro a bug
C#
1
star
32

guilabs

Source code for http://guilabs.net
HTML
1
star
33

BeachballPoker

C#
1
star