Ben Moon
d07d944ff0
Expand triggers (even more)
2016-05-20 13:47:12 +01:00
Ben Moon
34286dbecd
Add more triggers
2016-05-20 13:12:33 +01:00
Ben Moon
50f2aa6426
Add support for basic ranges
...
E.g., `shuffle a..z`, `shuffle 1..7`.
2016-05-20 12:51:52 +01:00
Ben Moon
b550ec9852
Add support for word lists
...
E.g., `1 and 2 and 3, and 4`
2016-05-20 12:04:06 +01:00
Ben Moon
a1fa583294
Update items attribute to be the shuffled items
...
More useful than just returning the items.
2016-05-20 11:39:08 +01:00
Ben Moon
777c661d9b
Turn off caching
...
Whoops - we don't want to cache random results!
2016-05-20 11:35:04 +01:00
Ben Moon
07dc434bf8
Ensure no triggering on empty remainder
2016-05-14 17:15:45 +01:00
Ben Moon
ba3c840566
Ensure we don't trigger if we've nowt to shuffle
...
shuffle xs | length xs <= 1 = xs forall xs
That says it all.
2016-05-14 17:11:50 +01:00
Ben Moon
775c1e0f49
Add Shuffle Instant Answer
...
Allows shuffling of random inputs (mainly lists).
2016-05-14 17:10:31 +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
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
Hugo Thiessard
578f496f6b
Updates Chars Goodie Re #2767 ( #2865 )
2016-04-28 19:21:31 +01:00
Hugo Thiessard
34fb831587
Updates Binary Goodie Re #2767 ( #2859 )
2016-04-28 19:17:57 +01:00
Hugo Thiessard
59737a40f8
Updates Average Goodie Re #2767 ( #2858 )
2016-04-28 19:00:13 +01:00