https://github.com/minho42/acal
Check Apple calendar events from terminal on MacOS
https://github.com/minho42/acal
cli swift
Last synced: about 2 months ago
JSON representation
Check Apple calendar events from terminal on MacOS
- Host: GitHub
- URL: https://github.com/minho42/acal
- Owner: minho42
- License: mit
- Created: 2024-11-23T15:36:22.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2025-01-15T17:17:01.000Z (5 months ago)
- Last Synced: 2025-01-15T19:39:00.760Z (5 months ago)
- Topics: cli, swift
- Language: Swift
- Homepage:
- Size: 12.7 KB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Check Apple calendar events from terminal on MacOS using Swift
## Create a new Xcode project
Xcode -> Create New Project...
macOs -> **Command Line Tool**Product Name: CalendarCLI
Select project in the navigator -> Targets: CalendarCLI -> Sining & Capabilities -> Signing
Bundle Identifier: [com.yoursite.CalendarCLI]
## Make Info.plist
File -> New -> File from Template... [⌘ N]
Search: "Property List"
Save As: Info.plistSelect `Info` from navigator -> Open As > Source Code
Copy and paste from `CalendarCLI/Info.plist` to `Info.plist`
## Code (main.swift)
Copy and paste from `CalendarCLI/main.swift` to `main.swift`
## Build
Product -> Build [⌘ B]
The executable goes to something like:
> ~/Library/Developer/Xcode/DerivedData/**CalendarCLI-epaeyjhibywlyqbuuhetpwnjddow**/Build/Products/Debug/CalendarCLI
## Run
Run the app
$(find ~/Library/Developer/Xcode/DerivedData -name "CalendarCLI" -type f -path "_/Build/Products/Debug/_" -print -quit)## Run with alias
Make an alias in `~/.zshrc` (for Z shell)
```shell
alias acal='$(find ~/Library/Developer/Xcode/DerivedData -name "CalendarCLI" -type f -path "_/Build/Products/Debug/_" -print -quit)'
```## Output
```shell
❯ acal
2024-11-24 (Sun)
· return books2024-11-25 (Mon)
· 💰rent
```