1 unstable release
0.1.1 | Sep 12, 2024 |
---|
#223 in Asynchronous
37KB
554 lines
🗓️ Shadocal 🗓️
A blazingly fast, Google calendar (more in future) event formatter webserver tool.
Usage
•
Notes
•
Examples
•
Development
Docs
Usage
Currently in it's binary state, Shadocal can only be run as an executable from the command line.
It should be run with no arguments. Any configuration is done with environment variables.
Environment
Shadocal spins up a webserver on an environment variable controlled port and ip:
# Default PORT and IP
export SHADOCAL_IP=127.0.0.1
export SHADOCAL_PORT=7117
Authentication
This step only has to be done once.
To authenticate with OAuth2 to your Google Calendar you must configure some things on the Google side. Use the beginning steps of this handy guide from the NodeJS team to help with this.
- Enable the API
- Configure the OAuth consent screen
- Download the
credentials.json
file
Once you have your credentials.json
file, get the contents and encode them in base64
format.
Now set this environment variable to the encoded string:
export GOOGLE_KEY_ENCODED=PUT_THE_BASE64_KEY_HERE
This can be put in a file (without "export") in your local data directory.
On Linux: $HOME/.local/share/shadocal/client
.
On the first run of Shadocal, it will ask you to authenticate with your Google account using the credentials you provided. It will store the refresh token in the same data directory.
Installation
Building from Source
The Rust ecosystem must be installed, use the Rustup toolchain installer which makes the process incredibly easy.
To install the latest stable version of Shadocal using cargo
use this command:
cargo install shadocal
Executable
Currently there are no executable builds for this project yet, see Tasks.
Notes
Server
Shadocal uses the backend actix-web for its speed and simplicity.
CORS is enabled to ensure safe usage of the API.
Formatters
Currently there are only two hardcoded formatters available:
- Raw: Simple string representation of a Google Event
- Tana: Parsed into a format recognizeable by the PKM system Tana
I hope to improve this drastically by allowing the user to create custom formats.
Examples
Be sure to visit the Wiki for examples and use cases!
Development
I'm happy to address any Issues or Pull Requests when I can.
Tasks
In the current state this project meets my needs for my Tana workflow but I will continue to work on this as I can to add these other features.
- Make this into an API library
- Allow for user defined custom
Format
s - Add better customization of hard coded
Format
s - Potentially add support for other calendar types
- This adds uneeded complexity depending on how the Authentication is done.
- Potentially ship binary builds for Linux, Mac, and Windows.
- This is quite a tedius and fallible process, so I will push this off unless it gains alot of traction.
Dependencies
~30–48MB
~873K SLoC