Commit Graph

1989 Commits (f2338c83d7dc082b81c2cb7cd44714424bd5cbec)

Author SHA1 Message Date
Rob Emery d7f2d527f8 DatesRole: making util "nominally private" 2014-10-13 12:43:27 +01:00
Rob Emery c34f5024f4 DatesRole: Ternaries ftw! 2014-10-13 12:42:49 +01:00
Rob Emery 126e64db33 Hiragana: Adding categories 2014-10-12 23:10:59 +01:00
Rob Emery 9f79803169 Hiragana: updating primary and secondary queries 2014-10-12 23:08:22 +01:00
Rob Emery 860ae5ba8b Hiragana: Adding HTML output and updating tests 2014-10-12 22:57:21 +01:00
Rob Emery 5e459f7069 Hiragana: Removing debugging 2014-10-12 22:44:45 +01:00
Rob Emery 445300d3a8 Hiragana: Enforcing longest matches first on replacement 2014-10-12 22:44:21 +01:00
Rob Emery 32d5494ec5 Hiragana: Fixing exceptions in the lookup table 2014-10-12 22:42:29 +01:00
Rob Emery 2606286e6c Hiragana: First version for phrases 2014-10-12 22:37:56 +01:00
Rob Emery 887bc7a6bf Hiragana: fixing test for erors 2014-10-12 22:23:06 +01:00
Rob Emery 901ad94cdd DatesRole: Fixing *stupid* mistake in regex 2014-10-12 22:08:12 +01:00
Rob Emery aa30b6e2b1 DatesRole: Removing prototype from util sub 2014-10-12 21:23:51 +01:00
Rob Emery 7bf83d0570 DatesRole: refactoring into utility function 2014-10-12 21:22:48 +01:00
Rob Emery 4dbb8b07e3 DatesRole: Expanding test coverage and first (probably broken) implementation 2014-10-12 21:09:33 +01:00
Rob Emery b36a54ff56 DatesRole: Adding regex and failing tests for new proseque formats 2014-10-12 20:41:58 +01:00
Rob Emery 03f8cf0e0e DatesRole: Tidying up 2014-10-12 20:34:06 +01:00
Rob Emery 194b21c89e DatesRole: Clarifying terrible comment 2014-10-12 20:27:56 +01:00
Rob Emery 831055b726 DatesRole: Renaming misleading regex 2014-10-12 20:08:30 +01:00
Rob Emery 1639d54f31 Hiragana: Adding extended syllabograms 2014-10-10 23:06:21 +01:00
Rob Emery edd29ae329 Hiragana: first base version 2014-10-10 22:36:02 +01:00
Rob Emery fcb90eee02 Chinese Zodiac: Adding support for plural vague terms 2014-10-10 19:58:08 +01:00
Matt Miller 4e53d2aca2 DatesRole: add "this" week|month|year.
At this point,all of them are essentially aliases for "today", but the
logic is kept separate in case we want to move them to start of period
or similar.

Minor update on Chinese Zodiac to demonstrate it working through the
role instead of local triggering.
2014-10-10 16:12:05 +02:00
Matt Miller 166519a44d DatesRole: definededness not truthiness for parsing.
I don't know that we'd ever need to actually support year 0 or similar,
but there may come a day where we support epochs or something and it
might make sense.
2014-10-10 04:15:48 +02:00
Rob Emery 166ae9449f DatesRole: minor cleanup 2014-10-09 19:22:30 +01:00
Matt Miller 73b4f33c7e ChineseZodiac: update as example of working with relative dates. 2014-10-09 14:41:30 +02:00
Matt Miller 478256f524 Merge remote-tracking branch 'origin/master' into mintsoft/relative_dates
Conflicts:
	lib/DDG/GoodieRole/Dates.pm
2014-10-09 14:11:41 +02:00
Matt Miller 7c58753db2 DatesRole: fix and expand relative dates.
- Add grouping to regex for proper |ing.
- Add 'year' to relative dates.  (See Chinese zodiac)
- Add more tests.
2014-10-09 14:07:15 +02:00
Matt Miller a26e6fc5c0 DatesRole: better protect against undef datestrings. 2014-10-09 13:03:57 +02:00
Rob Emery 57783d5cfb DatesRole: Minor tidyup 2014-10-09 00:01:10 +01:00
Rob Emery bbf6d2066f DatesRole: Adding rough implementation for relative times 2014-10-08 23:56:58 +01:00
Rob Emery aeb272ec55 DatesRole: Adding regex and failing tests for relative day parsig 2014-10-08 23:43:45 +01:00
Matt Miller 3169c5b6f0 Conversions: support "out_unit in count in_unit" style queries.
Expansion of the 'in hack' to figure out which is in which.

