Add a Cron Expression Explainer tool
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 58/100
- Issue 类型
- 功能
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- nextjs, tailwindcss, typescript
调研方向
Read lib/tools.ts and its Tool interface, then inspect the complete example in app/(tools)/base64/ and the Add a tool section of the README. Implement the pure cron logic in lib/cron.ts with tests in lib/__tests__/cron.test.ts, then add the registry entry and route, client, and Open Graph image. Done means the listed acceptance tests, scoped UI, checklist, and lint, test, and build commands all pass.
由索引模型根据 Issue 内容生成。
描述
Paste a crontab line and get a plain-English description plus the next run times. It's useful any time you touch CI schedules, Kubernetes CronJobs or GitHub Actions.
Route: /cron-explainer
Suggested registry values: title Cron Expression Explainer, tagline Scheduling, heroHeading Cron Expression Explainer with heroDim "", features ["Plain English", "Next runs", "Ranges and steps", "Macros", "UTC or local"].
Core logic in lib/cron.ts (no new dependency, please)
parseCron(expr)for standard 5-field cron (minute, hour, day of month, month, day of week) with*, lists, ranges, steps (*/15,1-10/2), names (JAN,MON) and macros (@hourly,@daily,@weekly,@monthly,@yearly). Errors name the field that failed.describeCron(parsed)returning an English sentencenextRuns(parsed, from: Date, count, { utc })returningDate[]. Follow the classic rule that when both day of month and day of week are restricted, a time matches if either one matches. Cap the search horizon so an impossible schedule like0 0 31 2 *returns an empty list with a message instead of looping.
v1 scope: the input, the description, a field-by-field breakdown table, the next 5 runs with a UTC / local toggle, and a few preset chips.
Out of scope for v1: seconds and year fields (Quartz style), Jenkins H syntax, a timezone picker.
Where to look
lib/tools.ts(the registry and theToolinterface)app/(tools)/base64/(a complete tool to copy the structure from)- The "Add a tool" section of the README
Acceptance criteria
- Tests:
*/15 * * * *is described as every 15 minutes,0 9 * * 1-5as weekdays at 09:00,nextRunsfrom a fixed UTC date, the day-of-month or day-of-week rule (0 0 1 * 1),0 0 31 2 *returns no runs, and60 * * * *errors and mentions the minute field - UI as scoped above
- The standard new-tool checklist below is complete
Standard new-tool checklist
Everything (home grid, metadata, JSON-LD, OG image, sitemap, manifest, command palette) is driven by the registry in lib/tools.ts, so a new tool is mostly one registry entry plus a route.
- Add an entry to
TOOLSinlib/tools.tsfilling every field of theToolinterface (lib/tools.ts:19-52). UseapplicationCategory: "DeveloperApplication", reuse theCTA_PROJECTS/CTA_CONTACTconstants for the CTA links, and setsitemapPriority: 0.9like the other tools. - Pick
accentVarfrom the accent variables inapp/globals.css(the list is under "Adding a tool" in CONTRIBUTING.md). Take one that no tool uses yet, or the one the fewest tools have if they're all taken. Don't use--rose, it's the color of error messages. SetaccentHexto that variable's dark-theme value.heroDimmust be""or a substring ofheroHeading. - Write 3 or 4 FAQs (3 renders as a 3-column grid, see
components/shared/ToolPageLayout.tsx:25). KeepmetaTitleunder 60 characters andmetaDescriptionaround 150 to 160. - Keep
featuresandogDescriptionto plain Latin text and punctuation. The social card font is a subset with no arrow or symbol glyphs (lib/og.tsx:33-36). - Create
app/(tools)/<slug>/page.tsx,<Name>Client.tsx(with"use client"), andopengraph-image.tsx. Copypage.tsxandopengraph-image.tsxfromapp/(tools)/base64/and change the slug. - Put all pure logic in
lib/<name>.ts(no React, no DOM) with tests inlib/__tests__/<name>.test.ts. Tests can import with@/like the app does (vitest.config.tshas the alias). - Nothing leaves the browser: no network calls with user input, no analytics, no third-party scripts (the CSP in
middleware.tsblocks external scripts anyway). - Reuse shared pieces:
CopyButton,useToast, and optionallyuseRegisterCommandsfor command palette actions (example inapp/(tools)/base64/Base64Client.tsx:43-53). - Every input has a visible label or an
aria-label, the tool works with the keyboard alone, and it looks right in both light and dark themes. - Add the tool to the "Which tool?" dropdown in
.github/ISSUE_TEMPLATE/bug_report.yml. -
npm run lint && npm run test && npm run buildpasses.
One new tool per contributor, so more people get a chance. Add your registry entry at the end of TOOLS and rebase on develop before asking for review, since other new tools will touch the same file.
Want to work on this? Comment below and I'll assign it to you. Please take one issue at a time, branch off develop, and open your PR against develop with Closes #86 in the description.
- 主要语言
- TypeScript
- 星标
- 1
- 派生
- 9
- 平均合并
- 8 小时 8 分钟
- 30 天内合并 PR
- 155
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
codercops/toolbelt 的其他 Issue
-
Timestamp converter still turns "02/30/2024" into March 1可能已有人在做 @bfs2021 于 1 天前认领。 未关闭bug good first issue hacktoberfest
难度 2/5 1-3 小时 新手友好度 88/100
codercops/toolbelt#345 · 1 条评论 ·
维护者通常 1 天内回复
-
Cron explainer says "on weekdays" for `0 0 1-31 * 1-5`, but the next runs include weekends可能已有人在做 @Saifjafri212213 于 3 天前认领。 未关闭bug hacktoberfest help wanted
codercops/toolbelt#329 · 2 条评论 · 已指派 1 人 ·
维护者通常 1 天内回复
-
UUID generator's v7 batch comes out in random order instead of time order可能已有人在做 @omisha123 于 3 天前认领。 未关闭bug good first issue hacktoberfest
codercops/toolbelt#316 · 3 条评论 · 已指派 1 人 ·
维护者通常 1 天内回复
-
JSON formatter's "Did you mean" hint reads inside strings, so a missing comma near a URL says to remove comments可能已有人在做 @kachamsiddarth 于 3 天前认领。 未关闭bug good first issue hacktoberfest
codercops/toolbelt#314 · 2 条评论 · 已指派 1 人 ·
维护者通常 1 天内回复
-
Base64 decode error points at the wrong character when the input has spaces or line breaks可能已有人在做 @Aaqibhafeezkhan 于 3 天前认领。 未关闭bug good first issue hacktoberfest
codercops/toolbelt#310 · 2 条评论 · 已指派 1 人 ·
维护者通常 1 天内回复
查看 codercops/toolbelt 的全部 Issue
相似的 Issue
-
enhancement
难度 2/5 1-3 小时 新手友好度 73/100
ajv-validator/ajv#2689 ·
-
[Bug]: IME confirmation Enter can submit the SSH port-forward dialog可能已有人在做 @seijikohara 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 88/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
home-assistant/frontend#55323 ·
维护者通常 1 天内回复
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
难度 1/5 1 小时以内 新手友好度 72/100
lingdojo/kana-dojo#33188 · 1 条评论 · 5 个 reaction ·
维护者通常 1 天内回复
-
self-driving
难度 1/5 1-3 小时 新手友好度 86/100
维护者通常 1 天内回复