Commit Graph

4672 Commits (master)

Author SHA1 Message Date
Rob Emery 0cffa6161e POTUS: Triggering is way too keen (#3938)
* POTUS: Adding failing test for overtrigger

* POTUS: the previous || $prez_count meant that it defaulted to the current president if it didn't recognise the number; hence why it was showing so many false positives

* POTUS: Now with stricter handling on the $num we can trust the validation later on to keep us safe from overtriggering

* POTUS: basic queries that really should work!

* POTUS: Switching to using a guard regex to match things rather than using replacements

* POTUS: Guard regex now protects the query space. and "was" is used to imply the previous president (currently obama)

* POTUS: switched to query_lc and implementing both a guard regex and a replacement for the triggers so that the code below behaves as if it is remainder =>, except that this doesn't erroneously replace "president-elect of the us" with ""

* POTUS: We don't need $rem
2017-03-06 23:39:09 -05:00
Shady Tantawy 01b6ecdf05 Escaped dot 2017-03-06 22:10:45 +02:00
Shady Tantawy 9958387136 Update MD5.pm 2017-03-04 15:07:04 +02:00
GPhantom 08efec9e1a Fix #3974
Ignore file extensions.
2017-03-04 14:51:44 +02:00
Zaahir Moolla 5f7329fc67 Calculator: Switch to canonical structured answer (#3916)
* Switch Calculator to canoncial structured answer

* Add Goodie Template
2017-02-06 16:06:33 -05:00
Brett Stime a0d967d13c Increases threshold before exponent notation
My particular concern is:
  When I query: "bytes in 1 mib"
  I want a precise response: "1,048,576 bytes"
  ...instead of "1.05 * 10^6 bytes"

Beyond that, generally, I believe that most people who can cognitively handle numbers up to 1MM can also handle any number with a seven digit integer-part/characteristic (http://math.stackexchange.com/a/64045/92444). Ideally, the decision should be made based on the number of characters in the significand (https://en.wikipedia.org/wiki/Significand) but that's beyond what I have time for at the moment (especially given how rusty my perl is) ;) .
2017-02-02 09:47:43 -06:00
Zaahir Moolla 0ad6eba28a Calculator: Prevent anything but allowed ops in the query (#3903)
* prevent anything but allowed ops in the query
no negative nums

* Uncomment neg catch and move after garbage is removed

* Add more tests

* The hex check can be simplified since the trigger isn't allowing most of it
Allow expressions like 1e9 to pass

* Allow = in query
decimal/negatives with e

* Remove debug

* add test for 1e9 query
2017-01-30 17:46:21 -05:00
Zaahir Moolla 3309758c1d Calculator: More fixes -- Trigger regex contained a bug (#3898)
* Restrict some other stuff

* Don't require digit

* Restrict multiple ops to two or less

* reject empty parens/multiple ops

* No @, or $ not followed by a number or .

* combine char class

* add more negative tests

* Add ops back, case-insensitive subs, require two ops again

* Case-insensitive on multiple ops too

* Allow leading negatives

* Move the leading neg sub

* Better regex for hex input

* update tests
2017-01-28 14:07:00 -05:00
Zaahir Moolla 9322e7b34c Calculator: Improve triggering and execution (#3894)
* Update trigger
Use Safe for evaluation with the minimum functions
Removed unnecessary capturing, redundant function calls

* Add some tests

* Remove eval since we don't allow die
Add comment about debugging failed reval

* Add rv2gv from :base_orig to allow compat with Safe 2.35
Remove prtf since that was in :base_orig which was removed

* Remove unneeded opsets

* Silence all of reval's warnings

* Add STRICT
2017-01-26 10:45:49 -05:00
Rob Emery d05d64dfe7 Conversions: Adding support for n'm" format (#3891)
* Conversions: Failing test for n'm" format

* Conversions: Adding a totally specific workaround for 3 feet 5 inches or 6'1" queries

* Conversions: Accuracy correct relative to output

* Conversions: Improving test coverage around whitespace

* Conversions: Removing duplication

* Conversions: Handling foot and inch

* Conversions: Adding tests for feet and inches into another unit and failing test for the UK common "n foot m", commonly used for height

* Conversions: Implemeting the UK common 6 foot 1 query support
2017-01-26 09:42:27 -05:00
Gautam krishna.R ac73384d0c Merge pull request #3869 from duckduckgo/mattr/chronometer
Stopwatch: add "chronometer" trigger
2017-01-26 19:22:25 +05:30
Zaahir Moolla a8d92e3cb5 Revert "ignore reval's warnings" (#3893) 2017-01-25 18:19:31 -05:00
Zach Thompson 369c894439 ignore reval's warnings (#3892)
* Update trigger
Use Safe for evaluation with the minimum functions
Removed unnecessary capturing, redundant function calls

* Add some tests

* Remove eval since we don't allow die
Add comment about debugging failed reval

* Add rv2gv from :base_orig to allow compat with Safe 2.35
Remove prtf since that was in :base_orig which was removed

* Remove unneeded opsets

* Silence all of reval's warnings
2017-01-25 17:35:25 -05:00
Zaahir Moolla 840cdc99a1 Revert "calculator: trigger/safe" (#3890) 2017-01-25 15:00:10 -05:00
Zach Thompson 2113d41a79 calculator: trigger/safe (#3878)
* Update trigger
Use Safe for evaluation with the minimum functions
Removed unnecessary capturing, redundant function calls

* Add some tests

* Remove eval since we don't allow die
Add comment about debugging failed reval

* Add rv2gv from :base_orig to allow compat with Safe 2.35
Remove prtf since that was in :base_orig which was removed

* Remove unneeded opsets
2017-01-24 15:00:37 -05:00
Nalin Bhardwaj 3f2c68cece Remove alarm from Calculator and PrimeFactors (#3881)
* Removed alarm from calculator

* Removed alarm from PrimeFactors
2017-01-24 13:00:19 +00:00
Rob c2392f005d Conversions: Ensuring support for "degrees centigrade" 2017-01-22 18:28:43 +00:00
Matthew Ramina edfa892e18 Stopwatch: add chronometer (fixes #3843) 2017-01-20 15:49:36 -05:00
Zaahir Moolla 06196e98b5 Revert "Calculator: Dumb down the trigger" (#3868) 2017-01-20 15:49:16 -05:00
Zach Thompson 8e5d7b46e8 Calculator: Dumb down the trigger (#3866)
* Dumb down the calculator regex

* No interpolation

* Add tests to ensure changes work
2017-01-18 13:23:49 -05:00
Mariano Simone 13d752a294 Use structured_answer for GoldenRatio
This addresses part of #1163
2017-01-02 20:28:53 +00:00
Gautam krishna.R bcda8cf430 Merge pull request #3809 from jarmokivekas/patch-1
GUID: add trigger word
2016-12-25 02:14:49 +05:30
Zaahir Moolla dbb9214312 ensure we handle upper case queries properly 2016-12-21 14:48:49 -05:00
Zaahir Moolla 6f0b4d9ac7 Use _event_ placeholder in answer as well 2016-12-21 14:48:21 -05:00
Zaahir Moolla e1681517ad add back article; Use placeholder to genereate triggers with and without article 2016-12-21 14:27:22 -05:00
Zaahir Moolla ac669718b0 rephrase question as answer in subtitle 2016-12-21 13:57:46 -05:00
Zaahir Moolla b56b68923f refactor to improve flexibility; more declarative yaml 2016-12-20 15:09:06 -05:00
Zaahir Moolla 2a049d11fc use more at url to send user to Wikipedia 2016-12-20 13:51:45 -05:00
Zaahir Moolla 26709bf4ad Create new HistoricalEvents Goodie 2016-12-20 13:35:27 -05:00
Manraj Singh 190fd4444c CSS Animations Goodie (#3424)
* Base created

* YML File Updated

* Codepen logo added

* Logo renamed | urls added

* Initial version added

* Removes unwanted CSS

* Remove codepen logo

* Removes cssanimations.js

* Restructuring things

* Fixes bareword test file issue

* Test File fixed

* CSS Tricks Demos added

* Changes to tile and data

* Title added and styled

* Adds 2 demos to Goodie

* Fixes margin between title and demo

* Modularizing demos

* CSS Animations: Makes code more modular

* Data YML updated

* Fixes no file exist issue

* Minor changes in test file

* Fix: Reduces width of tile, fixes animation overflows

* Feature: CodePen AutoPen Generation added

* Fix: Test File fixed

* Add: Proportional Animations

* Add: Changing transform-origin mid-animation

* Add: Negative transform-origins

* Add: Box shadow magic

* Fix: Fix conflict in CSS

* Update: Removes unnecessary keys

* Fix: Warnings and errors for https

* Fix: Fixes text in demo 1

* Formats: Formats all CSS Stylesheets

* Fix: Handles unnecessary triggering

* Fix: Handles if variables are undefined

* Adds: Adds more test cases

* Fix: Moves logic to a separate sub routine

* Fix: Removes external resource usage
2016-12-15 15:09:55 -05:00
Jarmo Kivekas d114359839 GUID goodie: add trigger word
I typed "GUID generator" into ddg in when I was looking to trigger this goodie. This change would make that trigger this Goodie.
2016-12-11 08:02:21 +02:00
Rob Emery c25c8573e8 ColorPicker: Fixing over eager triggering (#3789)
* ColorPicker: Adding tests for queries that should not return

* ColorPicker: If there is a string after the triggering it needs to be a valid colour name
2016-12-01 01:08:11 -05:00
mhasbini a17becb858 fix invalid email format 2016-11-14 17:22:03 +02:00
Akansh Gulati e9c9456f98 New SASS to CSS IA (#3635)
* Added the SasstoCSS library

* Started with IA

* updated the goodie var

* Updated the classes to handlebar

* Updated the URL

* Updated the test file

* Updated the cdn of sass library

* Updates on format of IA

* fix(sass_to_css): Updated the url of the library.

* fix(triggers): Updated the tests and pm file.

* fix: Updated the file to remove ID param.

* fix(sass.js): Updated the code for synchronous sass compile.

* fix(sass_to_css.js): Load library when data is actually entered.

* fix(layout): Updated the layout of buttons.
2016-10-26 13:25:45 -04:00
Akansh Gulati 9ce00a9e8e New JS Beautifier Goodie (#3640)
* Js Beautifier

* fix(js_beautifier.js): Updated the library URL to internal.

* fix(triggers): Added more triggers.

* fix(triggers): Added a few more triggers and tests.
2016-10-21 10:24:15 -04:00
Akansh Gulati c95afc52f7 New Html beautifier Goodie (#3658)
* Template Created

* Added the HTML beautifier files

* Updated the code

* Renamed the files

* Added more triggers and updated test file

* fix(html-beautify): Updated the url of library.

* fix(html_beautify): Added global scope to method.
2016-10-21 10:18:11 -04:00
apandey 026d3820dc fixed changes 2016-10-11 16:00:20 +00:00
Sahil Dua 1900b15c9d JSONValidator: Improve title/subtitle to clarify usage (#3648)
* JSONValidator: Improve title/subtitle to clarify usage
Fixes #3643

* JSONValidator: Change title/subtitle in corresponding tests
2016-10-07 09:23:47 -04:00
Eric Johnson 53e848c143 Make this work with DateTimev1.39 (#3633) 2016-09-27 11:22:56 -04:00
Ben Moon 56d6868480 RgbColor: Add support for color titles (#3574)
* Add color titles to output

* Add titles for color in front-end (hover)

Hovering over the circle gives the color 'title', and hovering over a
hex value gives the color 'name' (more suitable for HTML and similar).
2016-09-26 12:38:31 -04:00
Rob Emery a3c9cc3745 Merge pull request #3140 from duckduckgo/gd/new-lists-role
New List GoodieRole
2016-09-15 21:55:52 +01:00
Gautam krishna.R 4f361abae7 HTMLEntitiesEncode: Remove remaining html_enc (#3608)
Fixes #3607

* Update HTMLEntitiesEncode.pm

* i think this fixes it

* Update HTMLEntitiesEncode.pm

* Update HTMLEntitiesEncode.pm
2016-09-10 13:27:45 +01:00
Rasika Pohankar 51dafeaa31 Remove periods from titles, subtitles and plaintext responses (#3569)
* Remove periods from titles, subtitles and plaintext responses

* Update test files

* Remove concatenation

* Remove repeated tests from Cusip test file
2016-09-06 11:15:19 +01:00
Gautam krishna.R 85dfac253e Remove html_enc from HTMLEntitiesEncode (#3601) 2016-09-05 11:09:06 +01:00
Gautam krishna.R a3fecac876 Remove html_enc from Regexp (#3600) 2016-09-05 11:01:47 +01:00
Gautam krishna.R 94b217af1a Remove html_enc() from RandomDate.pm (#3599)
* removed all html_enc()

* fixed some tests still 2 failing

* Update RandomDate.pm
2016-09-05 10:40:02 +01:00
Gautam krishna.R 4d3cfd4001 Remove use of `html_enc` in Sha3 (#3578)
* Update SHA3.pm

* Update SHA3.t

* Update SHA3.t

* Update SHA3.t

* Update SHA3.t

* making tests pass
2016-09-04 16:43:40 +01:00
Harrison Chienjo b90188cfd7 Remove repeated \s* in character set. (#3596) 2016-09-04 11:59:44 +01:00
Ben Moon 3d6acf28b4 Merge pull request #3593 from hchienjo/add_triggers
Roman Numerals: Add more trigger words.
2016-09-03 15:44:06 +01:00
Jasmeet Singh Saini f79cef4cf4 Remove use of 'html_enc' (#3567)
* removed html_enc from ABC,ANAGRAM,AVERAGE,BASE64,BITSUM,CHARS

* string interpolation fixed

* string interpolation fix
2016-09-03 15:36:12 +01:00
hchienjo 42d1b11791 Make '10 to roman numerals' and 'D to arabic' trigger. 2016-09-03 13:19:15 +00:00
Manraj Singh 1b73ba6955 Remove use of `html_enc` (#3568)
* Few IAs updated

* Few more IAs updated

* Fixes string interpolation

* Fixes more string interpolation

* Fixes minor issue
2016-09-02 09:52:59 +01:00
Sahil Dua f13d396b5d Remove use of html_enc (#3571)
* Rot13: Remove HTML Encoding from output text

* Scramble: Remove HTML Encoding from output text

* Remove html encoding from TimezoneConverter and TitleCase IAs

* RIPEMD: Remove HTML encoding from output text

* Regexp: Remove HTML encoding

* Remove html_enc from NameDays and MD5 IAs

* Remove html_enc from MD4 and IDN

* FIGlet: Remove html enc

* Remove html enc from CaesarCipher and Braille

* Atbash: Remove html_enc from output text

* MD4: Simplify string concatenation in perl way

* NameDays: Simplify string concatenation the perl way

* NameDays: Refactor string concatenation
2016-08-31 19:58:57 +01:00
Zaahir Moolla 0982dc5e64 Merge pull request #3566 from sahildua2305/html-encoding-remove
Remove HTML encoding from multiple goodies
2016-08-24 18:35:26 -04:00
sdua 433a989c74 URLDecode: Remove HTML encoding from output text 2016-08-24 19:32:36 +00:00
sdua 3c8e910e54 URLEncode: Remove HTML Encoding of output text 2016-08-24 19:29:20 +00:00
sdua 3fc6dec7fc CSSColors: Remove redundant lc function call 2016-08-24 19:12:20 +00:00
sdua 4d3c77280a CSSColors: Improve handle to avoid over-triggering 2016-08-24 19:10:29 +00:00
Zaahir Moolla d6d3593dac Remove HTML Encoding of output text 2016-08-24 12:29:28 -04:00
Zaahir Moolla 6b4223a991 Merge pull request #3346 from duckduckgo/gd/rgb-color-new-ia
New RGBColor Instant Answer
2016-08-23 10:10:20 -04:00
Daniel Davis 91ef24236a Merge pull request #3533 from hchienjo/enhancing_roman_goodie
Improve triggering of Roman Numerals
2016-08-19 10:47:41 +09:00
Daniel Davis 3ff75f651c Merge pull request #3492 from shubh1m/feature-days_since
DaysBetween: Add 'Days since' feature
2016-08-17 17:07:17 +09:00
hchienjo 0dbffa089d Improve regex substitution.
Proposed fix for issue https://github.com/duckduckgo/zeroclickinfo-goodies/issues/3484
2016-08-15 10:26:19 +00:00
Rob Emery f8878c8237 Merge pull request #3511 from duckduckgo/jag/conversions-base
Conversions.pm: Switch group from 'text' to 'base'.
2016-08-14 21:58:53 +01:00
Ben Moon 6e31737cdd Add support for three-digit hex codes 2016-08-13 11:08:02 +01:00
Zaahir Moolla 53be50050d Merge pull request #3400 from sahildua2305/colors-goodie-new
New CSS Colors Goodie
2016-08-11 13:25:50 -04:00
sdua 10e134d981 CssColors: Perl code cleanup 2016-08-09 19:48:27 +00:00
sdua d8071f0460 CssColors: Clean up perl code 2016-08-09 19:46:10 +00:00
Zaahir Moolla aa595401d7 Merge pull request #3518 from duckduckgo/pr/3367
Continue PR #3367
2016-08-09 14:17:35 -04:00
jagtalon 1237b0eae2 Conversions.pm: Switch group from 'text' to 'base'.
Whenever we're adding a custom template, we always have to use the `base` template because it looks wonky when we use anything else.
2016-08-08 18:37:39 +00:00
Ben Moon d17319fdf2 Remove trailing space from subtitle prefixes 2016-08-06 18:19:58 +01:00
Zaahir Moolla f5a020b470 Merge pull request #3425 from duckduckgo/zaahir/js-minify-improvements
JS Minify Visual Improvements
2016-08-06 11:31:52 -04:00
tagawa 938789db51 Fixed typo 2016-08-04 05:29:10 +00:00
tagawa fbe40ef691 Edited code to pass tests 2016-08-04 05:27:37 +00:00
iamshubh22 48a7feba0b DaysBetween: Add 'Days since' feature 2016-08-04 03:24:31 +05:30
Daniel Davis 76837bcce0 Merge pull request #3218 from tagawa/tagawa/sha3
SHA-3: Added 'sha-3' trigger
2016-08-02 23:04:06 +09:00
Daniel Davis 3f027ec923 Merge pull request #3467 from shadabk/shadabk/dice-improved
Shadabk/dice improved
2016-08-02 10:25:34 +09:00
skhan4 7b660e0d3f Solves issue #3437 2016-08-01 17:25:13 +00:00
skhan4 8d66247b5d dice improved test-2 2016-07-31 10:52:32 +00:00
skhan4 2ec8928355 modified dice.pm test-1 2016-07-31 10:26:33 +00:00
sdua 021eac6715 Update subtitle to include mention of prettyprint feature 2016-07-30 16:58:00 +00:00
Maria Grazia Alastra 33f622f8c1 Merge pull request #3432 from sahildua2305/json-validator-new
New JSON Validator
2016-07-28 23:18:19 +02:00
Daniel Davis 51b64c295e Merge pull request #3409 from duckduckgo/gd/random-date-past-future
RandomDate: Add support for ranges
2016-07-28 17:35:07 +09:00
lowellosaurus 06563194b6 Add data for the Indian Armed Forces (#3444) 2016-07-27 21:02:23 +01:00
Daniel Davis a78468f3e7 Merge pull request #3368 from rasikapohankar/cron
CrontabCheatSheet: Remove Goodie
2016-07-27 00:18:38 +09:00
Zac Pappis 7ca0a066e8 Merge pull request #3243 from sahildua2305/frequency-improve
Frequency: Update IA to use List template
2016-07-25 09:18:55 -04:00
sdua 8c92d92123 JSONValidator: Improve Triggering 2016-07-24 19:30:44 +00:00
sdua f2f54f0e59 JSONValidator: Update subtitle section 2016-07-24 19:19:36 +00:00
sdua 44aa73ae73 JSONValidator: Add basic template and load library 2016-07-24 18:25:07 +00:00
Ben Moon eb7e4a5813 Ensure trailing punctuation is ignored 2016-07-23 19:14:10 +01:00
msingh2 6138d325c7 Fixes Color Picker Name 2016-07-22 19:53:58 +00:00
sdua 3c4ad30c4d JSONValidator: Init v1 2016-07-21 21:31:53 +00:00
sdua 6e4d73b847 JSONValidator: Init 2016-07-21 20:47:14 +00:00
Zaahir Moolla f2a0fe934f Merge pull request #3284 from 122131/minecraft-crafting-update
Minecraft: recipe update & other enhancements
2016-07-21 12:20:04 -04:00
Olivia Haas 92e476b216 Merge pull request #3398 from duckduckgo/mintsoft/parcelforce-eager-trigger
Parcelforce: Triggering on luhn!
2016-07-21 11:19:56 -04:00
Olivia Haas 59c235876d Merge pull request #3397 from duckduckgo/mintsoft/url_decode
URLDecode: Fixing case sensitive triggers
2016-07-21 11:03:47 -04:00
Zaahir Moolla 1a8c0f040e Adjust subtitle, and textarea height for mobile 2016-07-21 09:57:25 -04:00
Zaahir Moolla 7df2aab5ad Improve button sizing and position, add placeholder text 2016-07-21 09:53:36 -04:00
Zaahir Moolla 3e7bcfc8b5 Merge pull request #3417 from sahildua2305/refactor-js-minify
JsMinify: Code Refactor and Design Adjustments [WIP]
2016-07-21 08:17:36 -04:00
Daniel Davis d6fac752ed Merge pull request #3399 from regagain/luhn
Luhn Algorithm: Reduce subtitle redundancy
2016-07-21 11:40:32 +09:00
regagain 02eb439684 Removed full stop 2016-07-20 17:53:27 +00:00
1122131 d0b4896ba0 fix uninitialized value error 2016-07-20 16:11:20 +00:00
Ben Moon 8347689276 Ensure start and end dates are different 2016-07-20 10:49:29 +01:00
1122131 8273204564 better comments 2016-07-20 09:46:21 +00:00
msingh2 cb6b7494f0 Try removing ID and Name to see if it works 2016-07-20 06:58:41 +00:00
msingh2 443f6e364a Removes redundencies 2016-07-20 06:19:18 +00:00
sdua 7d364d281e JsMinify: Add title and subtitle in data 2016-07-19 22:10:36 +00:00
sdua 4501a52b22 JsMinify: Improve triggering, focus more on relevant keywords 2016-07-19 22:03:17 +00:00
sdua 17ac3d7fbe JsMinify: Improve triggering 2016-07-19 21:55:57 +00:00
regagain 6ea2ef3939 fixing title not being displayed if result is 0 2016-07-19 19:06:02 +00:00
1122131 64e5f98148 using yes instead of 1 and localImage instead of localPath 2016-07-19 18:41:26 +00:00
1122131 2201928543 minor fixes 2016-07-19 18:10:28 +00:00
1122131 7b509eaed1 second test file fix 2016-07-19 18:06:27 +00:00
1122131 c0c0a2432d fix image paths 2016-07-19 17:42:07 +00:00
Maria Grazia Alastra 479814bd70 Merge pull request #3352 from sahildua2305/js-minifier
Add new JSMinify Instant Answer
2016-07-19 19:24:52 +02:00
Ben Moon 1899241a19 Remove unused range global 2016-07-19 16:06:49 +01:00
Ben Moon 4fcf5dfed5 Add support for ranges with 'Date and Time' 2016-07-19 16:06:28 +01:00
Ben Moon c35ab307dc Add support for additional past/future forms 2016-07-19 15:41:43 +01:00
Ben Moon 2bc696b50c Improve random range calculation
Ensure epoch is correctly generated for ranges.
2016-07-19 15:12:38 +01:00
Ben Moon 67e7af47c7 Ensure unsupported ranges do not trigger 2016-07-19 14:25:58 +01:00
Ben Moon 6520e91a28 Ensure min and max dates are valid 2016-07-19 14:21:27 +01:00
Ben Moon 6460f1b727 Add support for 'between' forms 2016-07-19 14:17:27 +01:00
Ben Moon 1fc7aeaa71 Add support for 'in the past' forms 2016-07-19 14:04:51 +01:00
Ben Moon 0231273a59 Add support for 'in the past' forms for Date 2016-07-19 13:55:57 +01:00
Ben Moon ed462d4183 Ensure keys aren't calculated on each query
For %standard_queries
2016-07-19 12:29:31 +01:00
Ben Moon acae09e396 Add helper for building subtitle 2016-07-19 12:23:59 +01:00
Daniel Davis 94b5339447 Merge pull request #3313 from tagawa/tagawa/macaddress
Refer MAC address and Generate MAC to each other
2016-07-19 20:08:21 +09:00
sdua cd515c31a0 CssColors: Make title and subtitle flexible according to query 2016-07-18 21:37:21 +00:00
sdua 9f71436969 CssColors: Move triggers into a text file 2016-07-18 21:33:37 +00:00
sdua 5b71f85ceb CssColors: Uppercase for color codes 2016-07-18 21:17:36 +00:00
sdua 5608fc1347 CssColors: Fixed minor issues 2016-07-18 21:13:33 +00:00
sdua 6e9afed20f CssColors: Improve triggering and update tests 2016-07-16 22:54:39 +00:00
sdua cd755fc96a CssColors: Add subtitle 2016-07-16 22:45:41 +00:00
sdua e5c28900de CssColors: Rename share folder 2016-07-16 22:19:04 +00:00
sdua c325c267e7 CssColors: Extract colors list from Color::Library 2016-07-16 22:12:40 +00:00
sdua 6c898bc505 CssColors: change ID to csscolors from css_colors 2016-07-16 21:45:29 +00:00
sdua b0fcfd1b3a CssColors: Init 2016-07-16 21:36:26 +00:00
regagain 0be2c62c25 reduce subtitle redundancy 2016-07-16 09:35:51 +00:00
msingh2 1f1900c6c8 Removes unwanted files 2016-07-16 09:19:40 +00:00
Rob 0889660e87 Parcelforce: Due to the whitespace removal it's difficult to tell between a 4 a-z character starting parcelforce code and a luhn question (same problem as isbn) 2016-07-15 21:58:30 +01:00
Rob 390f472181 URLDecode: When perl builds a re from other re's it respects the case-insensitivity of the source re' so the /i on the matches were actually case sensitive as the definition of $trigger_words was 2016-07-15 21:38:49 +01:00
Daniel Davis f8741e1292 Merge pull request #2973 from regagain/luhn
New Luhn instant answer
2016-07-14 23:24:45 +09:00
1122131 78cf74abb9 fixed test file 2016-07-12 15:26:04 +00:00
msingh2 31f4294ef5 Code clean up 2016-07-12 15:22:49 +00:00
msingh2 e7afd90c16 Color Library SVG added 2016-07-12 15:21:44 +00:00
1122131 557fb3fcf0 fix regex and make source url different for every recipe 2016-07-12 12:38:52 +00:00
sdua 41163fc355 JsMinify: Remove name from display options 2016-07-11 20:35:28 +00:00
regagain aac2f5d8e1 Update Luhn.pm
Removed comments
2016-07-11 20:51:40 +02:00
Rob Emery 238766bb1d ChordDiagrams: Was throwing various errors during the test suite; all of which were real errors (#3216) 2016-07-11 17:34:09 +01:00
rpohankar 1aa211f677 Remove CrontabCheatSheet Goodie files. 2016-07-11 14:20:48 +00:00
Ben Moon 594eebf78b Ensure no name collisions for supported parens 2016-07-11 11:27:38 +01:00
Ben Moon f56fd2c511 Add POD documentation 2016-07-11 11:04:00 +01:00
Ben Moon 6427597df5 Improve readability for nested list parsing 2016-07-11 11:04:00 +01:00
Ben Moon 1767f08449 Ensure only intended routines are exported 2016-07-11 11:04:00 +01:00
Ben Moon 69083246ed Add 'join_last' option 2016-07-11 11:04:00 +01:00
Ben Moon 4a6c23f048 Add 'join' option for formatting 2016-07-11 11:04:00 +01:00
Ben Moon d61bb26fa1 Add support for varying nested parentheses format
So `parens => '({})'` would format as '(1, {2, 3}, 4)'.
2016-07-11 11:03:59 +01:00
Ben Moon c24ecdf3d8 Improve support for 'empty' parentheses
When the user uses "parens => ''" in format_list.
2016-07-11 11:03:59 +01:00
Ben Moon e3cd02900c Add 'parens' option to 'format_list'
Allow specifying which parentheses should be used when formatting.
2016-07-11 11:03:59 +01:00
Ben Moon 0e0fcbc3af Default 'nested' to false if 'item' is provided
Generally, if an item regex is provided we won't be working with a
nested list, so turn nesting off.

Also improve validation for nested items.
2016-07-11 11:03:59 +01:00
Ben Moon e0017279ef Add support for parsing nested lists 2016-07-11 11:03:59 +01:00
Ben Moon ed472f5f7f Remove unused routines
We won't support ranges (for now); just basic parsing and formatting.
2016-07-11 11:03:59 +01:00
Ben Moon b05fff92a7 Add support for basic formatting
Currently only formatting as a standard ARRAY is supported. TODO:
support separators/brackets (and perhaps detected from previous
parsing).
2016-07-11 11:03:58 +01:00
Ben Moon 82c0840185 Allow specifying a regex each item must match
For example `parse_list($text, item => qr/\d+/)` would only allow
digits.
2016-07-11 11:03:58 +01:00
Ben Moon 11b2ec875f Add test for empty string (invalid) 2016-07-11 11:03:58 +01:00
Ben Moon 408c76f2a2 Allow lists without brackets 2016-07-11 11:03:58 +01:00
Ben Moon 7874e86491 Add test for number of items
Corrected regex to allow for empty list
2016-07-11 11:03:58 +01:00
Ben Moon 45e8bd8200 Add test for varying brackets
Also, return an ARRAY reference instead of a list (at least for now);
not sure which will make more sense in the future (probably just a
list).

/cc @mintsoft
2016-07-11 11:03:58 +01:00
Ben Moon 8556e46930 Add 'initialization' test 2016-07-11 11:03:57 +01:00
Ben Moon c5ab76983e Import main functionality from Shuffle 2016-07-11 11:03:57 +01:00
regagain b929494736 Moved definition outside of handle so it is only defined once 2016-07-09 16:02:24 +00:00
regagain b32094327b Use 4 spaces instead of 2 2016-07-09 15:55:51 +00:00
msingh2 da699a0531 Makes code more maintainable 2016-07-09 13:16:56 +00:00
msingh2 ff79a49c25 Cleans up code a little 2016-07-09 13:11:35 +00:00
msingh2 f75da6d739 Fixes Goodie name for Beta 2016-07-08 21:42:03 +00:00
msingh2 f498934cfb Color names working 2016-07-08 20:51:02 +00:00
msingh2 713426c94b colors.yml lowecased 2016-07-08 20:47:52 +00:00
msingh2 c3ec2c6b88 Colors.yml fixed 2016-07-08 20:20:07 +00:00
msingh2 6fc8fecfcb Fixes function error 2016-07-08 20:01:31 +00:00
msingh2 7df832f867 Colors YAML added 2016-07-08 19:48:51 +00:00
msingh2 6b9ea6c1e2 Regex for colors added 2016-07-08 18:05:51 +00:00
msingh2 50acbe7294 Code working for particular format 2016-07-08 17:17:19 +00:00
msingh2 3446741c56 Fetches color 2016-07-08 14:54:56 +00:00
rpohankar 5bf75e7c15 Modify perl file to use template, remove html file, update css class name with id. 2016-07-08 14:26:39 +00:00
msingh2 96c7c20ab1 Initial code ported 2016-07-08 13:13:08 +00:00
Ben Moon 772e6c8542 Update tests and fix logic for new front-end 2016-07-08 10:29:38 +01:00
Ben Moon 7ef7792978 Add display similar to ColorCodes
Use (mostly) the same CSS and Handlebars with a few adaptations - needs
a bit of work.
2016-07-07 21:13:54 +01:00
1122131 bc696287c7 trigger fix and various comments 2016-07-07 17:46:28 +00:00
Ben Moon 80f4c32c14 Add support for basic '+' forms
E.g., `blue + black =`.

Currently does NOT support '+' on its own, e.g., `blue + black`.
2016-07-07 14:06:13 +01:00
Ben Moon ec56c99756 Improve support for multi-word colors
Ensure the user can type 'x-y', 'x y' or 'xy' to match a color.
2016-07-07 13:44:44 +01:00
Daniel Davis 7bc3c9bc3f Merge pull request #3303 from eflyjason/pinyin
New Chinese to Pinyin Goodies
2016-07-07 17:59:52 +09:00
sdua 80d837cd65 Frequency: Reverting last two commits 2016-07-06 20:04:48 +00:00
sdua 801a8ecf10 Frequency: Change Regex to not allow non-unicode chars 2016-07-06 13:02:36 +00:00
Ben Moon 46ca72219a Add support for infix mix/tint queries
And vastly improve execution and regexp compilation time.

1. Add some early-bail shortcuts so we don't need to check massive
regexes each time.

2. Reduce some duplication of regexes and matching.

3. Improve regexes.
2016-07-06 13:55:07 +01:00
sdua 73ccd35d35 JsMinify: Change name to Minifier 2016-07-06 12:49:48 +00:00
Ben Moon 04614f1f30 Add support for tinting colors 2016-07-06 12:49:41 +01:00
sdua 87b9b2e610 JsMinify: Add more trigger words 2016-07-06 11:36:19 +00:00
Ben Moon cf6fd709c0 Add support for percentages in mixing
E.g., `mix 50% blue with 50% black`.
2016-07-06 12:10:46 +01:00
Ben Moon 3983157ac3 Ensure (mix) amounts are normalized for template
Instead of passing 'parts' or 'percent' etc., just pass a decimal that
we can do with what we will in the 'front' end.
2016-07-06 11:52:51 +01:00
Ben Moon 315e887785 Ensure $color_re is a compiled regex
Fairly decent speed increase from this.
2016-07-06 11:40:54 +01:00