Fixes #673.

cc: @mintsoft
2014-10-08 18:14:49 +02:00
Rob Emery 15c367e782 Merge pull request #667 from mwmiller/anagram_rethink
Anagram: allow for multi-word queries.
2014-10-07 20:47:37 +01:00
Matt Miller 0e95d935b4 Anagram: HTML encode scrambles.
Although this isn't _exactly_ a user-supplied string, it is still
somewhat under their control.  Better safe than sorry.

Thanks to @mintsoft for the suggestion.
2014-10-07 21:01:47 +02:00
Matt Miller e3bc84c52d Anagram: allow for bare keywords.
I'm depend on trigger order continuing to be important.  If you got here
via bisect, I am sorry that is no longer true.
2014-10-07 21:01:47 +02:00
Rob Emery 8b0d4d1697 URLEncode: Making consistent style-wise with URLDecode 2014-10-07 19:09:04 +01:00
Zaahir Moolla 9fbbf1ec5f switch tabs to spaces 2014-10-07 12:38:19 -04:00
Zaahir Moolla c1c0e3c2df reign in triggering of URLDecode 2014-10-07 12:37:03 -04:00
Zaahir Moolla f9a51459a2 Merge pull request #640 from mwmiller/threat_level_midnight
TwelveOclock: add new instant answer to help with 12 am/pm
2014-10-07 11:48:47 -04:00
Zaahir Moolla cf33de4443 Merge pull request #622 from duckduckgo/mintsoft/url_decode
URLDecode: Adding new goodie to replace closed source version
2014-10-07 10:33:05 -04:00
Rob Emery fe29050823 URLDecode: Style changes a-la-@chrismorast 2014-10-07 08:08:55 +01:00
Matt Miller 791a4005ba Anagram: allow for multiple word inputs.
- Cache by default; only turn off for "scrambled" results.
- Simplify `calc_freq` slightly.
- Remove "length" argument, as it doesn't make sense with anagrams.
- Cache letter frequency info as dictionary words are examined.
- Allow for multi-word queries to match single word anagrams.

This still does not allow for multi-word anagrams.  Although it
would be nice to do so, it adds significant computational complexity.
2014-10-04 12:15:59 +02:00
Matt Miller 3eb11ec20e Anagram: require connector words for context. 2014-10-04 10:41:49 +02:00
Matt Miller 3a68b6a3b2 Anagram: add missing quotation mark.
Also, make tests of HTML answers more sensitive.

Fixes #665.
2014-10-03 19:30:22 +02:00
Zaahir Moolla ef156c23de Merge pull request #664 from mwmiller/calendar_today
CalendarToday: tighten up query triggers a bit.
2014-10-03 11:56:38 -04:00
Matt Miller 8f858b387e CalendarToday: tighten up query triggers a bit.
- Add filler_words list which can be stripped from the query before
  trying to parse date strings.
- Anchor datestring_regex so as to allow for only date left in query
  after clean-up.
- Improve guard against empty strings and `undef` in Dates role parsers.

Fixes #661.
2014-10-03 17:16:33 +02:00
Tommy Leung bfc2c1dde9 Rewrote CUSIP goodie to take advantage of Business::CUSIP 2014-10-03 10:56:44 -04:00
Tommy Leung 7833f3c1f3 Code cleanup/optimization for CUSIP check digit Goodie 2014-10-03 10:56:44 -04:00
Tommy Leung 7683fb70d1 Code changes for style and clarity to new CUSIP Goodie
Added HTML output
Removed POSIX dependency
2014-10-03 10:56:44 -04:00
Tommy Leung 9e8a01f678 Changed "switch" style to remove dependency 2014-10-03 10:56:44 -04:00
Tommy Leung 35e955b8a9 Added CUSIP Check Digit Validation Goodie 2014-10-03 10:56:44 -04:00
Matt Miller 1df8a6c5bc Merge branch 'master' into mwm/explicit_caching
Conflicts:
	lib/DDG/Goodie/Hijri.pm
	t/Hijri.t
