Commit Graph

3799 Commits (aba6abf7f2b90ff737033f3bb20a3271198c8491)

Author SHA1 Message Date
Ben Moon 46b19a54a7 Remove metadata 2016-02-11 13:36:11 +00:00
tyasaka a2744b6c79 Minor tweaks.
Adjusted wording, added test cases.

 Changes to be committed:
	modified:   lib/DDG/Goodie/UltimateAnswer.pm
	modified:   t/UltimateAnswer.t
2016-02-07 23:14:32 +00:00
tyasaka 9c30eecc6a Minor tweak to trigger handler.
Changes to be committed:
	modified:   lib/DDG/Goodie/UltimateAnswer.pm
2016-02-07 20:41:22 +00:00
Ben Moon 5ef7d7b74b Move synonyms into JSON file 2016-02-06 13:54:41 +00:00
Ben Moon 7540baaa05 Remove redundant variable 2016-02-06 13:49:04 +00:00
Ben Moon 864fe0dbe9 Convert synonyms to a hash 2016-02-06 13:48:37 +00:00
Ben Moon 6931287188 Remove HTML::Entities dependency 2016-02-06 13:24:34 +00:00
Ben Moon 2c4254faab Update to use text template 2016-02-06 13:22:56 +00:00
Ben Moon 8838957d4f Remove cheat sheet triggers
Don't want it to trigger on those...
2016-02-06 13:05:41 +00:00
Ben Moon 18c6b9c596 Move html into content file 2016-02-06 13:02:25 +00:00
Ben Moon c1546375f7 Update data method for answer 2016-02-06 11:56:16 +00:00
Ben Moon 214d9433a1 Correct content field 2016-02-06 11:53:47 +00:00
Ben Moon 0a057be7bc Update main package to use structured answer 2016-02-06 10:10:57 +00:00
Ben Moon 9d28dd5918 Update package names 2016-02-06 09:50:53 +00:00
Ben Moon 72935a0c55 Rename MarkdownCheatSheet to MarkdownReference 2016-02-06 09:44:43 +00:00
Ben Moon e52656a941 Disallow aliases that match the cheat sheet name 2016-02-04 19:29:16 +00:00
Ben Moon 4255962169 Fix #1844
No more duplicate aliases!
2016-02-04 19:29:16 +00:00
Ben Moon d9462ea770 Add support for options
And the 'require_name' option which just states that after matching,
processing should be done as if it weren't a custom trigger.

Basically means that the name (or an alias) is required in order to
trigger the cheat sheet.
2016-02-04 19:29:16 +00:00
Ben Moon adb28fd8b9 Allow specifying custom triggers
Cheat Sheets are now more awesome.
2016-02-04 19:29:16 +00:00
Ben Moon fc729cd225 Allow specifying multiple categories
In the 'additional_categories' field.
2016-02-04 19:29:16 +00:00
Ben Moon af9e7826d8 Add categorical triggers
More relevancy, MOREEE!
2016-02-04 19:29:16 +00:00
Ben Moon b87984b720 Set signal to high
Some other IAs trigger on the obscure regex queries!
2016-02-04 12:06:25 +00:00
Ben Moon 008bab26db Improve formatting
Clean up some whitespace, make things easier to read, remove some
redundant functions etc...
2016-02-03 19:31:34 +00:00
Ben Moon ebf686c6a1 Allow lowercase trailing TZs
E.g., cet rather than CET
2016-02-03 19:31:34 +00:00
Ben Moon 81ef278d27 Fix casing support
- Improve support for mixed-case queries.

 - Improve case-formatting of results.
2016-02-03 19:31:34 +00:00
Ben Moon 124eaa8e5a Prevent triggering on non-informative queries
If query has no action and is not relative, do not trigger.
2016-02-03 19:31:34 +00:00
Ben Moon 60a371dea8 Correct caching 2016-02-03 19:30:22 +00:00
Ben Moon b42bc4c7dd Add support for specifying time
Allows direct specification of time for input date.
2016-02-03 19:30:22 +00:00
Ben Moon 1915f773e9 Provide access to time regexes
time_24h_regex for 24 hour clocks

time_12h_regex for 12 hour clocks
2016-02-03 19:30:22 +00:00
Ben Moon 2093f3e073 Allow use of `time` form
Such as: `time now`, `time in 3 days` etc...

