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

Commit

Permalink
Add metadata to ResistorColors
Browse files Browse the repository at this point in the history
  • Loading branch information
Joe Walnes authored and majuscule committed Nov 16, 2012
1 parent 11155d9 commit 20e0cd9
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions lib/DDG/Goodie/ResistorColors.pm
Expand Up @@ -10,16 +10,24 @@ use DDG::Goodie;
use Math::Round; use Math::Round;
use POSIX qw(abs floor log10 pow); use POSIX qw(abs floor log10 pow);


attribution twitter => 'joewalnes',
web => ['http://joewalnes.com', 'joewalnes.com'],
email => ['joe@walnes.com', 'Joe Walnes'];

# \x{2126} is the unicode ohm symbol # \x{2126} is the unicode ohm symbol
triggers query_nowhitespace => qr/^(.*)(ohm|ohms|\x{2126})/i; triggers query_nowhitespace => qr/^(.*)(ohm|ohms|\x{2126})/i;


zci is_cached => 1; zci is_cached => 1;
zci answer_type => 'resistor_colors'; zci answer_type => 'resistor_colors';


primary_example_queries '4.7k ohm';
secondary_example_queries '1\x{2126}';
description 'find resistor color bands';
name 'ResistorColors';
code_url 'https://github.com/duckduckgo/zeroclickinfo-goodies/blob/master/lib/DDG/Goodie/ResistorColors.pm';
category 'conversions';
topics 'science';

attribution twitter => 'joewalnes',
web => ['http://joewalnes.com', 'joewalnes.com'],
email => ['joe@walnes.com', 'Joe Walnes'];

# These hex codes came from # These hex codes came from
# http://en.wikipedia.org/wiki/Electronic_color_code # http://en.wikipedia.org/wiki/Electronic_color_code
my %digits_to_colors = ( my %digits_to_colors = (
Expand Down

0 comments on commit 20e0cd9

Please sign in to comment.