2014-10-03 15:56:01 +02:00
Rob Emery 4ee36136b1 Merge pull request #634 from mwmiller/chinese_zodiac_to_role
ChineseZodiac: expand trigger space with DatesRole.
2014-10-03 13:30:12 +01:00
Jag Talon 485a8810b6 Merge pull request #652 from duckduckgo/mwm/jalali
CalendarConversions: now with the Jalali calendar
2014-10-02 13:42:49 -04:00
Jag Talon 20f58421ef Merge pull request #647 from mwmiller/hidden_in_plain_site
DuckDuckGo: hidden service updates.
2014-10-02 11:22:58 -04:00
Matt Miller 109bd64681 CalendarConversion: update styling.
- New date outputs with per-calendar months.
- More standardized CSS.

I'm less than excited that you can't enter the other calendars with
month names, but that'll have to be ok for now.
2014-10-02 15:38:44 +02:00
Matt Miller 06d00f2a70 CalendarConversion: expand test coverage.
Also cleaned up some code to make sure triggering makes at least minimal
sense.
2014-10-02 09:03:25 +02:00
Matt Miller 8b6ff8d866 Hijri: enable answer caching. 2014-10-01 08:42:01 +02:00
Matt Miller 14923e5c08 TwelveOclock: add and style HTML answer. 2014-10-01 05:32:07 +02:00
Matt Miller 18b3319726 TwelveOclock: add answer_type and is_cached. 2014-10-01 04:39:37 +02:00
Matt Miller 68fc7c8dec Set explicit caching everywhere.
This explicity sets the caching behavior for all goodies. Goodies which
did not have caching behavior set in their package have had it added.
Similarly for the tests.

This resulted in a number of changes for caching behavior, mostly
moving towards more frequent caching.

I identified three cases where goodies should not be cached. They are when
the result depends upon:

- some random element,
- the time of day or year (as with relative dates), or
- the location of the requesting user

In all other cases, I presumed that the goodies were sufficiently
deterministic in their output to warrant caching.
2014-09-27 10:35:17 -04:00
Zaahir Moolla 86fb323cc3 include uri_escape on URIEscape import 2014-09-25 16:23:28 -04:00
Zaahir Moolla 646b54c92e POTUS - us XS for URI::Escape 2014-09-25 15:41:09 -04:00
Zaahir Moolla 66adaeff0f Merge pull request #608 from mwmiller/unix_time_changes
Unix Time Updates.
2014-09-25 14:35:46 -04:00
Matt Miller 85db003108 UnixTime: expand triggering.
- Allow for triggers at either end.
- Allow for negative epochs.
- Replace regex trigger with words trigger.
2014-09-25 11:51:57 -04:00
Matt Miller 99805113cd DuckDuckGo: hidden service updates.
- Play down its status as a "hidden service", since we widely
  adverterise the availability of such.
- Add more 'onion'-y keys.
2014-09-23 11:33:58 -04:00
Matt Miller 7f23be78f4 DuckDuckGo: respond to question form.
- Allow for ?s
- Skip some question filler words
2014-09-22 17:16:51 -04:00
Matt Miller f0410ac6f4 UnixTime: try yet another style.
HTML version unabashedly stolen from SubnetCalc.

Thanks to @mintsoft for the suggestion.
2014-09-21 09:37:19 -04:00
Matt Miller f6276d270e CalendarConversion: update output format.
Also rework the logic somewhat to (potentially) make it easier to
follow.
2014-09-20 17:17:17 -04:00
Matt Miller dfaca8993b CalendarConversion: use DatesRole 2014-09-20 17:17:17 -04:00
Ehsan Akhgari 6f1b8179ae Add support for conversion to/from the Jalali calendar 2014-09-20 17:17:17 -04:00
Ehsan Akhgari e5e13c30fc Convert the Hijri package to a generic Calendar package 2014-09-20 17:17:17 -04:00
Matt Miller 8b83fb39ee HexToDec: use more appropriate answer_type. 2014-09-20 16:21:57 -04:00
Matt Miller 2cb0251f06 HexToDec: move the guarding into the trigger.
I don't know why this didn't occur to me, but thankfully it did to
@mintsoft!
2014-09-20 16:21:08 -04:00
Matt Miller 108e5e1725 HexToDec: tighten up trigger to hex number only.
This was interfering with the HexToASCII goodie.  We will assume that
with other context they want something besides the conversion.