Will display time as well as date.
2016-02-03 19:30:22 +00:00
Ben Moon 3927595492 Fix some whitespace 2016-02-03 19:30:22 +00:00
Ben Moon 47daa8b593 Update to fall-back on time-zone offset 2016-02-03 19:30:22 +00:00
Ben Moon fd97b48e33 Add support for 24hr clock in display 2016-02-03 19:30:22 +00:00
Ben Moon 3c7c92c85b Fix issue with time-zone not being added correctly 2016-02-03 19:30:22 +00:00
Ben Moon db88b11d1d Add support for %d %b %Y %T %Z format
Essentially HTTP format without the day and allowing any timezone.
2016-02-03 19:30:22 +00:00
Ben Moon a24b0aaf42 Update to use NumberStyler 2016-02-03 19:30:22 +00:00
Ben Moon 35f2a2f908 Fix plurals 2016-02-03 19:30:22 +00:00
Ben Moon 1dae5db923 Implement hour/minute/second support
Closes #2056
2016-02-03 19:30:21 +00:00
Ben Moon 8015a0fc85 Move duration computation out of handler 2016-02-03 19:30:21 +00:00
Ben Moon 676bdd9b4a Update regexes for new units 2016-02-03 19:30:21 +00:00
Ben Moon eb3673f722 Update to use answer-helper 2016-02-03 19:30:21 +00:00
Ben Moon ee91838358 Update triggers for additional units 2016-02-03 19:30:21 +00:00
Ben Moon ef7196868b Convert to use templates 2016-02-03 19:30:21 +00:00
Ben Moon 4977cb0bb6 Fix some bad whitespace 2016-02-03 19:30:21 +00:00
Ben Moon 1203c78e57 Fix triggering with non-numbers
Would allow non-numbers to be present if numbers were already in the
query.
2016-02-03 18:10:38 +00:00
Ben Moon 6e55266f87 Remove 'sf' trigger
Reduce over-triggering - 'sf' seems to be used for other things.
2016-02-03 18:00:59 +00:00
Zaahir Moolla 2161a309fc Merge pull request #2201 from duckduckgo/pr/2003
VIN: Switch to subtitle-content template, mimic new DuckDuckGo.pm design
2016-02-02 00:17:53 -05:00
Zaahir Moolla c050fbfe8f change template name, fix tests 2016-02-02 00:15:13 -05:00
Zaahir Moolla 4e0803b5c7 Pass along decode url to API 2016-02-02 00:09:28 -05:00
Zaahir Moolla db251c5ebb Switch replace moreAt with subtitle-content template 2016-02-02 00:06:45 -05:00
Zaahir Moolla e2e83805aa Merge pull request #1964 from duckduckgo/mintsoft/template-atbash
Convert Atbash to text template
2016-02-01 23:35:40 -05:00
Zaahir Moolla 6b40f1d3ed add html_enc(), update tests 2016-02-01 23:31:29 -05:00
Zaahir Moolla f7494c549a Regex: Escape all html to prevent SERP breakage 2016-01-31 14:08:46 -05:00
Zaahir Moolla 8b6a2f1ffc Merge pull request #1998 from GuiltyDolphin/regexp-improve
Regexp: Improvements!
2016-01-31 13:01:18 -05:00
Zaahir Moolla f24d1d8322 Merge pull request #1974 from GuiltyDolphin/sigfigs-fix
SigFigs: Update to use templates + other improvements
2016-01-31 12:41:34 -05:00
Zaahir Moolla e96d1a92e1 bring back some CSS, minor visual tweaks 2016-01-30 19:05:01 -05:00
Zaahir Moolla 3bc265f26e Merge pull request #1989 from Mailkov/suninfoissue1163
Issue #1163 - Convert SunInfo to use templates
2016-01-30 19:04:27 -05:00
Zaahir Moolla 7e909ae220 Merge pull request #1978 from Mailkov/crypthashcheckissue1163
Issue #1163 - Convert CryptHashCheck to use templates
2016-01-30 18:34:08 -05:00
Zaahir Moolla d04bd61413 Merge pull request #1959 from Mailkov/calendartodayissue1163
Issue #1163 - Convert CalendarToday to use templates
2016-01-30 18:24:07 -05:00
Zaahir Moolla 71ad58040f Merge pull request #1886 from GuiltyDolphin/caesar-cipher
New Caesar Cipher Goodie
2016-01-29 20:10:29 -05:00
tyasaka 0b9f89a765 Changing query triggers/handle.
How does this look?

 Changes to be committed:
	modified:   lib/DDG/Goodie/UltimateAnswer.pm
	modified:   t/UltimateAnswer.t
