ice_cube
ice_cube copied to clipboard
Chronic like input for Ice Cube
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?
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.
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.