It should still be possible to add any explicit triggers into this
Goodie if so are desired. The tests indicate no such intention;
assuming this is fine for now.
2014-09-20 16:21:08 -04:00
Rob Emery 6e44bed307 Merge pull request #632 from mwmiller/tz_conv
TimezoneConverter Updates.
2014-09-20 20:49:29 +01:00
Matt Miller 453428fa5c DuckDuckGo: add spacing variations for 'duck duck go'.
Who knows how someone may type it, so we'll assume they mean us no
matter what craziness is involved.

Also, clean up the tests a bit such that text changes need only be done
in one place, while the triggering can be run in multiple places easily.
2014-09-20 14:06:04 -04:00
Matt Miller 31bfb73a45 DuckDuckGo: expand trigger-space.
- Add "duck duck go" trigger.
- Add possessive versions of triggers.
- Allow triggers to appear anywhere in the query.
- Skip prepositions and definite articles before key conversion.

Fixes #645.
2014-09-20 10:18:29 -04:00
Rob Emery da73c6f545 URLDecode: Copying behaviour of old goodie 2014-09-18 20:15:14 +01:00
Rob Emery 924f60b413 URLDecode: Reverting back to span 2014-09-18 20:09:48 +01:00
Jag Talon ee6747c9db Merge pull request #540 from charles-l/master
Tmux Cheat Sheet
2014-09-17 17:37:18 -04:00
Rob Emery 100383575a URLDecode: Switching to code around output 2014-09-17 20:15:01 +01:00
Rob Emery 50714845c9 URLDecode: Changing output to URL Decoded: 2014-09-17 20:04:08 +01:00
Matt Miller 2d28a92a45 TwelveOclock: improve friendliness of answers.
- Answer questions "when is noon?" and "when is midnight?"
- Include such questions as secondary_example_queries
- Be less aggressive in the answer with a comma instead of a period

Includes some internal renaming and reorganization, plus comments to
better reflect the purpose of each bit.
2014-09-17 08:35:00 -04:00
Matt Miller 928f56b47b TwelveOclock: add new instant answer to help with 12 am/pm 2014-09-16 11:49:28 -04:00
Jason Feeney c8c3834f0f Merge branch 'master' of https://github.com/duckduckgo/zeroclickinfo-goodies into uafix
Conflicts:
	lib/DDG/Goodie/UltimateAnswer.pm
2014-09-15 20:50:52 -04:00
Jason Feeney 4932d57c00 UltimateAnswer - Fix primary query 2014-09-15 18:22:15 -04:00
Jason Feeney a1a61f1409 Ultimate Answer - Fixed primary query 2014-09-15 18:05:11 -04:00
Jason Feeney 3edaf57dcc Merge branch 'master' of https://github.com/jfeeneywm/zeroclickinfo-goodies into uafix
Fixing primary query
2014-09-15 17:48:25 -04:00
Matt Miller 22108e0161 ChineseZodiac: improve test readability a bit.
- Switch out \x{2013} for literal en-dash, since the file is UTF8
- Switch out \s for literal space for easier reading.
2014-09-14 14:46:07 -04:00
Matt Miller 518189eaa4 ChineseZodiac: expand trigger space with DatesRole.
This allows for entering specific dates which will be parsed into
DateTime objects for use in the calculation.

Also, switch to the DDH-standard format for the output date strings.
2014-09-14 14:17:18 -04:00
Matt Miller 98327903a0 BinaryLogic: add ABSTRACT to reduce scroll-spam 2014-09-12 16:45:00 -04:00
Matt Miller 3f3dbd5df8 TimezoneConverter: add support for "from" timezone.
We've always been able to convert from a given timezone, but they
weren't allowed to explicitly say so.

The example query exposed a bug in the 'PM' handling for the 12
o'clock hour which is also resolved herein.

Fixes #631.
2014-09-12 11:24:37 -04:00
Matt Miller 8e22daee13 TimeZoneConverter: move to named captures.
This makes it easier to decipher what matches what and how the defaults
come to be set, in my opinion.
2014-09-12 10:12:00 -04:00
Matt Miller ede57fceda UnixTime: apply HTML table and styling.
An attempt to get a nicer look.
2014-09-12 08:41:48 -04:00
Matt Miller 4d62fd1731 UnixTime: switch to regex trigger.
This seemed like the easiest way to not trigger on an empty "epoch" or
"timestamp" but to work with all the other combos.
2014-09-12 08:33:52 -04:00
Matt Miller 53317244bc UnixTime: clean up eval a bit.
- Don't handle milliseconds with such a blunt trigger.  That's just
  plain silly.
