Compare commits

...

4 Commits

Author SHA1 Message Date
Kiyomichi Kosaka 7e4e4af00e Merge pull request #49 from ok2/codex/create-shell-script-for-macos-widget
Create script to build macOS widget
2025-06-15 15:03:17 +02:00
Kiyomichi Kosaka 1e1a961dc2 Add build script and remove widget duplicates 2025-06-15 15:02:12 +02:00
Kiyomichi Kosaka 356e904abc Merge pull request #48 from ok2/codex/implement-analog-clock-widget-for-macos
Add macOS dashboard widget
2025-06-15 14:57:07 +02:00
Kiyomichi Kosaka a1f987ff59 Add macOS dashboard widget 2025-06-15 14:56:16 +02:00
5 changed files with 80 additions and 0 deletions
+3
View File
@@ -0,0 +1,3 @@
# Build artifacts
CoBiEClock.wdgt
build-widget/
+13
View File
@@ -63,6 +63,19 @@ An interactive web app that visualizes the **CosmoChron Binary Epoch (CoBiE)** t
└── assets/ # (Optional) images or external CSS/JS
```
## macOS Dashboard Widget
The repository includes a minimal Dashboard widget under
`macos-widget/`. A helper script `build-widget.sh` is provided to
package it automatically:
1. Run `./build-widget.sh` from the repository root.
2. The script creates `CoBiEClock.wdgt` which you can double-click to
install.
The widget runs offline and shows the analog CoBiE clock on your
desktop.
## Contributing
1. Fork the repository.
+23
View File
@@ -0,0 +1,23 @@
#!/bin/bash
# Build the macOS Dashboard widget without duplicating code
set -euo pipefail
WIDGET_NAME="CoBiEClock"
SRC_DIR="macos-widget"
BUILD_DIR="build-widget"
# Clean build directory
rm -rf "$BUILD_DIR"
mkdir "$BUILD_DIR"
# Copy unique widget files
cp "$SRC_DIR/Info.plist" "$SRC_DIR/index.html" "$BUILD_DIR/"
# Copy shared files from repository root
cp clock.js cobie.js style.css logo.svg "$BUILD_DIR/"
# Create archive and rename
zip -r "${WIDGET_NAME}.zip" "$BUILD_DIR" > /dev/null
mv "${WIDGET_NAME}.zip" "${WIDGET_NAME}.wdgt"
echo "Widget created: ${WIDGET_NAME}.wdgt"
+18
View File
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDisplayName</key>
<string>CoBiE Clock</string>
<key>CFBundleIdentifier</key>
<string>com.example.cobieclock</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>MainHTML</key>
<string>index.html</string>
</dict>
</plist>
+23
View File
@@ -0,0 +1,23 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>CoBiE Clock</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="analog-clock-container">
<div id="clock">
<div class="hand megasequence" id="handMegasequence"></div>
<div class="hand eonstrip" id="handEonstrip"></div>
<div class="hand chronon" id="handChronon"></div>
<div class="hand quantic" id="handQuantic"></div>
<div class="hand xeno" id="handXeno"></div>
<div class="clock-center"></div>
<div class="clock-label">CoBiE Time</div>
</div>
</div>
<script src="cobie.js"></script>
<script src="clock.js"></script>
</body>
</html>