+
Skip to content

Shadorain/Shadocal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


🗓️ Shadocal 🗓️

A blazingly fast, Google calendar (more in future) event formatter webserver tool.

Docs Crate License Status

UsageNotesExamplesDevelopment
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
  • Get the client ID and client secret

Now set these environment variables:

export GOOGLE_CLIENT_ID=CLIENT_ID_HERE
export GOOGLE_CLIENT_SECRET=CLIENT_SECRET_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.

Library

To add the latest stable version of the Shadocal library using cargo, use this command:

cargo add shadocal-lib

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.

  • Allow multiple Google account connections (#4)
    • Should be possible assuming OAuth2 authorization doesn't hold me back here
  • Make this into an API library (#6)
  • Allow for user defined custom Formats
  • Add better customization of hard coded Formats
  • [-] 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.
  • Graphical User Interface (depends on above)
    • This could be quite a pain and would definitely need shipping of executables
    • Also multi platform support isn't the easiest with this so can see how needed it is

About

Google calendar formatted events as a webserver.

Resources

License

Stars

Watchers

Forks

Packages

No packages published
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载