- Replace `eval` with `try` from Try::Tiny.
2014-09-12 08:33:52 -04:00
Matt Miller ad56e5c9c1 UnixTime: update comment. 2014-09-12 08:33:52 -04:00
Matt Miller 31e99b9370 UnixTime: remove `time` trigger.
This eliminates the conflict with the preferred W|A answer.

Addresses #607.
2014-09-12 08:33:52 -04:00
Matt Miller a71a6132a9 UnixTime: update output to include the epoch.
This is in service to some submarine commits which will be arriving soon
to deal with Goodies templating.  This makes UnixTime look "more like it
will" in addition to supplying what we determined to be the supplied
epoch.

This is most useful in the "empty" epoch case where we will tell them
the current epoch which may be of interest.
2014-09-12 08:33:52 -04:00
Rob Emery faf806b26c URLDecode: changes to support new automatic-Goodie-style-slurping 2014-09-12 00:23:01 +01:00
Matt Miller a6a5d9ffbb ResistorColors/ColorCodes: update new selector names.
Changed to be a bit less generic at the behest of @russellholt
2014-09-11 17:37:13 -04:00
Rob Emery f70fb32b11 URLDecode: Workaround for 100 char limit within `query` by switching to query_raw 2014-09-11 20:16:14 +01:00
Rob Emery 19fcf1f0ed URLDecode: switching from insensitive regex 2014-09-10 23:25:11 +01:00
Rob Emery e5cb9367a2 URLDecode: switching to regex trigger 2014-09-10 22:49:31 +01:00
Matt Miller e18062e177 ResistorColors: move from inline CSS. 2014-09-10 17:33:33 -04:00
Matt Miller 4a24d5165b ColorCodes: move from inline css 2014-09-10 17:33:32 -04:00
Matt Miller b7517fd6d9 UltimateAnswer: move from inline css 2014-09-10 17:28:30 -04:00
Matt Miller 8eabfe0c35 UltimateAnswer: remove trailing whitespace. 2014-09-10 17:28:30 -04:00
Matt Miller 2b0f13826e Unifornify: move from inline CSS. 2014-09-10 17:28:30 -04:00
Matt Miller f48a4c8ccc Dice: move from inline CSS. 2014-09-10 17:28:30 -04:00
Matt Miller 80897ce535 ValarMorghulis: move from inline CSS. 2014-09-10 17:28:30 -04:00
Matt Miller 4e7ad3143e SHA: move from inline CSS. 2014-09-10 17:28:30 -04:00
Matt Miller ebd15f598a Move goodies to new styling mechanism.
- Rename 'style.css' to appropriate ID-based name.
- Remove explicit inclusion of CSS, as it will now be auto-included.
- Update tests which explicitly checked for styling.
2014-09-10 17:28:30 -04:00
Matt Miller b391fe3204 Merge pull request #625 from mwmiller/color_sanity
ColorCodes: simplify and comment a bit.
2014-09-10 17:24:22 -04:00
Matt Miller 5faf30c129 DateMath: properly recognize and handle weeks.
Fixes #628.
2014-09-10 08:27:54 -04:00
Matt Miller 7ace24facb ColorCodes: rough in a different HTML template.
Real templates are coming, but this is a step.
2014-09-09 18:54:38 -04:00
Matt Miller ce92e69d7d ColorCodes: allow for rgb #123456-style queries 2014-09-09 18:23:13 -04:00
Matt Miller c84f0464d2 ColorCodes: simplify and comment a bit.
- Simplify logic and increase explanation to make it easier
  for the casual reader.
- Remove the undocumented, untested and not-clearly-working
  "percentage" support.
- Replace `eval` with `try`, as is my wont.

Addresses #620.
2014-09-09 11:36:10 -04:00
Rob Emery 6aa39b9552 URLDecode: Adding guard for percent encoded content 2014-09-08 20:12:02 +01:00
Matt Miller 17fc1447c9 DatesRole: add RFC2822 support. 2014-09-07 18:36:48 -04:00
Matt Miller 97f737e0be DatesRole: support standard output of date(1).
- Convert to ISO-8601 for the parse.
- Support short month to number in service of above.
- Support TZ to UTC offset in service of above.

In cases where the TZ abbreviation was ambiguous I selected what I
deemed to be the most populous or most likely to be a DDG user's intent.
I may, of course, be wrong.

