Add NLP, scheduler, generator, and describer modules
Some checks failed
CI / test (push) Failing after 9s

This commit is contained in:
2026-02-01 15:08:39 +00:00
parent 14cff59527
commit bd87ed053a

View File

@@ -0,0 +1,23 @@
"""Cron expression description module using cron-descriptor."""
from typing import Optional
from cron_descriptor import Options, DescriptionTypeEnum
def describe_cron(expression: str, use_24h: bool = False) -> str:
"""Describe a cron expression in human-readable language.
Args:
expression: The cron expression.
use_24h: Whether to use 24-hour time format.
Returns:
Human-readable description of the cron expression.
"""
options = Options()
options.use_24hour_time_format = use_24h
options.description_type = DescriptionTypeEnum.FULL
from cron_descriptor import get_description
description = get_description(expression, options)
return description