2016-01-28 16:21:22 +00:00
tyasaka ead27a5a41 Some corrections.
Changes to be committed:
	modified:   lib/DDG/Goodie/UltimateAnswer.pm
	modified:   t/UltimateAnswer.t
2016-01-28 15:39:33 +00:00
tyasaka 4c00835e23 Added a template.
A few minor tweaks as well.

 Changes to be committed:
	modified:   lib/DDG/Goodie/UltimateAnswer.pm
	modified:   t/UltimateAnswer.t
2016-01-28 03:45:46 +00:00
tyasaka 8ba0794ac7 Further attempts at improvement.
How does this look? Does this go in the right direction?

 Changes to be committed:
	modified:   lib/DDG/Goodie/UltimateAnswer.pm
	modified:   t/UltimateAnswer.t
2016-01-27 05:15:21 +00:00
tyasaka c5f6e90a03 Just trying to expand the query space a bit. I didn't realize this goodie existed at first because I couldn't get it to trigger.
If you type in 'answer to' in DDG, the second suggestion is currently 'answer to life the universe and everything'.
And if you type this query into Google, it will output 42 as the answer. So I think it makes sense that the query should also trigger this goodie.

 On branch UltimateAnswer
 Changes to be committed:
	modified:   lib/DDG/Goodie/UltimateAnswer.pm
	modified:   t/UltimateAnswer.t
2016-01-26 14:50:34 +00:00
Zaahir Moolla 54798e4e40 Merge pull request #1973 from amitdev/master
Periodic Table Updated - Fixes #1914
2016-01-25 21:43:35 -05:00
Jag Talon 8babf4ee28 Merge pull request #2005 from Mailkov/percenterrorissue1163
Issue #1163 - Convert PercentError to use templates
2016-01-25 15:56:38 -05:00
Jag Talon 8fb592b4c2 Merge pull request #2013 from GuiltyDolphin/zodiac-update-deps
Zodiac - Remove DateTime::Event::Zodiac Dependency
2016-01-25 15:40:16 -05:00
Zach Thompson 09e0e942e5 Return if any term is not a multiple of 8 to prevent auto-padding 2016-01-24 06:58:23 -07:00
Ben Moon 7254b9e96f Add html_enc to subtitle 2016-01-24 10:14:12 +00:00
Ben Moon 1c87b33c94 Use html_enc to encode subtitles
It hurts dammit!
2016-01-24 10:06:23 +00:00
Ben Moon 8eae393c78 Limit amount of words generated
To 200 (roughly 25 sentences/lines).
2016-01-24 08:54:35 +00:00
Zaahir Moolla 28a75146cc remove trailing space, add newline before ABSTRACT 2016-01-24 00:36:18 -05:00
Zaahir Moolla e6a4f78c00 minor cleanup (activating github bot...) 2016-01-23 23:19:06 -05:00
Zach Thompson 657b0dead2 Put 'use big*' after is_cached so we don't promote is_cached 2016-01-21 11:12:38 -07:00
Ben Moon 8008d40d74 Update formatted input
From `Significant figures of...` to `Number of Significant Figures
in...`.
2016-01-18 19:06:00 +00:00
Ben Moon 0a5d01e73e Improve triggers
Vastly improves the triggering!

I had a look at searches related to significant figures and none of the
common searches involved `sd` or `sig digs`, so I got rid of those
triggers.

A lot of the searches were along the lines of "What are the significant
figures of X?" - so I've updated the handler to allow for these types of
queries.
2016-01-18 19:05:58 +00:00
Ben Moon 6511199068 Improve general handling of significant figures
Fixes an issue with input of just '0', the Goodie was not triggering.
2016-01-18 19:05:07 +00:00
Ben Moon b886023057 Add support for more number systems
Uses the `NumberStyler` GoodieRole to improve number support.
2016-01-18 19:05:06 +00:00
Ben Moon 85ec54e8be Update answer to use text template 2016-01-18 19:05:06 +00:00
Ben Moon e2878dfb45 Change to no response when no translation was done 2016-01-18 19:04:00 +00:00
Ben Moon ace3370227 Add support for additional query forms
Will now work as one would expect for queries such as "How do you say X
in piglatin?".
2016-01-18 19:03:59 +00:00
Ben Moon 69fb77b905 Improve support general queries
* Makes it less likely that the Goodie will trigger on false-positives
  (e.g., "What is piglatin?").
* Provides better support for matching when "piglatin" is included in
  the query to be translated.