Fixes #621.
2014-09-07 17:42:03 -04:00
Rob Emery eede9244b0 URLDecode: Adding new goodie to replace closed source version 2014-09-07 20:49:55 +01:00
NinjaCharlie b6a8dd08f4 Merge https://github.com/duckduckgo/zeroclickinfo-goodies 2014-09-07 15:49:03 -04:00
Matt Miller f101ef6ebf Merge pull request #615 from duckduckgo/mintsoft/binary_logic
Fixing up BinaryLogic
2014-09-05 18:03:18 -04:00
Jag Talon 3b1ada5652 Merge pull request #612 from mwmiller/codewords
ColorCodes: treat "code" as semantic noise.
2014-09-05 17:32:31 -04:00
Zaahir Moolla 859f7e776d Merge pull request #614 from duckduckgo/mintsoft/workdays_between
Extending Dates Role's Vague String handling & Fixing #346
2014-09-04 16:40:42 -04:00
Zaahir Moolla ff280e81c5 Merge pull request #605 from exoWM/master
Hitchhiker's Guide Easter egg IA
2014-09-04 16:12:14 -04:00
Rob Emery b1a76cfbdc BinaryLogic: Supporting Binary; thanks for the input @killerfish ! 2014-09-02 23:05:31 +01:00
exoWM 60b19df902 Fix tests 2014-09-02 22:00:44 +00:00
exoWM 88194ec282 Fix mistakes 2014-09-02 21:33:54 +00:00
exoWM 6c9097dd61 Merge branch 'master' of github.com:exowm/zeroclickinfo-goodies
Conflicts:
	lib/DDG/Goodie/UltimateAnswer.pm
	t/UltimateAnswer.t
2014-09-02 21:30:35 +00:00
exoWM ad644ffb8e Ultimate Answer Formatting 2014-09-02 21:25:38 +00:00
Matt Miller e4382bdd7b CalendarToday: simplify conditional a bit. 2014-09-01 14:58:29 -04:00
Matt Miller 02f82a7668 DatesRole: comment on descriptive matches 2014-09-01 14:54:09 -04:00
Matt Miller f2ebf9006e DatesRole: switch in || for //.
Requested change to make the syntax more familiar. We shouldn't have any
valid false-y values, so this should be equivalent.
2014-09-01 09:00:45 -04:00
Matt Miller 73ccf7282e DatesRole: complete deprecation cycle.
- Deprecate 'parse_all_strings_to_date()' in favor of
  'parse_all_datestrings_to_date()' for consistency.
- Remove the deprecated functions.
- Update all calls.
2014-08-31 19:21:55 -04:00
Rob Emery d4365ffa2f BinaryLogic: Removing debugging info 2014-08-31 23:00:48 +01:00
Rob Emery d73aefbd46 BinaryLogic: Fixing layout with tests 2014-08-31 22:58:06 +01:00
Rob Emery cfa99f8915 BinaryLogic: Fixing order of presidence 2014-08-31 21:51:35 +01:00
Matt Miller 3503faccca DateMath: expand query-space with datestring_regex(). 2014-08-31 16:36:40 -04:00
Matt Miller 5f9ab6573f DaysBetween: expand query-space like WorkdaysBetween. 2014-08-31 16:36:40 -04:00
Matt Miller 8b38680560 DatesRole: simplify parse_datestring_to_date.
Since they guard their own inputs and return undef in case of failure,
we can just let them each try until we either get something or not.

