Commit Graph

3858 Commits (7413a55eaeae3589da2856f80d57a6a575763eaa)

Author SHA1 Message Date
Rob Emery 39b44adc0c Constants: Switching to customised template 2016-05-14 20:30:39 +01:00
Rob Emery 683018f4a1 Constants: It's crap that the IA currently returns HTML for the plain answer; no remedied 2016-05-14 20:26:09 +01:00
Rob Emery 6a2bb230f9 Constants: Editor wasn't in DDG mode so there are tabs in here 2016-05-14 20:24:19 +01:00
Rob Emery abd685d3ae Constants: Switching to text template 2016-05-14 20:21:54 +01:00
Naveen Karippai af18492b8a Convert simple structured to full template goodie (#3000)
* Convert simple structured to full template goodie

Goodies have full support for templates, and it'd be great to make sure all
Goodies use full templates. The "simple structured_answer" was provided
as a way to get goodies using basic templates before they had full template
support.

* change to 'text' template for structured_answer object

* refactored test suite

* added alias and removed encode

See also: Updates FlipText Goodie Re: #2767

IA: https://duck.co/ia/view/flip_text

* Remove unnecessary trigger words on flipText goodie

There were trigger words added to flipText goodie which may not be
used or confuse the search results. This should be removed.

* extra triggers removed

See also: Updates FlipText Goodie Re: #2767

* Indent code on FlipText goodie

It would be easier to eyes in the long run to understand
code when it's properly indented.

* code indented on .pm and .t
2016-05-14 19:00:12 +01:00
Roy Kokkelkoren 289948173d GreatestCommonFactor: Use Math::BigInt & change to text template (#2990)
* Removed custom GCD function replaced with library function

* Changed view to text template and updated tests

* Cleanup of tests and removed unnecessary code
2016-05-14 18:28:04 +01:00
Naveen Karippai 6df517e87a Convert RandomNumbers to full template goodie (#3014)
* Convert RandomNumbers to full template
2016-05-14 12:17:47 +01:00
Zaahir Moolla 58eeb27ea5 Merge pull request #2811 from lamanh/fix_2771
Braille: fix for bad triggers #2771
2016-05-12 15:51:46 -07:00
Zach Thompson 1c7e2cca44 Merge pull request #2777 from duckduckgo/gd/cheatsheets-add-ignore
CheatSheets: Add 'ignore' attribute
2016-05-12 14:23:38 -06:00
Ben Moon aedf7ea3f5 Improve efficiency of removing ignore phrases
Thanks to @zachthompson for the algorithm (much faster).
2016-05-12 20:48:37 +01:00
Ben Moon e44920542d Switch to lc handler
So we don't need to normalize later.
2016-05-12 20:40:00 +01:00
Naveen Karippai a426dccaf5 Convert CountryCodes to full template goodie (#3037)
Goodies have full support for templates, and it'd be great
to make sure that all goodies use full templates.
The "simple structured_answer" was provided as a temporary
workaround.

* change to 'text' template for structured_answer object

* refactored test suite

See also: Updates CountryCodes Goodie Re: #2767
2016-05-12 14:23:28 +01:00
Ben Moon 3a0e90fb62 Merge pull request #3019 from duckduckgo/mintsoft/conversions/plurals
Conversions: Harmonise unit definitions
2016-05-11 20:42:26 +01:00
Rob Emery f62adb5b70 Conversions: Adding hash for the opposite direction (plural_to_unit) to quickly determine if a unit/alias is plural 2016-05-11 18:49:28 +01:00
Rob Emery 3831d2bf71 Conversions: Fixing tnt vs TNT for @guiltydolphin 2016-05-11 18:45:02 +01:00
Rasika Pohankar 9b5d96c5c3 Update ValarMorghulis to use full template. (#3034) 2016-05-11 12:43:08 +01:00
Rasika Pohankar d2996bf4d5 Birthstone: Convert to full template (#2807)
* Added plaintext response.

* Removed id and name.

* Fixed alignment.

* Changed subtitle to Birthstone for month.

* Changed subtitle in test file.
2016-05-10 22:00:42 +01:00
Rasika Pohankar 16f3fd4599 Zapp Brannigan: Convert to full template (#2994)
* Change to full template, add handlebars file for new line in quote.

* Change data to -ANY- in test file.

* Replace regex with re().
2016-05-10 21:41:54 +01:00
Rob Emery 9517ba17ce Merge pull request #2980 from rkokkelk/rkokkelk/unixtime
UnixTime: Expanded trigger words
2016-05-09 22:29:38 +01:00
Rob Emery bdd54b6a8f Conversions: now it's in a list of values; we can use List::Util again! 2016-05-09 20:34:15 +01:00
Rob Emery 13509c09b1 Conversions: Not sure why I was looking up the value everytime from the hash here 2016-05-09 20:33:02 +01:00
Rob Emery 9418f7baef Conversions: Didn't use List::Util in the end as it's all in hashes 2016-05-09 20:31:36 +01:00
Rob Emery 4417d51443 Conversions: More tidying up; also dodged bug where units would be added twice 2016-05-09 20:30:34 +01:00
Rob Emery 679a1d7fdf Conversions: Plural isn't used in the response from get_matches as it's looked up in the hash 2016-05-09 20:28:49 +01:00
Rob Emery cd4bf80a17 Conversions: Minor code tidies 2016-05-09 20:28:00 +01:00
Rob Emery 6775764f28 Conversions: refactoring and tidying up around set_unit_pluralisation 2016-05-09 20:25:37 +01:00
Rob Emery 539e5dcd78 Conversions: Tiding up a little 2016-05-09 20:20:08 +01:00
Rob Emery ed3c5560b3 Conversions: All tests now passing 2016-05-09 20:17:32 +01:00
Rob Emery abad3d0d1f Conversions: The previous code assumed that everything was lowercase; I've injected lc all over the place to make the tests pass 2016-05-09 19:55:59 +01:00
Ben Moon 06e0c534be Add support for 'ignore'd phrases
These allow categories (and/or cheat sheets) to specify phrases that
should be ignored when triggering.

For example, many language cheat sheets use 'english to X' as an alias,
but this would be better placed in 'ignore'. This would allow these
cheat sheets to trigger on 'english to X cheat sheet', 'english to X
phrases', 'X phrases english to' (you decide whether you like that last
one ;)) etc...

In essence, the 'ignore' attribute defines an array of phrases that
should be entirely stripped from the query when that cheat sheet or
category triggers.
2016-05-09 18:43:26 +01:00
Rob Emery 65ad6fce17 Conversions: non-working version using the plural from the YAML 2016-05-08 22:22:28 +01:00
Rob Emery 2540ff11b1 Mintsoft/conversions/squarefeet (#3006)
* Conversions: The plural of square foot is square feet NOT square foots

* Conversions: Fixing test for #3004
2016-05-08 11:25:12 +01:00
Rob Emery 0ea9f866e4 Merge pull request #2965 from dbech/HexToASCII
hex_to_ascii: Improved triggers
2016-05-04 08:10:42 +01:00
Daniel Bech a8c91a8ffc Update HexToASCII.pm 2016-05-01 23:17:45 +08:00
Daniel Bech 4db00f2ec4 Updated to full template
Changed from simple structured answer to text template
2016-05-01 22:36:57 +08:00
Daniel Bech 629bba3493 Now case insensitive
popped a little 'i' in there, made the matching of to as in 0 or 1
2016-05-01 21:22:46 +08:00
rkokkelkoren 674368b2b4 Expanded trigger words 2016-04-30 20:23:56 +00:00
Rob Emery 2f507bb307 Merge pull request #2956 from zblair/master
Conversions: Add conversions for grains, carats, drams, cc's, cubic inches, mmHg, decades, centuries, millennia, and thousandths of an inch
2016-04-30 20:20:15 +01:00
Daniel Bech 288926d1d2 Added regex to strip out to|as|in
added some regex that would strip off ' to' if the IA was triggered off of '0x74657374 to asci'
2016-04-30 21:05:14 +08:00
Daniel Bech 33f8d4db0b Update HexToASCII.pm 2016-04-30 20:59:07 +08:00
Daniel Bech 5c1ca8191d Improved triggers
triggers startend => 'ascii', 'hex to ascii';
triggers end => 'to ascii', 'as ascii';
2016-04-30 17:12:17 +08:00
zblair ff1fd34b1b Added some additional unit tests 2016-04-30 08:59:03 +00:00
zblair 3c5fb4963e Make sure that existing unit tests pass, and add new unit tests for newly added units. 2016-04-30 08:32:09 +00:00
Laman 7316cc7290 NoteFrequency: Update to full template (#2838)
* NoteFrequency: Update to full template

* remove html_enc for frequency.
2016-04-28 19:32:23 +01:00
Hugo Thiessard c55ecbe885 Updates AspectRatio Goodie Re: #2767 (#2843) 2016-04-28 19:30:29 +01:00
Hugo Thiessard c54a2b94d8 Updates CalendarConversion Goodie Re #2767 (#2862) 2016-04-28 19:28:56 +01:00
Hugo Thiessard 1535f2117a Updates Base64 Goodie Re: #2767 (#2854) 2016-04-28 19:26:35 +01:00
Hugo Thiessard 1789d18039 Updates CallingCodes Goodie Re #2767 (#2864) 2016-04-28 19:25:14 +01:00
Hugo Thiessard 2b0d873016 Updates Base Goodie Re: #2767 (#2853) 2016-04-28 19:24:01 +01:00
Hugo Thiessard bb46c37055 Updates Bitsum Goodie Re #2767 (#2860) 2016-04-28 19:22:50 +01:00