feat(calendarium): new Calendarium desklet — clock, sun, moon, zodiac, Wikipedia, holidays#1763
Conversation
…, Wikipedia, holidays A new desklet: Calendarium — a feature-rich calendar and information desklet for Cinnamon. Features • Date & time — configurable date/time display with multiple format presets (including Hungarian and Japanese) and custom strftime support • Calendar highlights — day of year, ISO week number, month progress, days until New Year • Traditional month names — Old Hungarian, Old English (Anglo-Saxon), Old German • Folk calendar sayings — daily sayings in hu, en, de, fr, es, it • Moon phase — symbol, name, and age (days since new moon) • Sunrise & sunset — calculated from coordinates using a built-in solar algorithm • Western & Chinese zodiac — icon, text, or both; all 60 Chinese zodiac combinations with emoji • Name days — hu, en, de, fr, es, it calendars; upcoming days configurable • National holidays — hu, en, de, fr, es, it; upcoming holidays with public holiday highlight • Additional cities (up to 3) — local time (HH:MM), UTC offset with DST-correct timezone abbreviation (e.g. UTC+1 (CET)), and sunrise/sunset in city-local time • Wikipedia integration (optional) — "On This Day" events/births/deaths and Featured Article; configurable item count and rotation interval; automatic English fallback for languages with no content; background English cache pre-warm • Offline city search — built-in geocoder with IANA timezone lookup (no internet needed) • Translations — de, en, es, fr, hu, it (.po + compiled .mo) Test plan - Desklet loads without errors in Cinnamon - Date, time, and all toggle-able sections display correctly - City sunrise/sunset shows in city-local time when timezone is set - Wikipedia 'On This Day' displays and rotates; falls back to English for unsupported languages - Settings changes take effect immediately - Translations load for de, en, es, fr, hu, it
- Replace all Lang.bind() calls with arrow functions; remove unused Lang import - Convert load_contents(), replace_contents(), query_info() sync calls to their async counterparts in folkdays, namedays, holidays, geocoder and wikipedia modules - Remove query_exists() calls; errors are now caught via try/catch - Refactor _loadNamedayData() to async with callback; _init() and _onSettingChanged() updated accordingly - Split fetchOnThisDay/fetchFeatured into helper methods (_fetchOnThisDayNet, _fetchFeaturedNet) to keep async cache-check chains readable
Best-practices scannerThis is a regex-based check for API usage that can pose security, performance or This check is not perfect will not replace a normal review.Found 21 potential issue(s):
|
|
@KAMI911 nice desklet |
|
@tipichris or @mtwebster It seems there are desklets (this and other in the PRs) to include. |
…tions - Add bg-opacity scale setting (0=transparent, 1=solid black) to Appearance - Always hide desklet frame and header via prevent-decorations metadata - Remove hide-decorations toggle (no longer needed) - Fix set_style ordering so background survives _updateDecoration() call - Store desklet name in _deskletName for reuse
- Deduplicate .pot entries - Add 'Background opacity' and its tooltip to all .po files
|
@fredcw : Thank you for the heads-up. I hadn’t tested it with the light desktop setting. I’ve now removed it and applied a black background with opacity. I’ve also removed the non-working header setting. I hope it now works as expected. What features do you think are missing from this app? Do you have any suggestions for how it could be improved in the future? |
|
The function Something to consider about the readme.md:
Any user edits to the desklet's files will be overwritten whenever they update to a new version of the desklet. |
Cinnamon installs .mo files automatically; the manual copy IIFE is unnecessary. README "Extending" sections now point contributors to open a pull request instead of editing installed desklet files.
bb835e2 to
83fd360
Compare
Best-practices scannerThis is a regex-based check for API usage that can pose security, performance or This check is not perfect will not replace a normal review.Found 1 potential issue(s):
|
|
I hope now it is better. |
|
The wikipedia cache leaves outdated files on disk that it will never use again and won't be replaced for another year. This would amount to about 0.5GB of data over the course of a year. The cache should only store the current day's data, as the desklet considers files more than 12 hours old as out of date anyway. Also, settings.bindProperty() is deprecated, use settings.bind() instead. |
….bind() - wikipedia.js: add _pruneOldCache() to delete cache files not matching today's date on each fetch, preventing unbounded disk growth (~0.5 GB/year) - desklet.js: replace deprecated settings.bindProperty() with settings.bind()
Best-practices scannerThis is a regex-based check for API usage that can pose security, performance or This check is not perfect will not replace a normal review.Found 1 potential issue(s):
|
|
What is the next step? |
|
The desklet looks OK now but tbh, AI isn't good enough yet to be able to trust it with writing a desklet without manually reviewing the code to verify that it's correct. Since that doesn't seem to be the case here, it means you're placing the burden on someone else to properly review the code and 0.5GB of unused files in the cache directory is not really a trivial issue. |
|
@KAMI911 Please remove all unused files. |
|
I see only json files in the cache directory which was download by Wikipedia optional module. Now It is handling the case. I am testing. |
|
The old files were removed automatically, only actual files are stored:
|
|
IMO, I don't think this should have been merged. It's AI generated, which is fine, but it wasn't checked. The readme also seems like 100% unedited AI. This degrades the spices repo IMO because people then cannot tell if they are reading text written by humans or AI. On youtube for instance, creators must disclose AI generated content so that people know what they're watching. I believe this is important to people and will become more so in the future. Programming mistakes and bugs happen of course, but to not even review the code shows a lack of sufficient care and attention. This means that going forward, all changes to the desklet by @KAMI911 must be assumed to be unchecked and potentially harmful. |
|
Why do you think it is harmful? Who will able to review the code? |
|
I added an another PR (#1774). I also reviewed the code with external tools: ══ 1/2 Semgrep SAST (JS + secrets + OWASP) ══ ══ 2/2 njsscan (Node.js / JavaScript security) ══ |

A new desklet: Calendarium — a feature-rich calendar and information desklet for Cinnamon.
Features
• Date & time — configurable date/time display with multiple format presets (including Hungarian and Japanese) and custom strftime support
• Calendar highlights — day of year, ISO week number, month progress, days until New Year
• Traditional month names — Old Hungarian, Old English (Anglo-Saxon), Old German • Folk calendar sayings — daily sayings in hu, en, de, fr, es, it • Moon phase — symbol, name, and age (days since new moon)
• Sunrise & sunset — calculated from coordinates using a built-in solar algorithm
• Western & Chinese zodiac — icon, text, or both; all 60 Chinese zodiac combinations with emoji
• Name days — hu, en, de, fr, es, it calendars; upcoming days configurable
…, Wikipedia, holidays• National holidays — hu, en, de, fr, es, it; upcoming holidays with public holiday highlight
• Additional cities (up to 3) — local time (HH:MM), UTC offset with DST-correct timezone abbreviation (e.g. UTC+1 (CET)), and sunrise/sunset in city-local time
• Wikipedia integration (optional) — "On This Day" events/births/deaths and Featured Article; configurable item count and rotation interval; automatic English fallback for languages with no content; background English cache pre-warm
• Offline city search — built-in geocoder with IANA timezone lookup (no internet needed) • Translations — de, en, es, fr, hu, it (.po + compiled .mo)
Test plan