Anchoring the guards makes sure we can tell descriptive from formatted.
2014-08-31 16:36:40 -04:00
Matt Miller 02c114607d CalendarToday: Simplify with dates role changes. 2014-08-31 16:36:40 -04:00
Rob Emery dd02261d1d DatesRole: Switching parse_all_strings_to_date to use parse_datestring_to_date 2014-08-31 21:17:23 +01:00
Rob Emery d7b2ab8df0 WorkdaysBetween: Switching to use new cleaner datestring_regex 2014-08-31 20:04:32 +01:00
Rob Emery f47900f5fc DatesRole: Moving the deprecated stuff out of the way for now 2014-08-31 19:59:35 +01:00
Rob Emery ce0880b158 DatesRole: renaming and deprecating parse_string_to_date 2014-08-31 19:39:37 +01:00
Rob Emery 0363431437 DatesRole: fleshing out new behaviour of parse_string_to_date 2014-08-31 19:34:09 +01:00
Rob Emery 002f3bd0b3 DatesRole: Tidyup 2014-08-31 18:50:59 +01:00
Rob Emery a893786d53 DatesRole: inverting if in descriptive parsing 2014-08-31 18:39:49 +01:00
Rob Emery d4e99a8771 DatesRole: Wrapping and renaming parse_descriptive_string_to_date to parse_descriptive_string_to_date 2014-08-31 18:38:41 +01:00
Rob Emery 0c59eb4d12 DatesRole: Separating parse_string_to_date and formatted_strings to date behaviour 2014-08-31 18:36:30 +01:00
Rob Emery 624587b060 DatesRole: Renaming things inline with "datestring" for regexes and moving date_output_string to keep parsers together 2014-08-31 18:00:17 +01:00
Rob Emery c1ac024744 DatesRole: renaming usages of date_regex() to $formatted_date 2014-08-31 17:46:24 +01:00
Rob Emery 6430719827 DatesRole: Refactoring date_regex into a builder 2014-08-31 17:43:41 +01:00
Rob Emery e6034d147b BinaryLogic: Harmonising the test format 2014-08-30 22:22:40 +01:00
Rob Emery ac5d4acb83 Removing Xor, superceded by BinaryLogic 2014-08-30 21:55:49 +01:00
Rob Emery 44518a7823 BinaryLogic: Original version by @bpaschen 2014-08-30 21:50:28 +01:00
Rob Emery 080df14e70 WorkdaysBetween: Using new DatesRole functionality to fix https://github.com/duckduckgo/zeroclickinfo-goodies/issues/346 2014-08-30 21:19:59 +01:00
Rob Emery 1a7e46b127 DatesRole: cleaning up clashing variables and making use of vague_datestring_regex not pollute the consumer's match context 2014-08-30 21:00:46 +01:00
Rob Emery aebc43f1e3 Merge pull request #613 from mwmiller/abstraction
RandomNumber: add ABSTRACT.
2014-08-30 20:50:31 +01:00
Rob Emery cc7d545985 Merge pull request #610 from syst3mw0rm/master
WeekdayBetween : pretty output
2014-08-30 20:49:53 +01:00
Rob Emery 2f1f6e1b85 DatesRole: Adding support for "jan 1st" "13 march" to vague 2014-08-30 20:48:45 +01:00
Rob Emery ff30de94ff DatesRole: Making vaguestring regex available 2014-08-30 20:06:53 +01:00
Matt Miller 4dc3c8cb14 RandomNumber: add ABSTRACT. 2014-08-30 14:31:50 -04:00
Matt Miller 0f605ded7e Merge pull request #594 from duckduckgo/jag/format
Format CalcRoots, Password, and RandomNumber.
2014-08-30 09:37:32 -04:00
Aamir Khan e0324c377e Merge remote-tracking branch 'upstream/master'
Conflicts:
	lib/DDG/Goodie/WeekdaysBetween.pm
	t/WeekdaysBetween.t
2014-08-29 11:04:05 +05:30
Matt Miller bc7e87be22 ColorCodes: treat "code" as semantic noise.
We want to allow the string "code" to be used in the triggering query,
but we want it to have no effect on how the query is understood
or processed.

Addresses issue #454.
2014-08-28 17:25:19 -04:00
Zaahir Moolla dcc40ca09b Merge pull request #576 from duckduckgo/mintsoft/date_role
Unified Date Handling role
2014-08-28 17:15:38 -04:00
Rob Emery 76e0e7b9fb DaysBetween: Rejecting invalid dates with extra characters and ensuring output is always ordered 2014-08-28 19:01:08 +01:00
Aamir Khan 0f3581342c WeekdayBetween : pretty output 2014-08-26 12:50:05 +05:30
Rob Emery 69f5a1ae69 Merge branch 'mintsoft/date_role' of github.com:duckduckgo/zeroclickinfo-goodies into mintsoft/date_role 2014-08-25 23:51:55 +01:00
Rob Emery e3ca80a9a2 DatesRole: Fixing duplicate matches in timezones; Thanks @elebow! 2014-08-25 23:50:39 +01:00
jagtalon 81c24b7b05 Merge branch 'master' into jag/format
Conflicts:
	lib/DDG/Goodie/Password.pm
	lib/DDG/Goodie/RandomNumber.pm
