resolve merge conflicts

in dist.ini
master
nishanths 2014-06-30 21:54:19 -07:00
commit 4ce982f8ed
196 changed files with 7599 additions and 477 deletions

View File

@ -4,6 +4,8 @@ before_install:
- rm .travis.yml
- git config --global user.name "Dist Zilla Plugin TravisCI"
- git config --global user.email $HOSTNAME":not-for-mail@travis-ci.org"
- sudo apt-get update -qq
- sudo apt-get install -y libmpfr-dev
install:
- cpanm --quiet --notest --skip-installed Dist::Zilla
- dzil authordeps | grep -ve '^\W' | xargs -n 5 -P 10 cpanm --quiet --notest --skip-installed

View File

@ -8,4 +8,4 @@ This repository contains all the Goodie instant answers. If you are developing a
### Goodie Instant Answer Example
![morse code example](https://s3.amazonaws.com/ddg-assets/docs/goodie_example.png)
![Unit Conversion Example](https://raw.githubusercontent.com/duckduckgo/duckduckgo-documentation/master/duckduckhack/assets/goodie_readme_example.png)

View File

@ -19,6 +19,7 @@ Math::Int2Base = 1.00
Data::GUID = 0.046
IO::All = 0.44
File::ShareDir::ProjectDistDir = 0.2.0
Text::FIGlet = 2.19.3
Text::Unidecode = 0.04
Date::Calc = 6.3
Date::Hijri = 0.02
@ -61,6 +62,8 @@ Net::IP = 0
Math::BaseConvert = 0
Telephony::CountryDialingCodes = 1.04
URI::Escape::XS = 0.12
DateTime::Calendar::Chinese = 1.00
DateTime::Event::Chinese = 1.00
[Prereqs / TestRequires]
Test::More = 0.98
@ -106,3 +109,5 @@ perl_version = 5.16
perl_version = 5.18
extra_dep = App::DuckPAN
after_install = duckpan DDG
before_install = sudo apt-get update -qq
before_install = sudo apt-get install -y libmpfr-dev

View File

@ -0,0 +1,83 @@
package DDG::Goodie::BloodDonor;
# ABSTRACT: Returns available donors for a blood type
use DDG::Goodie;
use strict;
use warnings;
triggers startend => 'donor compatibility', 'donor', 'donors for',
'blood donor', 'blood donors for', 'blood donor for',
'blood type', 'blood compatibility', 'compatibility', 'blood donor compatibility';
zci answer_type => "blood_donor";
primary_example_queries 'donor O+';
secondary_example_queries 'donor AB+';
description 'Donor types for a given blood type';
name 'BloodDonor';
code_url 'https://github.com/duckduckgo/zeroclickinfo-goodies/blob/master/lib/DDG/Goodie/BloodDonor.pm';
category 'special';
topics 'everyday';
attribution github => ['https://github.com/faraday', 'faraday'];
my %typeMap = (
'A' => 'A,O',
'O' => 'O',
'AB' => 'AB,A,B,O',
'B' => 'B,O',
);
sub apply_css($)
{
my ($html) = @_;
my $css = scalar share('style.css')->slurp;
return "<style type='text/css'>$css</style>\n$html";
}
sub table_data {
my ($label, $value) = @_;
return "<tr><td class='text--secondary'>$label</td><td class='text--primary'>$value</td></tr>";
}
handle remainder => sub {
if ($_ =~ /^(O|A|B|AB)(\-|\+)$/i) {
my $type = uc $1;
my $rh = $2;
my @idealResults = ();
my @criticalResults = ();
return unless defined $typeMap{$type};
# ideally same Rh
foreach our $donorType (split(",", $typeMap{$type})) {
push(@idealResults, $donorType . $rh);
if($rh eq '+') {
# only when access to same Rh is impossible
push(@criticalResults, $donorType . '-');
}
}
my $output = '';
my $html = "<table class='blooddonor'>";
my $idealStr = join(' or ', @idealResults);
my $criticalStr = join(' or ', @criticalResults);
$output .= "Ideal donor: " . uc($_) . "\n";
$output .= "Other donors: " . $idealStr . "\n";
$html .= table_data("Ideal donor:", uc($_));
$html .= table_data("Other donors:", $idealStr);
if($rh eq '+') {
$output .= "Only if no Rh(+) found: " . $criticalStr . "\n";
$html .= table_data("<i>Only if</i> no Rh(+) found:", $criticalStr);
}
$html .= '</table>';
return $output, html => apply_css($html), heading => "Donors for blood type ".uc($_);
}
return;
};
1;

View File

@ -1,6 +1,8 @@
package DDG::Goodie::Calculator;
# ABSTRACT: do simple arthimetical calculations
use feature 'state';
use DDG::Goodie;
use List::Util qw( all first max );
@ -28,14 +30,14 @@ triggers query_nowhitespace => qr<
[\( \) x X * % + / \^ \$ -]*
(?: [0-9 \. ,]* )
(?: gross | dozen | pi | e | c |)
(?: gross | dozen | pi | e | c | squared | score |)
[\( \) x X * % + / \^ 0-9 \. , \$ -]*
(?(1) (?: -? [0-9 \. ,]+ |) |)
(?: [\( \) x X * % + / \^ \$ -] | times | divided by | plus | minus | cos | sin | tan | cotan | log | ln | log[_]?\d{1,3} | exp | tanh | sec | csc)+
(?: [\( \) x X * % + / \^ \$ -] | times | divided by | plus | minus | cos | sin | tan | cotan | log | ln | log[_]?\d{1,3} | exp | tanh | sec | csc | squared )+
(?: [0-9 \. ,]* )
(?: gross | dozen | pi | e | c |)
(?: gross | dozen | pi | e | c | squared | score |)
[\( \) x X * % + / \^ 0-9 \. , \$ -]* =?
@ -74,8 +76,8 @@ foreach my $style (@known_styles) {
# Luckily it will someday be able to be tokenized so this won't apply.
my $all_seps = join('', map { $_->{decimal} . $_->{thousands} } @known_styles);
my $numbery = qr/^[\d$all_seps]+$/;
my $funcy = qr/[[a-z]+\(|log[_]?\d{1,3}\(|\^/; # Stuff that looks like functions.
my $numbery = qr/[\d$all_seps]+/;
my $funcy = qr/[[a-z]+\(|log[_]?\d{1,3}\(|\^|\/|\*/; # Stuff that looks like functions.
my %named_operations = (
'\^' => '**',
@ -85,6 +87,7 @@ my %named_operations = (
'plus' => '+',
'divided\sby' => '/',
'ln' => 'log', # perl log() is natural log.
'squared' => '**2',
);
my %named_constants = (
@ -92,6 +95,7 @@ my %named_constants = (
e => 2.71828182845904523536028747135266249, # This should be computed.
pi => pi, # pi constant from Math::Trig
gross => 144,
score => 20,
);
my $ored_constants = join('|', keys %named_constants); # For later substitutions
@ -125,7 +129,7 @@ handle query_nowhitespace => sub {
$tmp_expr =~ s#\b$name\b# $constant #ig;
}
my @numbers = grep { $_ =~ $numbery } (split /\s+/, $tmp_expr);
my @numbers = grep { $_ =~ /^$numbery$/ } (split /\s+/, $tmp_expr);
my $style = display_style(@numbers);
return unless $style;
@ -137,6 +141,7 @@ handle query_nowhitespace => sub {
# e.g. sin(100000)/100000 completely makes this go haywire.
alarm(1);
$tmp_result = eval($tmp_expr);
alarm(0); # Assume the string processing will be "fast enough"
};
# Guard against non-result results
@ -165,8 +170,7 @@ handle query_nowhitespace => sub {
$results_no_html = $results_html = $tmp_q;
# Superscript (before spacing).
$results_html =~ s/\^([^\)]+)/<sup>$1<\/sup>/g;
$results_html =~ s/\^(\d+|\b(?:$ored_constants)\b)/<sup>$1<\/sup>/g;
$results_html =~ s/\^($numbery|\b$ored_constants\b)/<sup>$1<\/sup>/g;
($results_no_html, $results_html) = map { spacing($_) } ($results_no_html, $results_html);
return if $results_no_html =~ /^\s/;
@ -176,18 +180,29 @@ handle query_nowhitespace => sub {
# Now add = back.
$results_no_html .= ' = ';
$results_html .= ' = ';
$results_html =
qq(<div>$results_html<a href="javascript:;" onClick="document.x.q.value='$tmp_result';document.x.q.focus();">$tmp_result</a></div>);
return $results_no_html . $tmp_result,
html => $results_html,
html => wrap_html($results_html, $tmp_result),
heading => "Calculator";
}
return;
};
# Add some HTML and styling to our output
# so that we can make it prettier (unabashedly stolen from
# the ReverseComplement goodie.)
sub append_css {
my $html = shift;
state $css = share("style.css")->slurp;
return "<style type='text/css'>$css</style>$html";
}
sub wrap_html {
my ($entered, $result) = @_;
return append_css("<div class='zci--calculator'>$entered = <a href='javascript:;' onclick='document.x.q.value=\"$result\";document.x.q.focus();'>$result</a></div>");
}
#separates symbols with a space
#spacing '1+1' -> '1 + 1'
sub spacing {
@ -195,7 +210,7 @@ sub spacing {
$text =~ s/(\s*(?<!<)(?:[\+\-\^xX\*\/\%]|times|plus|minus|dividedby)+\s*)/ $1 /ig;
$text =~ s/\s*dividedby\s*/ divided by /ig;
$text =~ s/(\d+?)((?:dozen|pi|gross))/$1 $2/ig;
$text =~ s/(\d+?)((?:dozen|pi|gross|squared|score))/$1 $2/ig;
$text =~ s/(\d+?)e/$1 e/g; # E == *10^n
$text =~ s/([\(\)\$])/ $1 /g if ($space_for_parse);
@ -231,8 +246,9 @@ sub _well_formed_for_style_func {
return (
$number =~ /^[\d$thousands$decimal]+$/
# Only contains things we understand.
&& ($number !~ /$thousands/ || ($number !~ /$thousands\d{1,2}\b/ && $number !~ /$thousands\d{4,}/))
# You can leave out thousands breaks, but the ones you put in must be in the right place.
&& ($number !~ /$thousands/ || ($number !~ /$thousands\d{1,2}\b/ && $number !~ /$thousands\d{4,}/ && $number !~ /^0\Q$thousands\E/))
# You can leave out thousands breaks, but the ones you put in must be in the right place
# which does not include following an initial 0.
# Note that this does not confirm that they put all the 'required' ones in.
&& ($number !~ /$decimal/ || $number !~ /$decimal(?:.*)?(?:$decimal|$thousands)/)
# You can omit the decimal but you cannot have another decimal or thousands after:

View File

@ -1,23 +0,0 @@
package DDG::Goodie::Capitalize;
use DDG::Goodie;
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;

View File

@ -0,0 +1,113 @@
package DDG::Goodie::ChineseZodiac;
# ABSTRACT: Return the Chinese zodiac animal for a given year.
use DDG::Goodie;
use DateTime::Calendar::Chinese;
use DateTime::Event::Chinese qw(chinese_new_year_before chinese_new_year_after);
use utf8;
use feature 'state';
triggers any => 'chinese zodiac', 'shēngxiào', 'shengxiao', 'shēng xiào', 'sheng xiao';
zci is_cached => 1;
name 'Chinese Zodiac';
description 'Return the Chinese zodiac animal for a given year';
primary_example_queries 'chinese zodiac for 1969';
secondary_example_queries '2004 chinese zodiac animal', 'what was the chinese zodiac animal in 1992', 'what will the chinese zodiac animal be for 2056', 'last year\'s chinese zodiac';
category 'dates';
topics 'special_interest';
code_url 'https://github.com/duckduckgo/zeroclickinfo-goodies/blob/master/lib/DDG/Goodie/ChineseZodiac.pm';
attribution github => ['http://github.com/wilkox', 'wilkox'];
my %animal_to_language = (
'hare' => { en => 'Rabbit', zh => '兔' },
'dragon' => { en => 'Dragon', zh => '龙' },
'snake' => { en => 'Snake', zh => '蛇' },
'horse' => { en => 'Horse', zh => '马' },
'sheep' => { en => 'Goat', zh => '羊' },
'monkey' => { en => 'Monkey', zh => '猴' },
'fowl' => { en => 'Rooster', zh => '鸡' },
'dog' => { en => 'Dog', zh => '狗' },
'pig' => { en => 'Pig', zh => '猪' },
'rat' => { en => 'Rat', zh => '鼠' },
'ox' => { en => 'Ox', zh => '牛' },
'tiger' => { en => 'Tiger', zh => '虎' }
);
handle remainder => sub {
#Figure out what year the user is interested in
my $year_gregorian;
#Return if more than one number has been included;
# this IA only supports years (for now)
return if /\d+[^\d]+\d+/;
#Parse out a relative year expression if it was supplied
if (/this\syear('s)?/) {
$year_gregorian = DateTime->now(time_zone => 'Asia/Shanghai') or return;
} elsif (/next\syear('s)?/) {
$year_gregorian = DateTime->now(time_zone => 'Asia/Shanghai')->add(years => 1) or return;
} elsif (/last\syear('s)?/) {
$year_gregorian = DateTime->now(time_zone => 'Asia/Shanghai')->subtract(years => 1) or return;
#If no relative year was supplied, look for an explicit year
# DateTime::Event::SolarTerm only supports 1900--2069, so
# return nothing if the user provides a year outside this range
} elsif (/\b(\d+)\b/) {
return unless $1 >= 1900 && $1 <= 2069;
$year_gregorian = DateTime->new(year => $1, month => 6, time_zone => 'Asia/Shanghai');
#Otherwise, default to now if it seems like the user is
# asking a question about the current zodiac animal
} elsif (/(what|which|year|animal|current|now|today|this)/) {
$year_gregorian = DateTime->now(time_zone => 'Asia/Shanghai') or return;
#Don't want to show instant answer if user is just looking for
# general information on the chinese zodiac
} else {
return;
}
#Find the Chinese year that aligns
# with the query (presumed Gregorian) year
my $year_chinese = DateTime::Calendar::Chinese->from_object(object => $year_gregorian);
#Get the inclusive Gregorian date range for the Chinese year
#Note that returned dates will be for the 'Asia/Shanghai'
# time zone (China Standard Time/CST) as this is where
# Chinese New Year is calculated
my $year_start = chinese_new_year_before($year_gregorian)->set_time_zone('Asia/Shanghai');
my $year_end = chinese_new_year_after($year_gregorian)->subtract(days => 1)->set_time_zone('Asia/Shanghai');
my $animal = $year_chinese->zodiac_animal;
my $english = $animal_to_language{$animal}{'en'};
my $character = $animal_to_language{$animal}{'zh'};
my $statement = 'Chinese zodiac animal for ' . format_datetime($year_start) . "\x{2013}" . format_datetime($year_end);
return answer => $english, html => wrap_html($character, $english, $statement);
};
sub format_datetime {
my $dt = shift;
my $formatted = $dt->strftime('%b %e, %Y');
$formatted =~ s/\s\s/ /g;
return $formatted;
}
# This function adds some HTML and styling to our output
# so that we can make it prettier (copied from the Conversions
# goodie)
sub append_css {
my $html = shift;
state $css = share("style.css")->slurp;
return "<style type='text/css'>$css</style>$html";
}
sub wrap_html {
my ($character, $english, $statement) = @_;
return append_css("<div class='zci--chinesezodiac'><div class='zodiaccharacter'>$character ($english)</div><span class='statement'>$statement</span></div>");
}
1;

View File

@ -67,9 +67,9 @@ sub append_css {
sub wrap_html {
my ($factor, $result) = @_;
my $from = encode_entities($factor) . " <span class='unit'>" . encode_entities($result->{'from_unit'}) . "</span>";
my $to = encode_entities($result->{'result'}) . " <span class='unit'>" . encode_entities($result->{'to_unit'}) . "</span>";
return append_css("<div class='zci--conversions'>$from = $to</div>");
my $from = encode_entities($factor) . " <span class='text--secondary'>" . encode_entities($result->{'from_unit'}) . "</span>";
my $to = encode_entities($result->{'result'}) . " <span class='text--secondary'>" . encode_entities($result->{'to_unit'}) . "</span>";
return append_css("<div class='zci--conversions text--primary'>$from = $to</div>");
}
handle query_lc => sub {

View File

@ -91,7 +91,8 @@ handle remainder_lc => sub {
}
$total += $sum; # track total of all rolls
$out .= join(', ', @output) . '<br/>';
$html .= '<span style="font-size:14pt;">' . join(', ', @output) . '</span> = ' . $sum .'<br/>';
$html .= '<span style="font-size:2em;">' . join(' ', @output).'</span>'
.'<span style="white-space: nowrap; font-size:2em;">'." = ". $sum.'</span></br>';
}
elsif ($_ =~ /^(\d*)[d|w](\d+)\s?([+-])?\s?(\d+|[lh])?$/) {
# ex. '2d8', '2w6 - l', '3d4 + 4', '3d4-l'

77
lib/DDG/Goodie/FIGlet.pm Normal file
View File

@ -0,0 +1,77 @@
package DDG::Goodie::FIGlet;
# ABSTRACT: Uses FIGlet to make large letters out of ordinary text.
use DDG::Goodie;
use Text::FIGlet;
triggers startend => "figlet", "bigtext", "big text";
primary_example_queries 'figlet DuckDuckGo';
secondary_example_queries 'figlet computer DuckDuckGo';
name 'FIGlet';
description 'Uses FIGlet to make large letters out of ordinary text.';
category 'transformations';
topics 'words_and_games';
code_url 'https://github.com/duckduckgo/zeroclickinfo-goodies/blob/master/lib/DDG/Goodie/Figlet.pm';
attribution
web => ['http://engvik.nu', 'Lars Jansøn Engvik'],
github => [ 'larseng', 'Lars Jansøn Engvik'];
zci answer_type => 'figlet';
zci is_cached => 1;
my $width = 800;
my $css = share("style.css")->slurp;
# Fetch available fonts.
opendir DIR, share();
my @fonts = readdir(DIR);
closedir DIR;
# Renders a figlet.
sub render_figlet {
my ($font, $text) = @_;
return Text::FIGlet->new(-f=>$font, -d=>share())->figify(-w=>$width, -A=>$text);
}
# Apply CSS.
sub apply_css {
my ($html) = @_;
return "<style type='text/css'>$css</style>\n" . $html;
}
handle query => sub {
my $font;
my $text;
my $figlet;
my $html;
# Return if no input provided.
return if ((lc $_ eq 'figlet') || (lc $_ eq 'bigtext') || (lc $_ eq 'big text'));
# Parse query.
$_ =~ m/^(?:figlet|bigtext|big text)(?:\-|\s+)(.*)|(.*)\s+(?:figlet|bigtext|big text)$/i;
$text = $1 if $1;
$text = $2 if $2;
# Checks if the first word is a font.
$text =~ m/^\s*(\w+)/;
$font = lc $1 if grep /\b$1\b/i, @fonts;
# Strip the font from the text to render if we're using a font.
if ($font && $font ne $text) {
$text = substr $text, length ($font)+1, length $text;
} else {
$font = "standard";
}
# Render the FIGlet
$figlet = render_figlet($font, $text);
$html = "<div id='figlet-wrapper'><span>Font: </span><span id='figlet-font'>$font</span><pre contenteditable='true'>$figlet</pre></div>";
return $figlet, html => apply_css($html) if $figlet;
return;
};
1;

View File

@ -16,13 +16,14 @@ attribution github => ['https://github.com/frncscgmz', 'frncscgmz'];
zci is_cached => 0;
zci answer_type => "fortune";
my $ffile = share('fortunes');
my $fortune_file = Fortune->new($ffile);
$fortune_file->read_header();
handle remainder => sub {
my $ffile = share('fortunes');
my $fortune_file = Fortune->new($ffile);
$fortune_file->read_header();
my $output = $fortune_file->get_random_fortune();
$output =~ s/\n//g;
return $output;
my $output = $fortune_file->get_random_fortune();
$output =~ s/\n//g;
return $output;
};
1;

View File

@ -6,6 +6,7 @@ use Data::GUID;
triggers start => 'globally', 'universally', 'rfc', 'guid', 'uuid';
zci answer_type => "guid";
zci is_cached => 0;
primary_example_queries 'guid';
secondary_example_queries 'uuid';
@ -38,4 +39,4 @@ handle query_lc => sub {
}
return;
};
1;
1;

File diff suppressed because one or more lines are too long

View File

@ -15,7 +15,7 @@ topics 'sysadmin';
attribution github => ['https://github.com/warthurton', 'warthurton'];
triggers end => "public dns", "dns servers";
triggers end => "public dns", "dns server", "dns servers";
zci is_cached => 1;
zci answer_type => "public_dns";

View File

@ -46,234 +46,235 @@ secondary_example_queries 'regexp $';
category 'computing_tools';
# The order to display each category and in which columns
our @category_column = (
['Anchors', 'Character Classes', 'POSIX Classes', 'Pattern Modifiers', 'Escape Sequences'],
['Quantifiers', 'Groups and Ranges', 'Assertions', 'Special Characters', 'String Replacement']
my @category_column = (
['Anchors', 'Character Classes', 'POSIX Classes', 'Pattern Modifiers', 'Escape Sequences'],
['Quantifiers', 'Groups and Ranges', 'Assertions', 'Special Characters', 'String Replacement']
);
# Titles of tables and the symbols to explain
our %categories = (
'Anchors' => [
'^', '\A', '$', '\Z', '\b', '\B', '\<', '\>'
],
'Character Classes' => [
'\c', '\s', '\S', '\d', '\D', '\w', '\W', '\x', '\O'
],
'POSIX Classes' => [
'[:upper:]', '[:lower:]', '[:alpha:]', '[:alnum:]', '[:digit:]',
'[:xdigit:]', '[:punct:]', '[:blank:]', '[:space:]', '[:cntrl:]',
'[:graph:]', '[:print:]', '[:word:]'
],
'Assertions' => [
'?=', '?!', '?<=', '?!= or ?<!', '?>', '?()', '?()|', '?#'
],
'Quantifiers' => [
'*', '+', '?', '{3}', '{3,}', '{2,5}'
],
'Escape Sequences' => [
'\\', '\Q', '\E'
],
'Special Characters' => [
'\n', '\r', '\t', '\v', '\f', '\ooo', '\xhh'
],
'Groups and Ranges' => [
'.', '(a|b)', '(...)', '(?:...)', '[abc]', '[^abc]', '[a-q]', '[A-Z]', '[0-9]'
],
'Pattern Modifiers' => [
'//g', '//i', '//m', '//s', '//x', '//e', '//U'
],
'String Replacement' => [
'$n', '$2', '$1', '$`', q{$'}, '$+', '$&'
],
my %categories = (
'Anchors' => [
'^', '\A', '$', '\Z', '\b', '\B', '\<', '\>'
],
'Character Classes' => [
'\c', '\s', '\S', '\d', '\D', '\w', '\W', '\x', '\O'
],
'POSIX Classes' => [
'[:upper:]', '[:lower:]', '[:alpha:]', '[:alnum:]', '[:digit:]',
'[:xdigit:]', '[:punct:]', '[:blank:]', '[:space:]', '[:cntrl:]',
'[:graph:]', '[:print:]', '[:word:]'
],
'Assertions' => [
'?=', '?!', '?<=', '?!= or ?<!', '?>', '?()', '?()|', '?#'
],
'Quantifiers' => [
'*', '+', '?', '{3}', '{3,}', '{2,5}'
],
'Escape Sequences' => [
'\\', '\Q', '\E'
],
'Special Characters' => [
'\n', '\r', '\t', '\v', '\f', '\ooo', '\xhh'
],
'Groups and Ranges' => [
'.', '(a|b)', '(...)', '(?:...)', '[abc]', '[^abc]', '[a-q]', '[A-Z]', '[0-9]'
],
'Pattern Modifiers' => [
'//g', '//i', '//m', '//s', '//x', '//e', '//U'
],
'String Replacement' => [
'$n', '$2', '$1', '$`', q{$'}, '$+', '$&'
],
);
# Symbols and their explanation/description
our %syntax_map = (
'.' => 'Any character except newline (\n)',
'(a|b)' => 'a or b',
'(...)' => 'Group',
'(?:...)' => 'Passive (non-capturing) group',
'[abc]' => 'Single character (a or b or c)',
'[^abc]' => 'Single character (not a or b or c)',
'[a-q]' => 'Single character range (a or b ... or q)',
'[A-Z]' => 'Single character range (A or B ... or Z)',
'[0-9]' => 'Single digit from 0 to 9',
'^' => "Start of string or line",
'\A' => "Start of string",
'$' => "End of string or line",
'\Z' => "End of string",
'\b' => 'Word boundary',
'\B' => 'Not word boundary',
'\<' => 'Start of word',
'\>' => 'End of word',
'\c' => 'Control character',
'\s' => 'Whitespace',
'\S' => 'Not Whitespace',
'\d' => 'Digit',
'\D' => 'Not digit',
'\w' => 'Word',
'\W' => 'Not Word',
'\x' => 'Hexadecimal digit',
'\O' => 'Octal Digit',
'[:upper:]' => 'Uppercase letters [A-Z]',
'[:lower:]' => 'Lowercase letters [a-z]',
'[:alpha:]' => 'All letters [A-Za-z]',
'[:alnum:]' => 'Digits and letters [A-Za-z0-9]',
'[:digit:]' => 'Digits [0-9]',
'[:xdigit:]' => 'Hexadecimal digits [0-9a-f]',
# '[:punct:]' => 'Punctuation [\]\[!"#$%&'."'".'()*+,./:;<=>?@\^_`{|}~-]',
'[:punct:]' => 'Punctuation',
'[:blank:]' => 'Space and tab [ \t]',
'[:space:]' => 'Blank characters [ \t\r\n\v\f]',
'[:cntrl:]' => 'Control characters [\x00-\x1F\x7F]',
'[:graph:]' => 'Printed characters [\x21-\x7E]',
'[:print:]' => 'Printed characters and spaces [\x20-\x7E]',
'[:word:]' => 'Digits, letters and underscore [A-Za-z0-9_]',
'?=' => 'Lookahead assertion',
'?!' => 'Negative lookahead',
'?<=' => 'Lookbehind assertion',
'?!= or ?<!' => 'Negative lookbehind',
'?>' => 'Once-only Subexpression',
'?()' => 'Condition [if then]',
'?()|' => 'Condition [if then else]',
'?#' => 'Comment',
'*' => '0 or more',
'+' => '1 or more',
'?' => '0 or 1 (optional)',
'{3}' => 'Exactly 3',
'{3,}' => '3 or more',
'{2,5}' => '2, 3, 4 or 5',
'\\' => 'Escape following character',
'\Q' => 'Begin literal sequence',
'\E' => 'End literal sequence',
'\n' => 'New line',
'\r' => 'Carriage return',
'\t' => 'Tab',
'\v' => 'Vertical tab',
'\f' => 'Form feed',
'\ooo' => 'Octal character ooo',
'\xhh' => 'Hex character hh',
'//g' => 'Global Match (all occurrences)',
'//i' => 'Case-insensitive',
'//m' => 'Multiple line',
'//s' => 'Treat string as single line',
'//x' => 'Allow comments and whitespace',
'//e' => 'Evaluate replacement',
'//U' => 'Ungreedy pattern',
'$n' => 'n-th non-passive group',
'$2' => '"xyz" in /^(abc(xyz))$/',
'$1' => '"xyz" in /^(?:abc)(xyz)$/',
'$`' => 'Before matched string',
q{$'} => 'After matched string',
'$+' => 'Last matched string',
'$&' => 'Entire matched string',
my %syntax_map = (
'.' => 'Any character except newline (\n)',
'(a|b)' => 'a or b',
'(...)' => 'Group',
'(?:...)' => 'Passive (non-capturing) group',
'[abc]' => 'Single character (a or b or c)',
'[^abc]' => 'Single character (not a or b or c)',
'[a-q]' => 'Single character range (a or b ... or q)',
'[A-Z]' => 'Single character range (A or B ... or Z)',
'[0-9]' => 'Single digit from 0 to 9',
'^' => "Start of string or line",
'\A' => "Start of string",
'$' => "End of string or line",
'\Z' => "End of string",
'\b' => 'Word boundary',
'\B' => 'Not word boundary',
'\<' => 'Start of word',
'\>' => 'End of word',
'\c' => 'Control character',
'\s' => 'Whitespace',
'\S' => 'Not Whitespace',
'\d' => 'Digit',
'\D' => 'Not digit',
'\w' => 'Word',
'\W' => 'Not Word',
'\x' => 'Hexadecimal digit',
'\O' => 'Octal Digit',
'[:upper:]' => 'Uppercase letters [A-Z]',
'[:lower:]' => 'Lowercase letters [a-z]',
'[:alpha:]' => 'All letters [A-Za-z]',
'[:alnum:]' => 'Digits and letters [A-Za-z0-9]',
'[:digit:]' => 'Digits [0-9]',
'[:xdigit:]' => 'Hexadecimal digits [0-9a-f]',
# '[:punct:]' => 'Punctuation [\]\[!"#$%&'."'".'()*+,./:;<=>?@\^_`{|}~-]',
'[:punct:]' => 'Punctuation',
'[:blank:]' => 'Space and tab [ \t]',
'[:space:]' => 'Blank characters [ \t\r\n\v\f]',
'[:cntrl:]' => 'Control characters [\x00-\x1F\x7F]',
'[:graph:]' => 'Printed characters [\x21-\x7E]',
'[:print:]' => 'Printed characters and spaces [\x20-\x7E]',
'[:word:]' => 'Digits, letters and underscore [A-Za-z0-9_]',
'?=' => 'Lookahead assertion',
'?!' => 'Negative lookahead',
'?<=' => 'Lookbehind assertion',
'?!= or ?<!' => 'Negative lookbehind',
'?>' => 'Once-only Subexpression',
'?()' => 'Condition [if then]',
'?()|' => 'Condition [if then else]',
'?#' => 'Comment',
'*' => '0 or more',
'+' => '1 or more',
'?' => '0 or 1 (optional)',
'{3}' => 'Exactly 3',
'{3,}' => '3 or more',
'{2,5}' => '2, 3, 4 or 5',
'\\' => 'Escape following character',
'\Q' => 'Begin literal sequence',
'\E' => 'End literal sequence',
'\n' => 'New line',
'\r' => 'Carriage return',
'\t' => 'Tab',
'\v' => 'Vertical tab',
'\f' => 'Form feed',
'\ooo' => 'Octal character ooo',
'\xhh' => 'Hex character hh',
'//g' => 'Global Match (all occurrences)',
'//i' => 'Case-insensitive',
'//m' => 'Multiple line',
'//s' => 'Treat string as single line',
'//x' => 'Allow comments and whitespace',
'//e' => 'Evaluate replacement',
'//U' => 'Ungreedy pattern',
'$n' => 'n-th non-passive group',
'$2' => '"xyz" in /^(abc(xyz))$/',
'$1' => '"xyz" in /^(?:abc)(xyz)$/',
'$`' => 'Before matched string',
q{$'} => 'After matched string',
'$+' => 'Last matched string',
'$&' => 'Entire matched string',
);
sub are_valid_char_classes($$) {
my ($a, $b) = @_;
# must be both numbers or both lowercase or both uppercase
if ($a =~ /[0-9]/ && $b =~ /[0-9]/ || $a =~ /[a-z]/ && $b =~ /[a-z]/ || $a =~ /[A-Z]/ && $b =~ /[A-Z]/) {
return $b gt $a;
}
return;
my ($a, $b) = @_;
# must be both numbers or both lowercase or both uppercase
if ($a =~ /[0-9]/ && $b =~ /[0-9]/ || $a =~ /[a-z]/ && $b =~ /[a-z]/ || $a =~ /[A-Z]/ && $b =~ /[A-Z]/) {
return $b gt $a;
}
return;
}
sub difference_between($$) {
my ($a, $b) = @_;
return ord($b) - ord($a);
my ($a, $b) = @_;
return ord($b) - ord($a);
}
my $css = scalar share("style.css")->slurp;
sub append_css {
my $html = shift;
my $css = scalar share("style.css")->slurp;
return "<style type='text/css'>$css</style>\n" . $html;
}
handle remainder => sub {
my $heading = 'Regex Cheat Sheet';
# If the user has requested information on a specific pattern.
if (length $_ > 0) {
my $syntax_key = $_;
# If the user has requested information on a specific pattern.
if (length $_ > 0) {
my $syntax_key = $_;
# Let the user provide [a-e], [1-2], nice simple examples only!
if ($_ =~ /^\[([a-zA-Z0-9])\-([a-zA-Z0-9])\]$/) {
return unless are_valid_char_classes($1, $2);
#if there are < 3 between them then output all between them, otherwise "0 or 1 .. or 9" style
my $range_string = "";
if (difference_between($1, $2) < 3) {
$range_string = join(" or ", ($1..$2));
}
else {
$range_string = join(" or ", ($1..$2)[0,1]) . " ... or $2";
}
return answer => "$_ - Single character range ($range_string)",
html => "<code> $_ </code> - Single character range ($range_string)",
heading => $heading;
}
# Let the user provide a number for the {n} pattern, e.g., {5} would say "Exactly 5 occurrences".
elsif ($_ =~ /^\{([0-9]+)\}$/) {
return answer => "$_ - Exactly $1 occurrences",
html => "<code>" . encode_entities($_) . "</code> - Exactly " . encode_entities($_) . " occurrences",
heading => $heading;
}
# Let the user provide numbers for {n,} and {n,m}, e.g., {4,} would say "4 or more occurrences".
elsif ($_ =~ /^\{([0-9]+),([0-9]+)?\}$/) {
if ($2) {
return unless ($1 < $2);
return answer => "$_ - Between $1 and $2 occurrences",
html => "<code>" . encode_entities($_) . "</code> - Between $1 and $2 occurrences",
heading => $heading;
}
return answer => "$_ - $1 or more",
html => "<code> " . encode_entities($_) . " </code> - $1 or more occurrences",
heading => $heading;
}
# Check our map if it's in our list of regex patterns.
return unless $syntax_map{$syntax_key};
my $text_output = "$_ - $syntax_map{$syntax_key}";
my $html_output = "<code> " . encode_entities($_) . " </code> - " . encode_entities($syntax_map{$syntax_key});
return answer => $text_output, html => $html_output, heading => $heading;
}
# Otherwise display the complete tabular output, into n columns in the order specified.
my $text_output = '';
# Content of the div column wrapper.
my @html_columns = ();
# Add a helper function for adding the <td> tag.
sub add_table_data {
my ($text, $is_code) = @_;
if($is_code) {
return "<td><code>" . encode_entities($text) . "</code></td>";
}
return "<td>" . encode_entities($text) . "</tb>";
}
# Let the user provide [a-e], [1-2], nice simple examples only!
if ($_ =~ /^\[([a-zA-Z0-9])\-([a-zA-Z0-9])\]$/) {
return unless are_valid_char_classes($1, $2);
#if there are < 3 between them then output all between them, otherwise "0 or 1 .. or 9" style
my $range_string = "";
if (difference_between($1, $2) < 3) {
$range_string = join(" or ", ($1..$2));
}
else {
$range_string = join(" or ", ($1..$2)[0,1]) . " ... or $2";
}
return answer => "$_ - Single character range ($range_string)",
html => "<code>$_</code> - Single character range ($range_string)",
heading => $heading;
}
# Let the user provide a number for the {n} pattern, e.g., {5} would say "Exactly 5 occurrences".
elsif ($_ =~ /^\{([0-9]+)\}$/) {
return answer => "$_ - Exactly $1 occurrences",
html => "<code>" . encode_entities($_) . "</code> - Exactly " . encode_entities($_) . " occurrences",
heading => $heading;
}
# Let the user provide numbers for {n,} and {n,m}, e.g., {4,} would say "4 or more occurrences".
elsif ($_ =~ /^\{([0-9]+),([0-9]+)?\}$/) {
if ($2) {
return unless ($1 < $2);
return answer => "$_ - Between $1 and $2 occurrences",
html => "<code>" . encode_entities($_) . "</code> - Between $1 and $2 occurrences",
heading => $heading;
}
return answer => "$_ - $1 or more",
html => "<code>" . encode_entities($_) . "</code> - $1 or more occurrences",
heading => $heading;
}
# Check our map if it's in our list of regex patterns.
return unless $syntax_map{$syntax_key};
my $text_output = "$_ - $syntax_map{$syntax_key}";
my $html_output = "<code>" . encode_entities($_) . "</code> - " . encode_entities($syntax_map{$syntax_key});
return answer => $text_output, html => $html_output, heading => $heading;
}
# Otherwise display the complete tabular output, into n columns in the order specified.
my $text_output = '';
# Content of the div column wrapper.
my @html_columns = ();
# Add a helper function for adding the <td> tag.
sub add_table_data {
my ($text, $is_code) = @_;
if($is_code) {
return "<td><code>" . encode_entities($text) . "</code></td>";
}
return "<td>" . encode_entities($text) . "</tb>";
}
for(my $column = 0; $column < scalar(@category_column); ++$column) {
for my $category (@{$category_column[$column]}) {
my $new_table = "<table class='regex-table'><b>$category</b>";
for(my $column = 0; $column < scalar(@category_column); ++$column) {
for my $category (@{$category_column[$column]}) {
my $new_table = "<table class='regex-table'><b>$category</b>";
$text_output .= "$category\n";
$text_output .= "$category\n";
for my $syntax_object (@{$categories{$category}}) {
$new_table .= "<tr>" . add_table_data($syntax_object, 1) . add_table_data($syntax_map{$syntax_object}, 0) . "</tr>\n";
$text_output .= "\t$syntax_object - $syntax_map{$syntax_object}\n";
}
$text_output .= "\n";
$new_table .= "</table>\n";
$html_columns[$column] .= $new_table;
}
}
my $html_output = "<div class='regex-container'><div class='regex-column'>";
$html_output .= join ("</div><div class='regex-column'>", @html_columns);
$html_output .= "</div></div>";
return answer => $text_output, html => append_css($html_output), heading => $heading;
for my $syntax_object (@{$categories{$category}}) {
$new_table .= "<tr>" . add_table_data($syntax_object, 1) . add_table_data($syntax_map{$syntax_object}, 0) . "</tr>\n";
$text_output .= "\t$syntax_object - $syntax_map{$syntax_object}\n";
}
$text_output .= "\n";
$new_table .= "</table>\n";
$html_columns[$column] .= $new_table;
}
}
my $html_output = "<div class='regex-container'><div class='regex-column'>";
$html_output .= join ("</div><div class='regex-column'>", @html_columns);
$html_output .= "</div></div>";
return answer => $text_output, html => append_css($html_output), heading => $heading;
};
1;
1;

View File

@ -1,22 +1,29 @@
package DDG::Goodie::Reverse;
# ABSTRACT: Reverse the order of chars in the remainder
use DDG::Goodie;
primary_example_queries 'reverse esrever';
description 'reverse the order of the characters in your query';
name 'Reverse';
code_url 'https://github.com/duckduckgo/zeroclickinfo-goodies/blob/master/lib/DDG/Goodie/Reverse.pm';
category 'transformations';
topics 'words_and_games';
attribution github => ['https://github.com/Getty', 'Getty'], cpan => 'GETTY';
triggers startend => "reverse";
zci is_cached => 1;
zci answer_type => "reverse";
handle remainder => sub { qq|Reversed "$_": | . scalar reverse };
1;
package DDG::Goodie::Reverse;
# ABSTRACT: Reverse the order of chars in the remainder
use DDG::Goodie;
primary_example_queries 'reverse esrever';
description 'reverse the order of the characters in your query';
name 'Reverse';
code_url 'https://github.com/duckduckgo/zeroclickinfo-goodies/blob/master/lib/DDG/Goodie/Reverse.pm';
category 'transformations';
topics 'words_and_games';
attribution github => ['https://github.com/Getty', 'Getty'], cpan => 'GETTY';
triggers startend => "reverse";
zci is_cached => 1;
zci answer_type => "reverse";
handle remainder => sub {
#Filter out requests for DNA/RNA reverse complements, handled
# by the ReverseComplement goodie
return if $_ =~ /^complement\s(of )?[ATCGURYKMSWBVDHN\s-]+$/i;
return qq|Reversed "$_": | . scalar reverse;
};
1;

View File

@ -0,0 +1,62 @@
package DDG::Goodie::ReverseComplement;
# ABSTRACT: Give the DNA reverse complement of a DNA or RNA sequence.
use DDG::Goodie;
use feature 'state';
triggers startend => 'reverse complement', 'revcomp';
zci is_cached => 1;
name 'Reverse Complement';
description 'Give the DNA reverse complement of a DNA or RNA sequence';
primary_example_queries 'revcomp AAAACCCGGT';
category 'transformations';
topics 'science';
code_url 'https://github.com/duckduckgo/zeroclickinfo-goodies/blob/master/lib/DDG/Goodie/ReverseComplement.pm';
attribution github => ['http://github.com/wilkox', 'wilkox'];
handle remainder => sub {
#Remove 'of' if supplied
$_ =~ s/^of\s//g;
my $sequence = $_;
#Remove whitespace and dashes and make uppercase
$sequence =~ s/\s|-//g;
$sequence = uc($sequence);
#Return nothing if sequence contains characters
# other than DNA/RNA bases or standard IUPAC ambiguity codes
return if $sequence =~ /[^ATCGURYKMSWBVDHN]/;
#DNA contains thymine (T) but not uracil (U);
# RNA contains U but not T (with some extremely
# rare exceptions). Hence, if the sequence
# contains both U and T it's more likely to be an
# error than a real molecule so should return nothing.
return if $sequence =~ /T/ && $sequence =~ /U/;
#Complement, using standard IUPAC codes
$sequence =~ tr/ATUCGRYKMBVHD/TAAGCYRMKVBDH/;
#Reverse
$sequence = reverse($sequence);
return $sequence, html => wrap_html('DNA reverse complement:', $sequence);
};
# This function adds some HTML and styling to our output
# so that we can make it prettier (copied from the Conversions
# goodie)
sub append_css {
my $html = shift;
state $css = share("style.css")->slurp;
return "<style type='text/css'>$css</style>$html";
}
sub wrap_html {
my ($label, $sequence) = @_;
return append_css("<div class='zci--reversecomplement'><div class='label'>$label</div><div class='sequence'>$sequence</div></div>");
}
1;

View File

@ -2,7 +2,7 @@ package DDG::Goodie::TitleCase;
use DDG::Goodie;
triggers startend => 'titlecase', 'ucfirst', 'title case';
triggers startend => 'titlecase', 'ucfirst', 'title case', 'capitalize';
primary_example_queries 'titlecase test';
description 'return the query in title case';

View File

@ -16,7 +16,7 @@ topics 'programming';
use constant {
CODEPOINT_RE => qr/^ \s* (?:U \+|\\(?:u|x)) (?<codepoint> [a-f0-9]{4,6}) \s* $/xi,
CODEPOINT_RE => qr/^ \s* (?:U \+|\\(?:u|x{(?=.*}))) (?<codepoint> [a-f0-9]{4,6})}? \s* $/xi,
NAME_RE => qr/^ (?<name> [A-Z][A-Z\s]+) $/xi,
CHAR_RE => qr/^ \s* (?<char> .) \s* $/x,
UNICODE_RE => qr/^ unicode \s+ (.+) $/xi,

View File

@ -0,0 +1,24 @@
package DDG::Goodie::Uppercase;
use DDG::Goodie;
triggers startend => 'uppercase', 'upper case', 'allcaps', 'all caps';
zci is_cached => 1;
zci answer_type => "uppercase";
primary_example_queries 'uppercase this';
secondary_example_queries 'upper case that';
name 'Uppercase';
description 'Make a string uppercase.';
code_url 'https://github.com/duckduckgo/zeroclickinfo-goodies/blob/master/lib/DDG/Goodie/Uppercase.pm';
category 'conversions';
topics 'programming';
attribution twitter => 'crazedpsyc',
cpan => 'CRZEDPSYC' ;
handle remainder => sub { uc ($_) };
1;

View File

@ -27,7 +27,7 @@ attribution github => ['http://github.com/mgarriott', 'mgarriott'];
handle remainder => sub {
my ($start, $end) = get_dates($_);
# If get_dates failed, return nothing.
# If get_dates failed, return nothing.
unless ($start && $end) {
return;
}
@ -76,16 +76,23 @@ sub get_dates {
foreach (@date_formats) {
local $@;
# Check to see if we're using the shortened year format or not.
my $year_format = '%y';
if($date_string =~ /\d{4}$/) {
$year_format = '%Y';
}
# Check to see if we're using the shortened year format or not.
my $year_format = '%y';
if($date_string =~ /\d{4}$/) {
$year_format = '%Y';
}
my $time;
eval {
# Attempt to parse the date here.
$time = Time::Piece->strptime($date_string, "$_$year_format");
my $parsing_format = "$_$year_format";
$time = Time::Piece->strptime( $date_string, $parsing_format );
# When we parse date like Feb 30th, Time::Piece will automatically correct to Mar 2nd
# which we don't want it to happen, preventing by comparing string before and after parsing
my $before_parsing = normalizer( $date_string );
my $after_parsing = normalizer( $time->strftime($parsing_format) );
die 'Found invalid date' if $before_parsing ne $after_parsing;
};
# If we didn't get an error parsing the time...
@ -131,4 +138,23 @@ sub get_dates {
return ($start, $end);
}
# This submodule intends to compare $time like 6/4/2014 with 06/04/2014 easier
# What it does is
# - Pad 0 for single number
# - Convert str to lowercase since strftime() return capitalized month
sub normalizer {
my $str_time = shift;
my @dt = split( /,|-|\s|\//, $str_time );
for ( my $i = 0; $i < scalar @dt; $i++ ) {
my $item = $dt[$i];
if( $item =~ /^\d$/ ) {
$dt[$i] = "0$item";
}
}
return lc join( '-', @dt );
}
1;

View File

@ -33,7 +33,7 @@ Using this template will help us better understand your Instant Answer and assis
**\*\*Note:** Please attach a screenshot for new instant answer pull requests, and for pull requests which modify the look/design of existing instant answers.
##Checklist
## Checklist
Please place an 'X' where appropriate.
```

View File

@ -0,0 +1,20 @@
.zci--answer .blooddonor
{
font-size: 1.1em;
line-height: 1.5em;
}
.zci--answer .blooddonor .text--secondary
{
padding-right: 1em;
}
.zci--answer .blooddonor tr
{
border-top: 1px solid rgba(155,155,155,.15);
}
.zci--answer .blooddonor tr:nth-of-type(1)
{
border-top: 0px;
}

View File

@ -0,0 +1,7 @@
.zci--answer .zci--calculator {
font-size: 1.5em;
font-weight: 300;
padding-top: .25em;
padding-bottom: .25em;
/* color: #393939; */
}

View File

@ -0,0 +1,12 @@
.zci--answer .zci--chinesezodiac {
padding-top: .25em;
padding-bottom: .25em;
}
.zci--answer .zci--chinesezodiac .zodiaccharacter {
font-size: 1.7em;
}
.zci--answer .zci--chinesezodiac .statement {
color: #747474;
}

View File

@ -3,9 +3,4 @@
font-weight: 300;
padding-top: .25em;
padding-bottom: .25em;
color: #393939;
}
.zci--answer .zci--conversions .unit {
color: #808080;
}

BIN
share/goodie/figlet/3d.flf Normal file

Binary file not shown.

BIN
share/goodie/figlet/3x5.flf Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

2204
share/goodie/figlet/big.flf Normal file

File diff suppressed because it is too large Load Diff

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,616 @@
flf2a% 6 6 21 0 3
cosmic.flf by Mike Rosulek <mjr@netins.net>, 7/11/95. Check out my
homepage at: http://www.netins.net/showcase/mikewrld/
---- Modified and corrected by Michel Eftimakis (Michel.Eftimakis@vlsi.com) ----
%%%%#
%%%%#
%%%%#
%%%%#
%%%%#
%%%%##
.:#
;;;#
'[[#
$$#
""#
MM##
%:: ::%#
%"; ;"%#
#
#
#
##
:: :: #
__,;'_,;'_#
''[[''[[''#
,$" ,$" #
o88oo88oo #
,M" ,M" ##
.: #
,;;;. #
[[,,_` #
`"""Yo#
Yo_,d"#
'M' ##
.. .:`#
; ; ,;` #
^^ ,[` #
cP ,, #
,8" 8 8#
,dP "" ##
:\ #
.;;' #
([__ #
c$"" #
"Yo,oP#
"M,##
::#
,'#
#
#
#
##
.:#
,;' #
n[ #
Y$ #
8o,#
"M##
:. #
';,#
[n#
$Y#
,o8 #
M" ##
#
\|/ #
/|\ #
#
#
##
#
#
[ #
%$$$$$%#
8 #
##
#
#
#
#
d8b#
,M"##
#
#
#
%cccc%#
#
##
#
#
#
#
d8b#
YMP##
/:`#
/;` #
n[' #
c$" #
o8" #
mM" ##
#
,;;, #
,[' [n #
$$ $$#
Y8, ,8"#
"YmmP ##
:.#
;;#
[[#
$$#
88#
MM##
.:::. #
,;'``;. #
'' ,[['#
.c$$P' #
d88 _,oo,#
MMMUP*"^^##
.::. #
;'`';;, #
.n[[ #
``"$$$.#
,,o888"#
YMMP" ##
.:: #
,;';; #
,[' [[ #
$P__$$c#
`"""88"#
MM ##
::::::::#
`;;``'';#
[[,_ #
`""*Ycc#
__,od8"#
MMP" ##
.:. #
,;' #
,[[.od8b #
$$$" "$$#
Y8b,,d8P#
"YMP" ##
...:::::#
'''``;;'#
.[' #
,$$' #
888 #
MMM ##
.::::. #
`;. ,;'#
[nn[, #
$" $c#
Yb,_,8P#
"YMP" ##
.,,. #
,;;'`';,#
[[, _,[[#
Y$$P"$$#
,,_,d8"#
"MP" ##
#
,;,#
'['#
#
d8b#
YMP##
#
,;,#
'['#
#
d8b#
,M"##
#
,,#
,[['#
c$ #
"8bo,#
"MP##
#
#
%,,,,,%#
% """"%#
%oooo%#
%""""%##
#
,, #
'[[, #
$c#
,od8"#
YM" ##
.-::::-.#
;;'```;;;#
,n[[' #
d$P" #
"" #
MM ##
.:::''''''':::. #
;;' ,;;;;;;,.; `;.#
:[[ [. .['[[ [[#
$$, 'Y$$$P'Y$$P' #
'Y8o,_ __,oo #
`"YUMMMMMMUY" ##
:::. #
;;`;; #
,[[ '[[, #
c$$$cc$$$c #
888 888,#
YMM ""` ##
:::::::. #
;;;'';;' #
[[[__[[\.#
$$""""Y$$#
_88o,,od8P#
""YUMMMP" ##
.,-::::: #
,;;;'````' #
[[[ #
$$$ #
`88bo,__,o, #
"YUMMMMMP"##
:::::::-. #
;;, `';,#
`[[ [[#
$$, $$#
888_,o8P'#
MMMMP"` ##
.,:::::: #
;;;;'''' #
[[cccc #
$$"""" #
888oo,__ #
""""YUMMM##
.-:::::'#
;;;'''' #
[[[,,== #
`$$$"`` #
888 #
"MM, ##
.,-:::::/ #
,;;-'````' #
[[[ [[[[[[/#
"$$c. "$$ #
`Y8bo,,,o88o#
`'YMUP"YMM##
:: .: #
,;; ;;, #
,[[[,,,[[[ #
"$$$"""$$$ #
888 "88o#
MMM YMM##
:::#
;;;#
[[[#
$$$#
888#
MMM##
....::::::#
;;;;;;;;;````#
''` `[[. #
,,, `$$ #
888boood88 #
"MMMMMMMM" ##
::: . #
;;; .;;,.#
[[[[[/' #
_$$$$, #
"888"88o, #
MMM "MMP"##
::: #
;;; #
[[[ #
$$' #
o88oo,.__#
""""YUMMM##
. : #
;;,. ;;; #
[[[[, ,[[[[, #
$$$$$$$$"$$$ #
888 Y88" 888o#
MMM M' "MMM##
:::. :::.#
`;;;;, `;;;#
[[[[[. '[[#
$$$ "Y$c$$#
888 Y88#
MMM YM##
... #
.;;;;;;;. #
,[[ \[[,#
$$$, $$$#
"888,_ _,88P#
"YMMMMMP" ##
::::::::::. #
`;;;```.;;;#
`]]nnn]]' #
$$$"" #
888o #
YMMMb ##
.::::::. #
,;;'```';;, #
[[[ [[[\#
"$$c cc$$$"#
"*8bo,Y88b,#
"*YP" "M"##
:::::::.. #
;;;;``;;;; #
[[[,/[[[' #
$$$$$$c #
888b "88bo,#
MMMM "W" ##
.::::::. #
;;;` ` #
'[==/[[[[,#
''' $#
88b dP#
"YMmMY" ##
::::::::::::#
;;;;;;;;''''#
[[ #
$$ #
88, #
MMM ##
... :::#
;; ;;;#
[[' [[[#
$$ $$$#
88 .d888#
"YmmMMMM""##
::: .::.#
';;, ,;;;' #
\[[ .[[/ #
Y$c.$$" #
Y88P #
MP ##
.:: . .:::#
';;, ;; ;;;' #
'[[, [[, [[' #
Y$c$$$c$P #
"88"888 #
"M "M" ##
.,:: .:#
`;;;, .,;; #
'[[,,[[' #
Y$$$P #
oP"``"Yo, #
,m" "Mm,##
.-:. ::-.#
';;. ;;;;'#
'[[,[[[' #
c$$" #
,8P"` #
mM" ##
:::::::::#
'`````;;;#
.n[['#
,$$P" #
,888bo,_ #
`""*UMM ##
::::#
;;' #
[[ #
$$ #
88, #
"YMM##
`:\ #
`;\ #
'[n #
"$c #
"8o #
"Mm##
::::#
';;#
[[#
$$#
,88#
MMP"##
.:. #
;' `;#
#
#
#
##
#
#
#
#
#
mmmmmmm##
`:. #
`;,#
#
#
#
##
:::. #
;;`;; #
,[[ '[[, #
c$$$cc$$$c #
888 888,#
YMM ""` ##
:::::::. #
;;;'';;' #
[[[__[[\.#
$$""""Y$$#
_88o,,od8P#
""YUMMMP" ##
.,-::::: #
,;;;'````' #
[[[ #
$$$ #
`88bo,__,o, #
"YUMMMMMP"##
:::::::-. #
;;, `';,#
`[[ [[#
$$, $$#
888_,o8P'#
MMMMP"` ##
.,:::::: #
;;;;'''' #
[[cccc #
$$"""" #
888oo,__ #
""""YUMMM##
.-:::::'#
;;;'''' #
[[[,,== #
`$$$"`` #
888 #
"MM, ##
.,-:::::/ #
,;;-'````' #
[[[ [[[[[[/#
"$$c. "$$ #
`Y8bo,,,o88o#
`'YMUP"YMM##
:: .: #
,;; ;;, #
,[[[,,,[[[ #
"$$$"""$$$ #
888 "88o#
MMM YMM##
:::#
;;;#
[[[#
$$$#
888#
MMM##
....::::::#
;;;;;;;;;````#
''` `[[. #
,,, `$$ #
888boood88 #
"MMMMMMMM" ##
::: . #
;;; .;;,.#
[[[[[/' #
_$$$$, #
"888"88o, #
MMM "MMP"##
::: #
;;; #
[[[ #
$$' #
o88oo,.__#
""""YUMMM##
. : #
;;,. ;;; #
[[[[, ,[[[[, #
$$$$$$$$"$$$ #
888 Y88" 888o#
MMM M' "MMM##
:::. :::.#
`;;;;, `;;;#
[[[[[. '[[#
$$$ "Y$c$$#
888 Y88#
MMM YM##
... #
.;;;;;;;. #
,[[ \[[,#
$$$, $$$#
"888,_ _,88P#
"YMMMMMP" ##
::::::::::. #
`;;;```.;;;#
`]]nnn]]' #
$$$"" #
888o #
YMMMb ##
.::::::. #
,;;'```';;, #
[[[ [[[\#
"$$c cc$$$"#
"*8bo,Y88b,#
"*YP" "M"##
:::::::.. #
;;;;``;;;; #
[[[,/[[[' #
$$$$$$c #
888b "88bo,#
MMMM "W" ##
.::::::. #
;;;` ` #
'[==/[[[[,#
''' $#
88b dP#
"YMmMY" ##
::::::::::::#
;;;;;;;;''''#
[[ #
$$ #
88, #
MMM ##
... :::#
;; ;;;#
[[' [[[#
$$ $$$#
88 .d888#
"YmmMMMM""##
::: .::.#
';;, ,;;;' #
\[[ .[[/ #
Y$c.$$" #
Y88P #
MP ##
.:: . .:::#
';;, ;; ;;;' #
'[[, [[, [[' #
Y$c$$$c$P #
"88"888 #
"M "M" ##
.,:: .:#
`;;;, .,;; #
'[[,,[[' #
Y$$$P #
oP"``"Yo, #
,m" "Mm,##
.-:. ::-.#
';;. ;;;;'#
'[[,[[[' #
c$$" #
,8P"` #
mM" ##
:::::::::#
'`````;;;#
.n[['#
,$$P" #
,888bo,_ #
`""*UMM ##
.:#
;'#
[#
$"#
8 #
"M##
`:#
,;#
[[#
$$#
88#
MM##
:.#
';#
[ #
"$#
8#
M"##
':.:':.#
`;' `;#
#
#
#
##
:: ::. :: #
;;`;; #
,[[ '[[, #
c$$$cc$$$c #
888 888,#
YMM ""` ##
:: ... :: #
.;;;;;;;. #
,[[ \[[,#
$$$, $$$#
"888,_ _,88P#
"YMMMMMP" ##
..:: :: ::#
;; ;;;#
[[' [[[#
$$ $$$#
88 .d888#
"YmmMMMM""##
:: ::. :: #
;;`;; #
,[[ '[[, #
c$$$cc$$$c #
888 888,#
YMM ""` ##
:: ... :: #
.;;;;;;;. #
,[[ \[[,#
$$$, $$$#
"888,_ _,88P#
"YMMMMMP" ##
..:: :: ::#
;; ;;;#
[[' [[[#
$$ $$$#
88 .d888#
"YmmMMMM""##
:::::::. #
;;;'';;' #
[[[__[[\.#
$$""""Y$$#
88o,,od8P#
MM`YMMP" ##

Binary file not shown.

View File

@ -0,0 +1,624 @@
flf2a$ 6 4 20 0 11
Based on cursive(6) by Jan Wolter <janc@crim.eecs.umich.edu> on 24 Jul 1985
Figlet-ized and by Wendell Hicken <whicken@parasoft.com> on 5 Mar 1994
Added missing punctuation and numbers
Ammended by Jerrad Pierce <jpierce@cpan.org> on 8 Aug 2002
Underscore and dash have been updated to more closely match cursive(6)
The '_' character is treated in a special way. It may be
inserted in the text anywhere you wish to lengthen a con-
necting line between two letters.
$$@
$$@
$$@
$$@
$$@
$$@@
@
/@
/ @
' @
o @
@@
@
o o@
' '@
@
@
@@
/ /@
-/-/-@
-/-/- @
/ / @
@
@@
,-/-@
(_/ @
/ ) @
-/-' @
@
@@
() /@
/ @
/ @
/ ()@
@
@@
() @
/\ @
( X @
\/ \@
@
@@
@
o@
'@
@
@
@@
_/@
/ @
/ @
/ @
@
@@
/@
/@
_/ @
/ @
@
@@
@
\ / @
--X--@
/ \ @
@
@@
@
/ @
--/--@
/ @
@
@@
@
@
@
o@
'@
@@
$$$@
$$$@
---@
$$$@
$$$@
$$@@
@
@
@
o@
@
@@
/@
/ @
/ @
/ @
@
@@
__ @
/ )@
/ / @
(__/ @
@
@@
_@
/@
/ @
/ @
@
@@
__ @
)@
.--' @
(__ @
@
@@
__ @
)@
-/ @
___/ @
@
@@
@
/ /@
'--/ @
/ @
@
@@
___@
/ @
'--. @
___) @
@
@@
@
/ @
/_ @
(__)@
@
@@
___@
/@
-/-@
/ @
@
@@
__ @
( )@
./' @
(__) @
@
@@
__ @
(__)@
/ @
/ @
@
@@
@
@
o@
@
o @
@@
@
@
o@
@
o @
' @@
/@
/ @
\ @
\@
@
@@
@
@
---@
---@
@
@@
\ @
\@
/@
/ @
@
@@
__ @
__)@
/ @
o @
@
@@
@
_ @
/o\ @
(____@
@
@@
__ @
/ )@
/--/ @
/ (_ @
@
@@
__ @
/ )@
/--< @
/___/_@
@
@@
__ @
/ )@
/ @
(__/ @
@
@@
__ @
/ )@
/ / @
/__/_ @
@
@@
__ @
/ `@
/-- @
(___, @
@
@@
_____@
/ '@
,-/-, @
(_/ @
@
@@
() ,@
/`-'|@
/ / @
/__-<_ @
@
@@
_ ,@
' ) / @
/--/ @
/ (_ @
@
@@
_ @
| )@
,---|/ @
\_/ \_@
@
@@
___ @
( >@
__/_@
/ / @
<_/ @
@@
_ ,@
' ) / @
/-< @
/ ) @
@
@@
_@
_//@
/ @
/___@
@
@@
_ _ _ @
' ) ) )@
/ / / @
/ ' (_ @
@
@@
_ __ @
' ) )@
/ / @
/ (_ @
@
@@
__ @
/ ')@
/ / @
(__/ @
@
@@
_ __ @
' ) )@
/--' @
/ @
@
@@
__ @
/ )@
/ / @
(_\/ @
` @
@@
_ __ @
' ) )@
/--' @
/ \_ @
@
@@
() @
/\ @
/ ) @
/__/__@
@
@@
______@
/ @
--/ @
(_/ @
@
@@
_ __@
' ) / @
/ / @
(__/ @
@
@@
_ _@
' ) / @
( / @
\/ @
@
@@
_ _@
' ) / @
/ / / @
(_(_/ @
@
@@
_ ,@
' \ / @
X @
/ \_@
@
@@
_ ,@
' ) / @
/ / @
(__/_ @
// @
(/ @@
___@
/@
/ @
/__@
@
@@
_@
/ @
/ @
/_ @
@
@@
\ @
\ @
\ @
\@
@
@@
_@
/@
/ @
_/ @
@
@@
/\@
@
@
@
@
@@
@
@
@
_@
@
@@
@
o@
`@
@
@
@@
@
@
__. @
(_/|_@
@
@@
@
/ @
/__@
/_) @
@
@@
@
@
_.@
(__@
@
@@
@
/@
__/ @
(_/_ @
@
@@
@
@
_ @
</_@
@
@@
@
/)@
// @
//_ @
/> @
</ @@
@
@
_, @
(_)_@
/| @
|/ @@
@
/ @
/_ @
/ /_@
@
@@
@
@
o@
<_@
@
@@
@
@
o@
/_@
/ @
-' @@
@
/ @
/_ @
/ <_@
@
@@
_@
//@
// @
</_ @
@
@@
@
@
______ @
/ / / <_@
@
@@
@
@
____ @
/ / <_@
@
@@
@
@
__@
(_)@
@
@@
@
@
_ @
/_)_@
/ @
' @@
@
@
_, @
(_)_@
/> @
|/ @@
@
@
__ @
/ (_@
@
@@
@
@
_ @
/_)_@
@
@@
@
_/_@
/ @
<__ @
@
@@
@
@
. .@
(_/_@
@
@@
@
@
, _@
\/ @
@
@@
@
@
, , ,@
(_(_/_@
@
@@
@
@
_., @
/ /\_@
@
@@
@
@
__ ,@
/ (_/_@
/ @
' @@
@
@
__. @
/ |_@
(| @
@@
_/@
_/ @
/ @
/ @
@
@@
/@
/ @
/ @
/ @
@
@@
/ @
/_@
_/ @
/ @
@
@@
_ @
/ \_/@
@
@
@
@@
o__o@
/ )@
/--/ @
/ (_ @
@
@@
o__o@
/ ')@
/ / @
(__/ @
@
@@
_o o__@
' ) / @
/ / @
(__/ @
@
@@
@
o o @
__. @
(_/|_@
@
@@
@
o o@
__@
(_)@
@
@@
@
o o@
. .@
(_/_@
@
@@
__ @
/ )@
/--< @
_/___/_@
/ @
@@

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
share/goodie/figlet/doh.flf Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,569 @@
flf2a$ 5 4 20 0 16
Font : Dr. Pepper (after a name in one sig done in this style).
Author: Eero Tamminen, t150315@cc.tut.fi.
Characters '#' and '&' are lousy and I'm not very satisfied
with the '$' or 't'... Suggestions?
Explanation of first line:
flf2 - "magic number" for file identifiction
a - should always be `a', for now
$ - the "hardblank" -- prints s a blank, but can't be smushed
5 - height of a character
4 - height of a character, not including descenders
20 - max line length (excluding comment lines) + fudge factor
0 - default smushmode for this font
16 - number of comment lines
$@
$@
$@
$@
$@@
_ @
| |@
|_/@
<_>@
@@
_ _@
|/|/@
@
@
@@
@
$_|_|_$@
$_|_|_$@
| | @
@@
@
||_@
<_-<@
/__/@
|| @@
__@
<>/ /@
/ / @
/_/<>@
@@
_ @
< > @
/.\/$@
\_/\$@
@@
_@
|/@
@
@
@@
__@
/ /@
| | @
| | @
\_\@@
__ @
\ \ @
| |@
| |@
/_/ @@
@
_/\_@
> <@
\/ @
@@
_ @
_| |_ @
|_ _|@
|_| @
@@
@
@
_@
|/@
@@
@
___ @
|___|@
@
@@
@
@
_ @
<_>@
@@
__@
/ /@
/ / @
/_/ @
@@
___ @
| |@
| / |@
`___'@
@@
_ @
/ |@
| |@
|_|@
@@
___ @
<_ >@
/ / @
<___>@
@@
____@
<__ /@
<_ \@
<___/@
@@
__ @
/. | @
/_ .|@
|_| @
@@
___ @
| __|@
`__ \@
|___/@
@@
___ @
| __>@
| . \@
`___/@
@@
___ @
|_ |@
/ / @
/_/ @
@@
___ @
< . >@
/ . \@
\___/@
@@
___ @
| . |@
`_ /@
/_/ @
@@
_ @
<_>@
_ @
<_>@
@@
_ @
<_>@
_ @
|/ @
@@
__@
/ /@
< < @
\_\@
@@
___ @
|___|@
___ @
|___|@
@@
__ @
\ \ @
> >@
/_/ @
@@
___ @
<_. >@
/_/ @
<_> @
@@
___ @
| "|@
| \_|@
`___/@
@@
___ @
| . |@
| |@
|_|_|@
@@
___ @
| . >@
| . \@
|___/@
@@
___ @
| _>@
| <__@
`___/@
@@
___ @
| . \@
| | |@
|___/@
@@
___ @
| __>@
| _> @
|___>@
@@
___ @
| __>@
| _> @
|_| @
@@
___ @
/ _> @
| <_/\@
`____/@
@@
_ _ @
| | |@
| |@
|_|_|@
@@
_ @
| |@
| |@
|_|@
@@
_ @
| |@
_| |@
\__/@
@@
_ __@
| / /@
| \ @
|_\_\@
@@
_ @
| | @
| |_ @
|___|@
@@
__ __ @
| \ \@
| |@
|_|_|_|@
@@
_ _ @
| \ |@
| |@
|_\_|@
@@
___ @
| . |@
| | |@
`___'@
@@
___ @
| . \@
| _/@
|_| @
@@
___ @
| . |@
| | |@
`___\@
@@
___ @
| . \@
| /@
|_\_\@
@@
___ @
/ __>@
\__ \@
<___/@
@@
___ @
|_ _|@
| | @
|_| @
@@
_ _ @
| | |@
| ' |@
`___'@
@@
_ _ @
| | |@
| ' |@
|__/ @
@@
_ _ _ @
| | | |@
| | | |@
|__/_/ @
@@
__ _$@
\ \/ @
\ \ @
_/\_\ @
@@
_ _ @
| | |@
\ /@
|_| @
@@
____@
|_ /@
/ / @
/___|@
@@
___ @
| _|@
| | @
| |_ @
|___|@@
__ @
\ \ @
\ \ @
\_\@
@@
___ @
|_ |@
| |@
_| |@
|___|@@
/\ @
</\>@
@
@
@@
@
@
___ @
|___|@
@@
_ @
\|@
@
@
@@
@
___ @
<_> |@
<___|@
@@
_ @
| |_ @
| . \@
|___/@
@@
@
___ @
/ | '@
\_|_.@
@@
_ @
_| |@
/ . |@
\___|@
@@
@
___ @
/ ._>@
\___.@
@@
___ @
| | '@
| |- @
|_| @
@@
@
___ @
/ . |@
\_. |@
<___'@@
_ @
| |_ @
| . |@
|_|_|@
@@
_ @
<_>@
| |@
|_|@
@@
_ @
<_>@
| |@
| |@
<__'@@
_ @
| |__@
| / /@
|_\_\@
@@
_ @
| |@
| |@
|_|@
@@
@
._ _ _ @
| ' ' |@
|_|_|_|@
@@
@
._ _ @
| ' |@
|_|_|@
@@
@
___ @
/ . \@
\___/@
@@
@
___ @
| . \@
| _/@
|_| @@
@
___ @
/ . |@
\_ |@
|_|@@
@
_ _ @
| '_>@
|_| @
@@
@
___@
<_-<@
/__/@
@@
_ @
$_| |_$@
| | @
|_| @
@@
@
_ _ @
| | |@
`___|@
@@
@
_ _ @
| | |@
|__/ @
@@
@
_ _ _ @
| | | |@
|__/_/ @
@@
@
__ @
\ \/@
/\_\@
@@
@
_ _ @
| | |@
`_. |@
<___'@@
@
.___@
/ /@
/___@
@@
__@
/ /@
/ | @
\ | @
\_\@@
||@
||@
||@
||@
@@
__ @
\ \ @
| \@
| /@
/_/ @@
@
/\/|@
|/\/ @
@
@@
<>_<>@
| . |@
| |@
|_|_|@
@@
<>_<>@
| . |@
| | |@
`___'@
@@
<>_<>@
| | |@
| ' |@
`___'@
@@
@
<>_<>@
`_> |@
<___|@
@@
@
<>_<>@
/ . \@
\___/@
@@
@
<>_<>@
| | |@
`___|@
@@
___ @
| . >@
| . \@
| ._/@
|_| @@
196
<>_<>@
| . |@
| |@
|_|_|@
@@
214
<>_<>@
| . |@
| | |@
`___'@
@@
220
<>_<>@
| | |@
| ' |@
`___'@
@@
223
___ @
| . >@
| . \@
| ._/@
|_| @@
228
@
<>_<>@
`_> |@
<___|@
@@
246
@
<>_<>@
/ . \@
\___/@
@@
252
@
<>_<>@
| | |@
`___|@
@@

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
share/goodie/figlet/lcd.flf Normal file

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More