insberr / schedule-script

data config type for schedules idk what to call it

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

schedule-script

"Schedule script is a simple script to schedule a script to run at a specific time." -GitHub CoPilot

Schedule Script is a scripting language developed for Schedule Personalizer. It was created because why the heck not and also because I did not want to write the config in JSON or TypeScript. Something custom would make some things way easier to work with.

That aside. HFGL.

example react thingy

please improve

export function useSchedule(input: string, date: Date, extra: any) {
    const parsed: SCS = useMemo(() => {
        return new SCS(input)
    }. [input])

    const sch = useMemo(() => {
        return parsed.scheduleFor(date, extra)
    }, [parsed,date,extra])

    const raw = useMemo(() => {
        return parsed.exec({ displayDate: date, ...extra })
    }, [parsed,date,extra])
    return {sch, raw /* we should pull things out of the raw, like lunch info and config, not just returning it as is */}
}

About

data config type for schedules idk what to call it

License:MIT License


Languages

Language:TypeScript 94.8%Language:JavaScript 3.4%Language:PEG.js 1.7%Language:Shell 0.1%