<commit_before>package DDG::Spice::Octopart;

use DDG::Spice;

primary_example_queries "atmega datasheet";
secondary_example_queries "ne555 specs";
description "Searches parts from Octopart.";
name "Octopart";
code_url "https://github.com/duckduckgo/zeroclickinfo-spice/blob/master/lib/DDG/Spice/Octopart.pm";
icon_url "/i/octopart.com.ico";
topics "special_interest", "geek";
category "special";
attribution github  => ['https://github.com/bnewbold', 'bnewbold'];
status "enabled";
triggers any => "datasheet", "specs";

spice to => 'http://octopart.com/api/v2/parts/search?apikey={{ENV{DDG_SPICE_OCTOPART_APIKEY}}}&limit=3&optimize.hide_offers=1&optimize.hide_specs=1&q=$1&callback={{callback}}';

handle remainder => sub {
    return $_ if $_;
    return;
};
1;
<commit_msg>Added "octopart" trigger word in the Octopart plugin.<commit_after>package DDG::Spice::Octopart;

use DDG::Spice;

primary_example_queries "atmega datasheet";
secondary_example_queries "ne555 specs";
description "Searches parts from Octopart.";
name "Octopart";
code_url "https://github.com/duckduckgo/zeroclickinfo-spice/blob/master/lib/DDG/Spice/Octopart.pm";
icon_url "/i/octopart.com.ico";
topics "special_interest", "geek";
category "special";
attribution github  => ['https://github.com/bnewbold', 'bnewbold'];
status "enabled";
triggers any => "datasheet", "specs", "octopart";

spice to => 'http://octopart.com/api/v2/parts/search?apikey={{ENV{DDG_SPICE_OCTOPART_APIKEY}}}&limit=3&optimize.hide_offers=1&optimize.hide_specs=1&q=$1&callback={{callback}}';

handle remainder => sub {
    return $_ if $_;
    return;
};
1;

{'fraction_non_alphanumeric': 0.16687422166874222, 'fraction_numerical': 0.0112079701120797, 'mean_word_length': 6.800970873786408, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7358910', 'n_tokens_mistral': 617, 'n_tokens_neox': 598, 'n_words': 100}