2016-01-18 19:02:12 +00:00
Ben Moon 8f2a36ccf5 Support translation to+from Pig Latin and casing
Swap to using the `Lingua::PigLatin::Bidirectional` package which
provides much better support for case-preservation as well as
translation to and from Pig Latin.
2016-01-18 19:02:10 +00:00
Ben Moon d3108e2de2 Update answer to use templates
Now uses the 'text' answer template.
2016-01-18 19:01:29 +00:00
Ben Moon aa97420208 Fix PigLatin triggering on empty input
Fixes #1969
2016-01-18 19:01:29 +00:00
Ben Moon 87a2d8e639 Clean up some code and functionality
Pull a few things out of the handler which don't need to be computed at runtime.

Clean up the `$default` system.

Move a few rogue comments.
2016-01-18 18:56:36 +00:00
Ben Moon da3ab1a22a Improve formatting of result
Made the title a bit smaller (and used a title rather than subtitle).

Display spacing between paragraphs.

Have "show more..." display for long texts.

Only display search suggestions on default input.
2016-01-18 18:56:36 +00:00
Ben Moon 3ee334ee4f Add infobox for example queries 2016-01-18 18:56:36 +00:00
Ben Moon 764a03da73 Add main functionality
Adds the body to provide the functionality for the Goodie.
2016-01-18 18:56:35 +00:00
Ben Moon f336a21926 Add skeleton
Add basic test helpers, triggers and handler.
2016-01-18 18:56:33 +00:00
Ben Moon cadd1b0154 Fix issue with invalid regexes causing warnings
Suppresses warnings that relate to invalid compilation of the user's
regular expression.
2016-01-18 18:52:29 +00:00
Ben Moon 6e03f6aee7 Fix issue with brackets in named captures
For some reason it was displaying a result (when it shouldn't) if there
were brackets in the names of the capture groups.
2016-01-18 18:52:29 +00:00
Ben Moon 5a2a003503 Improve naming of results
Named Match (X) -> Named Capture <X>

Number Match (X) -> Subpattern Match X
2016-01-18 18:52:29 +00:00
Ben Moon b33428914d Correct ordering of results
Will display Full Match, then Named, then Numbered.
2016-01-18 18:52:29 +00:00
Ben Moon ed622cf84b Add support for ignore-case modifier 2016-01-18 18:52:29 +00:00
Ben Moon 242c5573ff Add support for perl-style regex matches
Allows regex matches in the form `X =~ /Y/`.
2016-01-18 18:52:29 +00:00
Ben Moon 96a69e6965 Fix first match being assigned incorrectly
If expression had no paren-matches then the numbered matches list was
just being passed "1" - not ideal!
2016-01-18 18:52:29 +00:00
Ben Moon 8651a0c33f Add result generation functions
The result produced is a hash which contains the full match, numbered
matches and named matches.
2016-01-18 18:52:29 +00:00
Ben Moon b9a841cc7f Update triggers and handler
Remove unnecessary regex trigger and perform matches within the
handler.
2016-01-18 18:52:29 +00:00
Ben Moon c5b3330ad9 Add skeleton answer template
Will use the `list` group for displaying multiple results.
2016-01-18 18:52:29 +00:00
Ben Moon bc507ef5d6 Implement new Zodiac system
Has no Zodiac dependencies, just uses a bit o' JSON.
2016-01-18 18:46:26 +00:00
Ben Moon 3468b251f8 Add zodiac helpers 2016-01-18 18:43:51 +00:00
Rob Emery 792ea0f0bf Merge pull request #2065 from Hoaas/patch-1
Updated URL
2016-01-15 21:48:20 +00:00
Jag Talon 93d52e295d Merge pull request #2053 from duckduckgo/brian/duckduckgo-goodie
Update structure + format of DDG goodie
2016-01-15 14:46:10 -05:00
Zaahir Moolla 3d745e78af Merge pull request #1478 from lights0123/master
lights0123's Security Addons Goodie
2016-01-15 13:42:07 -05:00
Hoaas a3b468cafc Updated URL
resisto.rs have changed URL from http://resisto.rs/100 to http://resisto.rs/#100.
2016-01-15 16:25:49 +01:00
amitdev 3f967fe4df Periodic Table: Change display to new format 2016-01-15 06:50:05 +00:00
Mailkov f05892fb26 review change regex 2016-01-14 20:06:14 +00:00
Mailkov af1b531872 use html_enc for some fonts 2016-01-14 19:13:26 +00:00
Brian Stoner 1815e7190b handle the image differently because the text template floats it to the right 2016-01-14 11:49:35 -05:00
Brian Stoner 961b7defd1 add image support for dax 2016-01-14 11:39:29 -05:00
Brian Stoner 25e1df7d88 update the responses text + tests 2016-01-14 11:19:19 -05:00
Mailkov cd7a2ec953 fix tests on FrequencySpectrum.t 2016-01-14 14:41:17 +00:00
Brian Stoner 892f9ea0c0 Issue #853 update structure + format of DDG goodie 2016-01-13 22:53:25 -05:00
Zaahir Moolla 7e8ec50377 Merge pull request #1872 from Mailkov/publicdnsissue1163
Issue #1163 - Convert PublicDNS to use template
2016-01-13 20:10:40 -05:00
Zach Thompson 5cd8645f79 Merge branch 'master' into zt/bin2unicode 2016-01-13 15:05:17 -07:00
Zach Thompson fc1abffad8 Default to ascii if binary number is larger than max code point for unicode
Suppress warnings about overflow, non-portability, non_unicode
Add tests
2016-01-13 14:57:07 -07:00
Ben Moon 98a43daef8 Fix rounding issue
Using `sprintf` was causing rounding to ~ 5 dp, definitely not what
we want!

Using Math::BigFloat should be fine, as styling numbers should not occur
en masse - only during conversions to/from user input.
2016-01-13 21:17:59 +00:00
Ben Moon f0b0375add Fix #2041
Corrects the use of scientific notation when displaying results.
2016-01-13 16:07:45 +00:00
Zach Thompson 808d8d0dac Require 8 or more zeroes, ones, and spaces so we don't collide with hex numbers 2016-01-12 16:39:48 -07:00
Zach Thompson 41fee0251e Update trigger to capture, anchor
Use handle matches
2016-01-12 16:34:59 -07:00
Zach Thompson dac58d4622 Remove boilerplate.
Suppress warnings
2016-01-12 14:15:06 -07:00
Zaahir Moolla 0619b61ad2 Merge pull request #1996 from duckduckgo/mintsoft/conversions-converted
Conversions: "Convert The Future Into The Present"
2016-01-12 12:12:20 -05:00
Rob Emery c05d83ee19 Conversions: Adding support for degrees rankine 2016-01-11 22:44:43 +00:00
Rob Emery 567b651a3b Conversions: Now supports 'degree fahrenheit' and celsius 2016-01-11 22:38:41 +00:00
Mailkov ef671f02f1 fix merge conflict 2016-01-11 17:22:11 +00:00
Mailkov 0045bd84be fix merge conflict 2016-01-11 17:18:03 +00:00
Zach Thompson ad31a1c857 Binary to unicode conversion 2016-01-11 10:14:42 -07:00
Mailkov 0dd5ccf808 fix merge conflict 2016-01-11 17:11:25 +00:00
Mailkov 2e1e492e9e fix merge conflict 2016-01-11 17:08:44 +00:00
Mailkov dc25052d4f fix merge conflict 2016-01-11 17:06:16 +00:00
Mailkov c45fd3d158 fix merge conflict 2016-01-11 17:04:10 +00:00
Mailkov dac3579b14 fix merge conflict 2016-01-11 17:02:27 +00:00
Mailkov b6f91090f4 fix merge conflict 2016-01-11 16:59:35 +00:00
Mailkov c6239557ef fix merge conflict 2016-01-11 16:57:14 +00:00
Mailkov 5e03da6855 fix merge conflict 2016-01-11 16:54:29 +00:00
Mailkov d6920ee13e fix merge conflict 2016-01-11 16:51:25 +00:00
Mailkov 3a9e38ce35 fix merge conflict 2016-01-11 16:48:56 +00:00
Mailkov a0ffcf6f03 fix merge conflict 2016-01-11 16:46:20 +00:00
Mailkov 04a43af2e2 fix merge conflict 2016-01-11 16:41:53 +00:00
amitdev 57efc1e837 Merge branch 'master' of https://github.com/duckduckgo/zeroclickinfo-goodies
Conflicts:
	lib/DDG/Goodie/PeriodicTable.pm
2016-01-09 12:23:38 +00:00
Rob Emery 02a9ce86ee Conversions: Expanding the unit bodging for Ounces (#1767); I incorrectly diagnosed the issue, as it's actually broken due to amiguity around "ounces" 2016-01-08 13:05:26 +00:00
Zaahir Moolla 44de44ea6e resolve merge conflicts 2016-01-07 12:04:20 -05:00
Mailkov a909015066 delete an unused line code 2016-01-06 20:39:29 +00:00
Mailkov 9941d5924b improve regex 2016-01-06 20:37:13 +00:00
Mailkov bc8260df1b fix indentation on regex 2016-01-06 20:22:38 +00:00
Mailkov 5b6dd8847b correct regex 2016-01-06 20:19:42 +00:00
Mailkov 65b5078fad update regex 2016-01-06 20:06:47 +00:00
Ben Moon 4a74413681 Improve formatting of results
Change to use the 'info' template with some custom css and handlebars
to get it to display properly.

Should now wrap correctly with sentences and words, and display 'lines'
on separate lines.
2016-01-06 11:06:16 +00:00
Mailkov 1945216a79 add title 2016-01-06 10:11:02 +00:00
Zaahir Moolla df3b3f39b4 Merge pull request #1979 from Mailkov/cusipissue1163
Issue #1163 - Convert Cusip to use templates
2016-01-05 23:47:19 -05:00
Charlie Garrison 7ab965df6f Sort recipes from longest to shortest phrase
Signed-off-by: Charlie Garrison <cngarrison@gmail.com>
2016-01-05 18:18:35 +11:00
Mailkov 0b2a6e3c62 fix indentation 3 2016-01-05 00:09:54 +00:00
Mailkov d3dcad6ccb fix indentation 2 2016-01-05 00:04:52 +00:00
Mailkov 9f80ab8d24 delete colon 2016-01-04 23:11:51 +00:00
Rob Emery 2fd9205f62 Merge pull request #2004 from Mailkov/unixtimeissue1163
Issue #1163 - Convert UnixTime to use templates
2016-01-04 22:04:19 +00:00
Mailkov 6a7ac8a14b delete unused code 2016-01-04 18:01:23 +00:00
Mailkov eb3b245d7b add text template 2016-01-04 17:49:22 +00:00
Mailkov eaad13f4a2 deactivate html code 2016-01-04 17:44:18 +00:00
Mailkov 1039313012 add attribution 2016-01-04 17:43:11 +00:00
Mailkov 2cac514c3b delete empty line 2016-01-04 17:14:51 +00:00
Mailkov 5ad6a84020 delete unused code 2016-01-04 17:11:21 +00:00
Mailkov e52e597290 add list template 2016-01-04 16:54:07 +00:00
Ben Moon 4bc4e17cf2 Update answer to template 2016-01-04 16:00:12 +00:00
Zaahir Moolla f53b0bc636 resolve merge conflict 2016-01-04 10:31:06 -05:00
Mailkov a7b3ce5aad deactive html code 2016-01-04 14:48:18 +00:00
Mailkov c44165a283 add attribution 2016-01-04 14:46:26 +00:00
Mailkov 98d8d6ff88 delete unused code 2016-01-04 14:35:44 +00:00
Mailkov c674b4b431 correct tests on VIN.t 2016-01-04 14:34:35 +00:00
Mailkov 220155a186 add text template 2016-01-04 14:25:50 +00:00
Mailkov 390cbc193e add attribution 2016-01-04 14:16:57 +00:00
Rob Emery b4ef4a0205 Conversions: Adding support for 'How to convert $x to $y' queries 2016-01-03 12:42:38 +00:00
Ben Moon 609070ba80 Update regexes and format of answer
Fixes a few bugs with the regexes (namely the font-size).

Adds support for using "base pixel size" instead of "font size".

Pulls out some of the expressions into smaller pieces.
2016-01-02 12:34:52 +00:00
Ben Moon 4420016052 Move conversions algorithms out to functions 2016-01-02 12:33:07 +00:00
Ben Moon 5d210ec249 Update answer to use template 2016-01-02 12:31:34 +00:00
Rob Emery 1085815b19 Conversions: Fixing hard-tabs 2016-01-02 10:44:30 +00:00
Rob Emery d841ffb676 Conversions: Switching to YAML::XS, LoadFile; also breaking the triggers out from the units. I'd like to introduce prefixes (kilo, mega, ...) as separate things which would need to extend the units 2016-01-01 22:42:08 +00:00
Rob Emery e4555874b4 Conversions: Tidying out warn() that was for some filthy debugging 2016-01-01 22:37:33 +00:00
Rob Emery 2ed2a3f444 Conversions: The answer can now actually be 0 (previously due to a psuedo undefined check it wasn't possible). Readding tautology tests :) 2016-01-01 22:34:47 +00:00
Rob Emery bbfa31ec81 Conversions: Temperature conversion now works correctly. Some of the tests were wrong as they were based on the old results. Tautology questions (0 kelvin in kelvin) will not return a result 2016-01-01 22:16:24 +00:00
Rob Emery 51d26e14a6 Conversions: Fixing execution of '-7 fahrenheit in kelvin' this was because conversions assumed that if the from unit can't be negative then the to unit must also be forbidden, this doesn't apply well to temperature conversion 2016-01-01 22:06:41 +00:00
Rob Emery 56bb2ef181 Conversions: New more accurate temperature calculations, fixing inaccurate test, implementing lc case triggers 2016-01-01 21:56:48 +00:00
Rob Emery 9bfcf27170 Conversions: Should be UTF8 aware 2016-01-01 21:00:18 +00:00
Rob Emery 3f43ab7a0d Conversions: Removing C::P dependency and providing conversions from data provided with goodie 2016-01-01 20:57:08 +00:00
Mailkov 78ae4f8db4 fix review 2015-12-31 10:32:25 +00:00
Zach Thompson a32452fed6 Merge branch 'master' into zt/rm-meta
Conflicts:
	lib/DDG/Goodie/Anagram.pm
	lib/DDG/Goodie/Average.pm
	lib/DDG/Goodie/Chess960.pm
	lib/DDG/Goodie/ColorCodes.pm
	lib/DDG/Goodie/Constants.pm
	lib/DDG/Goodie/Factorial.pm
	lib/DDG/Goodie/LaserShip.pm
	lib/DDG/Goodie/Passphrase.pm
	lib/DDG/Goodie/ResistorColors.pm
	lib/DDG/Goodie/RubiksCubePatterns.pm
	lib/DDG/Goodie/Shortcut.pm
	lib/DDG/Goodie/Sort.pm
	lib/DDG/Goodie/TwelveOclock.pm
	lib/DDG/Goodie/Unicode.pm
	lib/DDG/Goodie/Zodiac.pm
2015-12-30 13:54:57 -07:00
Mailkov 84ce748cfd delete unused code 2015-12-30 17:23:12 +00:00
Mailkov ad4fb9a1ca add text template 2015-12-30 17:07:17 +00:00
Mailkov 3efe70aa69 deactive html code 2015-12-30 16:44:05 +00:00
Mailkov f4586191f1 fix indentation 2015-12-30 16:41:29 +00:00
Mailkov 677c5a5752 add attribution 2015-12-30 16:38:20 +00:00
Mailkov 9f4332ba0c fix indentation 2015-12-30 16:25:28 +00:00
Mailkov 0a5adfa884 delete unused code 2015-12-30 16:17:09 +00:00
Mailkov 34588d2afc add text template 2015-12-30 16:06:16 +00:00
Mailkov edf3bbc7ba deactive html code 2015-12-30 15:50:32 +00:00
Mailkov c06e4f452e add attribution 2015-12-30 15:49:12 +00:00
Mailkov 84afccb6c6 delete unused code 2015-12-30 15:28:39 +00:00
Mailkov bc8373328a correct graphic answer 2015-12-30 15:12:49 +00:00
Mailkov 4fa6720aab fill content.handlebars with data answer 2015-12-30 14:46:03 +00:00
Mailkov 90ba969be6 add text template 2015-12-30 14:33:39 +00:00
Mailkov 7953072f36 deactive html code 2015-12-30 14:31:19 +00:00
Mailkov 298122da46 add attribution 2015-12-30 14:29:55 +00:00
amitdev feff2c2db7 Periodic Table: Modified display format 2015-12-30 04:35:32 +00:00
Mailkov 2f5a3f02c6 delete other unused code 2015-12-29 19:31:49 +00:00
Mailkov 916964525c fix review 2015-12-29 19:28:09 +00:00
Caine Tighe 53fc09c09c DDG::Goodie::PrimeNumber: Move maximum value from 1B to 1M. 2015-12-29 12:29:40 -05:00
Mailkov 4933b41a21 fix review 2015-12-29 17:23:12 +00:00
Mailkov 6044764bd7 fix indentation 2 2015-12-29 17:08:58 +00:00
Mailkov f19ec30a48 fix indentation 2015-12-29 17:07:10 +00:00
Mailkov 09d95f08f5 delete unused code 2015-12-29 16:54:08 +00:00
Mailkov b954752411 add template list 2015-12-29 16:41:36 +00:00
Mailkov 544c4f0a62 move sub out handle 2015-12-29 14:09:42 +00:00
Mailkov a602c9c564 correct indentation 2015-12-29 14:07:35 +00:00
Mailkov 61654bab72 deactive html code 2015-12-29 14:05:55 +00:00
Mailkov 56c2c0aaec add attribution 2015-12-29 14:03:50 +00:00
Mailkov 37f8f6bf46 delete unused code 2015-12-28 19:34:35 +00:00
Mailkov 03cf8bbf3f correct Dice.t 2015-12-28 19:32:41 +00:00
Mailkov 7b4f97c4e8 add content.handlebars 2015-12-28 19:02:05 +00:00
Mailkov 9ca5d7b4c9 add answer template 2015-12-28 18:11:27 +00:00
Mailkov 3505fa731d inactive html code 2015-12-28 17:31:06 +00:00
Mailkov 4e5da89384 add attribution 2015-12-28 17:28:27 +00:00
Mailkov a232152b71 delete unused code 2015-12-28 17:03:10 +00:00
Mailkov a94ede5842 correct indentation 2015-12-28 16:57:03 +00:00
Mailkov a9c6840d40 add answer info template 2015-12-28 16:50:27 +00:00
Mailkov 42d0f61585 add attributionù 2015-12-28 16:35:40 +00:00
Mailkov 9f3d71774b delete unused code 2015-12-28 16:29:45 +00:00
Mailkov 63aff8bfd0 add answer text template 2015-12-28 16:10:27 +00:00
Mailkov 75860632c6 add attribution 2015-12-28 16:07:04 +00:00
Mailkov b06eb94152 delete all unused code 2015-12-28 15:53:39 +00:00
Mailkov 6560e34347 add metadata 2015-12-28 15:23:55 +00:00
Mailkov c4fd8ea146 add answer template text 2015-12-28 15:00:24 +00:00
Charlie Garrison 0a7b1cd86c Remove empty value check
Signed-off-by: Charlie Garrison <cngarrison@gmail.com>
2015-12-29 01:44:41 +11:00
Mailkov b99954e56b create hash cryptohash 2015-12-28 14:40:54 +00:00
Mailkov 47d7698758 unify match regex 2015-12-28 14:35:01 +00:00
Mailkov b54cae9729 fix indentation on CryptHashCheck.pm 2015-12-28 13:56:11 +00:00
Mailkov 90e57dc2b1 add attribution 2015-12-28 13:48:11 +00:00
Charlie Garrison 24b4bc9ecc Update ABSTRACT
Signed-off-by: Charlie Garrison <cngarrison@gmail.com>
2015-12-28 20:07:27 +11:00
Charlie Garrison 526e1d4668 Change example queries to show variety of dates
Add tests for more date formats.

Signed-off-by: Charlie Garrison <cngarrison@gmail.com>
2015-12-28 20:04:36 +11:00
amitdev 46be3bc289 Always show atomic number,mass and format as per query 2015-12-28 05:13:24 +00:00
Mailkov 66f74ba026 change in into to 2015-12-27 16:40:16 +00:00
Ben Moon 362039a31a Update IA id 2015-12-27 15:30:15 +00:00
Ben Moon e009692004 Add support for lines
Lines are like sentences, but can end in '?', '!' or '.'.
2015-12-27 14:49:16 +00:00
Ben Moon 90dda04f0e Improve language support
Language wasn't getting set properly.
2015-12-27 14:48:18 +00:00
Charlie Garrison 9a1f1d0908 Merge branch 'master' of https://github.com/duckduckgo/zeroclickinfo-goodies into day-of-week 2015-12-28 01:37:11 +11:00
Charlie Garrison 81dca33feb New Goodie to calculate day of the week for a date
Signed-off-by: Charlie Garrison <cngarrison@gmail.com>
2015-12-28 01:36:32 +11:00
Ben Moon 14af37b348 Add support for words as numbers
Now converts initial words into numbers where possible.
2015-12-27 13:58:06 +00:00
Ben Moon 5292d8ede7 Implement basic nonsense
Provides support for basic queries to generate gibberish in
all supported languages.
2015-12-27 13:56:48 +00:00
Ben Moon 88f7d7b2a1 Add basic template 2015-12-27 13:50:19 +00:00
Rob Emery fefb04d67d Atbash: normalising whitespace to 4 spaces 2015-12-27 11:25:46 +00:00