From baa2c1da4f5a52029ee19af14adc21685b69050f Mon Sep 17 00:00:00 2001 From: Dylan Lloyd Date: Tue, 6 Nov 2012 15:53:46 -0500 Subject: [PATCH] added metadata to {Binary,Capitalize,Chars,ColorCodes}.pm --- lib/DDG/Goodie/Binary.pm | 8 ++++++++ lib/DDG/Goodie/Capitalize.pm | 11 +++++++++++ lib/DDG/Goodie/Chars.pm | 8 ++++++++ lib/DDG/Goodie/ColorCodes.pm | 13 +++++++++---- 4 files changed, 36 insertions(+), 4 deletions(-) diff --git a/lib/DDG/Goodie/Binary.pm b/lib/DDG/Goodie/Binary.pm index 0fa077e46..d60dd9c76 100644 --- a/lib/DDG/Goodie/Binary.pm +++ b/lib/DDG/Goodie/Binary.pm @@ -7,6 +7,14 @@ triggers end => "binary"; zci is_cached => 1; zci answer_type => "binary_conversion"; +primary_example_queries 'foo in binary'; +secondary_example_queries '0x1e to binary'; +description 'convert ASCII, numbers, and hex to binary'; +name 'Binary'; +code_url 'https://github.com/duckduckgo/zeroclickinfo-goodies/blob/master/lib/DDG/Goodie/Binary.pm'; +category 'conversions'; +topics 'geek'; + sub bin { my @tex = shift; my $bin; diff --git a/lib/DDG/Goodie/Capitalize.pm b/lib/DDG/Goodie/Capitalize.pm index 34d739e54..c8521565c 100644 --- a/lib/DDG/Goodie/Capitalize.pm +++ b/lib/DDG/Goodie/Capitalize.pm @@ -7,6 +7,17 @@ triggers startend => 'capitalize', 'uppercase', 'upper case'; zci is_cached => 1; zci answer_type => "capitalize"; +primary_example_queries 'capitalize this'; +secondary_example_queries 'uppercase that'; +description 'capitalize a string'; +name 'Capitalize'; +code_url 'https://github.com/duckduckgo/zeroclickinfo-goodies/blob/master/lib/DDG/Goodie/Capitalize.pm'; +category 'conversions'; +topics 'programming'; +attribution twitter => 'crazedpsyc', + cpan => 'CRZEDPSYC' ; + + handle remainder => sub { uc ($_) }; 1; diff --git a/lib/DDG/Goodie/Chars.pm b/lib/DDG/Goodie/Chars.pm index ba04f772b..717c919b6 100644 --- a/lib/DDG/Goodie/Chars.pm +++ b/lib/DDG/Goodie/Chars.pm @@ -8,6 +8,14 @@ triggers start => 'chars'; zci is_cached => 1; zci answer_type => "chars"; +primary_example_queries 'chars test'; +secondary_example_queries 'chars this is a test'; +description 'count the number of charaters in a query'; +name 'Chars'; +code_url 'https://github.com/duckduckgo/zeroclickinfo-goodies/blob/master/lib/DDG/Goodie/Chars.pm'; +category 'computing_tools'; +topics 'programming'; + handle remainder => sub { return "Chars: " .length $_ if $_; return; diff --git a/lib/DDG/Goodie/ColorCodes.pm b/lib/DDG/Goodie/ColorCodes.pm index d6ff71480..46a219d92 100644 --- a/lib/DDG/Goodie/ColorCodes.pm +++ b/lib/DDG/Goodie/ColorCodes.pm @@ -31,10 +31,15 @@ triggers query_raw => qr/^ zci is_cached => 1; zci answer_type => 'color_code'; -attribution - twitter => 'crazedpsyc', - cpan => 'CRZEDPSYC' -; +primary_example_queries 'hex color code for cyan'; +secondary_example_queries 'rgb(173,216,230)', 'hsl 194 0.53 0.79', 'cmyk(0.12, 0, 0, 0)', '#00ff00'; +description 'get hex, RGB, HSL and CMYB values for a color'; +name 'ColorCodes'; +code_url 'https://github.com/duckduckgo/zeroclickinfo-goodies/blob/master/lib/DDG/Goodie/ColorCodes.pm'; +category 'conversions'; +topics 'programming'; +attribution twitter => 'crazedpsyc', + cpan => 'CRZEDPSYC' ; sub percentify { my @out;