2014-08-25 20:01:16 +00:00
jagtalon 2c3169c4b6 ValarMorghulis: Format code. 2014-08-25 19:52:25 +00:00
jagtalon 2603e52219 Merge branch 'master' of https://github.com/larseng/zeroclickinfo-goodies into jag/valar 2014-08-25 19:50:03 +00:00
Caine Tighe 949ced7776 Merge pull request #609 from duckduckgo/jag/unixtime
UnixTime: Disable the no argument feature.
2014-08-25 15:13:43 -04:00
jagtalon 80ee10d13a UnixTime: Disable the no argument feature.
Disabling the no argument feature since:
- It triggers with just "time"
- The time shown doesn't follow the person's timezone (which is preferable over UTC)
2014-08-25 19:01:46 +00:00
Jag Talon 2accbe8971 Merge pull request #549 from elebow/gimp-cheat-sheet
Gimp cheat sheet
2014-08-25 10:38:13 -04:00
Jason 6b308aa86d Adding CSS 2014-08-22 13:07:57 -04:00
Jason d41b75d54b Added CSS 2014-08-22 12:38:38 -04:00
exoWM 841a1b117e Added CSS 2014-08-22 16:35:11 +00:00
Matt Miller 184fed9fc5 UnixTime: subsume Epoch.pm functions.
There's no need to have a different Goodie to handle the "no remainder"
query case, so we'll just combine both into this single Goodie.

Also makes the goodie slightly more resilient against bad inputs by
`eval`ing all the way up through the DateTime creation and string
gathering.
2014-08-22 11:37:06 -04:00
Lars Jansøn Engvik c16a193729 Adding CSS. 2014-08-22 08:56:00 +00:00
Jason cbecb4dd68 Added abstract 2014-08-21 17:50:56 -04:00
exoWM d96dc2cb85 Answering the ultimate question to life the universe and everything. 2014-08-21 21:11:55 +00:00
Matt Miller 963118b057 DatesRole: Add ABSTRACT. 2014-08-20 16:34:32 -04:00
Matt Miller 89d34ba766 Switch encode_entities() to html_enc()
This is pretty much a straight one-for-one swap with some minor goodness
in the form of the already wrapped up array handling in one case.

I did not do any refactoring of the code although some places looked
like they could use it.

Addresses issue #591.
2014-08-20 15:52:51 -04:00
Rob Emery 73b808d063 Merge branch 'master' into mintsoft/date_role 2014-08-20 20:44:20 +01:00
Matt Miller 5481cf4ebc Fix minor code layout issues.
Reducing scroll spam from dzil by:

- Providing ABSTRACTs for all packages.
- Leaving VERSION vertical space where necessary.

Addresses #600 plus other annoyances in the process.
2014-08-20 14:45:33 -04:00
Matt Miller 7f14010a46 Merge pull request #574 from duckduckgo/zaahir/fliptext-utf8
simplify FlipText Goodie using Text::UpsideDown
2014-08-20 12:25:22 -04:00
Zaahir Moolla 4c170fa4ec reorder return logic 2014-08-20 15:18:51 +00:00
Lars Jansøn Engvik 1e3f92f14d Fixed capitilization. 2014-08-20 08:04:41 +00:00
Rob Emery d064be2ed1 CalendarToday: more minor layout 2014-08-19 19:44:31 +01:00
Rob Emery 701c2d6c62 Merge branch 'mintsoft/date_role' of github.com:duckduckgo/zeroclickinfo-goodies into mintsoft/date_role
Conflicts:
	lib/DDG/Goodie/CalendarToday.pm
2014-08-19 19:42:54 +01:00
Rob Emery c1da3fc66e CalendarToday: Minor layout stuff 2014-08-19 19:41:17 +01:00
Matt Miller e7a2d170da CalendarToday: niggly formatting stuff.
None of this really matters, but when I looked at my previous diff some
of this stuff annoyed me, so tidying up a bit.
2014-08-19 14:39:28 -04:00
Matt Miller c9937790b3 CalendarToday: deeper refactoring of output.
- Clean up/remove some globals which confused things.
- Simplify logic-flow.
- Remove extraneous </div> from HTML output.
- Expand triggers to short months.

DatesRole:
- Create month_regex() to handle combo of short and full.
2014-08-19 14:27:31 -04:00
jagtalon 169105ac62 Newest v. of Math::Prime::Util renamed all_factors to divisors.
Changing the name should make all the tests pass again.
2014-08-19 17:17:34 +00:00