wfh

command module
v0.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 24, 2024 License: MIT Imports: 16 Imported by: 0

README

WFH Calendar CLI

A simple Go CLI to quickly register a "Work From Home" event in your Google Calendar.

Description

This CLI tool is designed for developers who want a quick way to mark a day as "Work From Home" in their Google Calendar.

Features

  • Integrates with Google Calendar API.
  • Stores configuration in ~/.wfh, making it accessible across the machine.
  • Supports OAuth2 for authentication.
  • Automatically saves and reuses authentication tokens.
  • Allows embedding of Google credentials in the binary for simpler distribution.
  • Works on Windows, macOS, and Linux.

Prerequisites

  • Go (v1.21 or later)
  • A Google account with Calendar API access.
  • credentials.json obtained from the Google Developer Console.

You can skip DefaultMessage and User if you want to use the defaults. The default for User is to use $USER.

Usage

  1. Run the CLI for the first time, we use -list not to create a new event but for auth/authz.

    wfh -list
    

    On the first run, you'll be prompted to authorize the application to access your Google Calendar.

  2. To mark today as a WFH day:

    wfh [--date 2023-03-01] <optional message>
    
  3. Check Google Calendar. You should see a new all-day event titled with your default message.

Contributions

Feel free to open an issue or submit a pull request if you have suggestions, improvements, or bug fixes. All contributions are welcome!

License

This project is licensed under the MIT License. See LICENSE for details.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL