ice_cube icon indicating copy to clipboard operation
ice_cube copied to clipboard

Chronic like input for Ice Cube

Open dylanz opened this issue 10 years ago • 2 comments

I'm not sure if something like this exists or not, but I was wondering if there was any parser out there that took natural language and pushed it into an IceCube format.

Example: "daily" schedule.add_recurrence_rule Rule.daily

Example: "everytuesday" schedule.add_recurrence_rule Rule.weekly(1).day(:tuesday)

Example: "3pm" ... etc

Does something like this exist yet?

dylanz avatar May 19 '14 22:05 dylanz

It doesn't generate IceCube objects, but tickle leverages chronic to do recurrence parsing. You might be able to use some of its code to do what you want to do.

dnrce avatar May 23 '14 16:05 dnrce

We should absolutely reference Tickle instead of reinventing the wheel. Thanks for the link @zoombody.

It looks like it would be relatively simple to add your own IceCube::LanguageParser based on Tickle. It wouldn't cover all the possible cases, but it would still be useful. I wonder if it's worth adding it as a dependency to IceCube.

Please do investigate.

avit avatar May 24 '14 17:05 avit