Skip to content

fujiwara-e/Gcal.js

 
 

Repository files navigation

TUI

TUI Google Calendar Client Application 🧑‍💻👩‍💻👨‍💻

GitHub License

GitHub Repo stars

RequirementsSetupCommandsLicense

TUI

For Japanese

日本語版README

Requirements

  • Node.js
  • Google Calendar API must be enabled in the Google Cloud Console
  • credentials.json file must be obtained from the Google Cloud Console and placed in the program directory

Setup

Install dependencies

Run the following command in the project directory to install the necessary dependencies:

npm install

Set up Google Calendar API credentials

  1. Create a project in Google Cloud Console and enable the Google Calendar API
  2. Create credentials and generate an OAuth 2.0 client ID
  3. Download the credentials.json file and save it to the same directory as this program

Create a symlink

To command Gcal (cldr), create a symlink in a location where the path is accessible.

export PATH=path/to/your/directory:$PATH
cd your/directory
ln -s path/to/Gcal.js/cldr cldr

The following is a configuration example

export PATH=$HOME/.local/bin:$PATH #(Permanent by adding it to .bashrc or .zshrc)
cd ~/.local/bin
ln -s ~/git/Gcal.js/cldr cldr

Usage

Display

When you start Gcal.js, three tables are displayed.
On the left are the events registered in Google Calendar, on the upper right is a graph showing the dates and times of events, and on the lower right is a log.
The event under the cursor is highlighted in blue.

Basic operations

Use the arrow keys or jk keys (like vim) to move the cursor.
Press the q key to exit the system. To select an event, place the cursor on the event you want to select and press the Enter key. Press the Space key to open the command line.

Event add/edit/delete functions and available commands

Please refer to the following for operation methods, specifications, and details of each:

Commands

Command Description
add Add a new event to Google Calendar
config Select the Google Calendar to subscribe to
find or f Display only events that include the argument in the event name
help List all commands
jump or j Move to the event on the specified date (if no argument, move to today's event)
md Desplay events in markdown and Copy to clipboard them
sync or s Sync with Google Calendar
update Update Gcal.js

Shortcuts

Some functions and commands have shortcuts.
You can also assign your own preferred keys.
The default key bindings are shown below.

Key Description
1,2or3 Toggle display each table in full screen
q or Ctrl + c Exit the program
a Add a new event
n Jump to one week later
l Add event with LLM
p Jump to one week earlier
Ctrl + n Jump to the next month
Ctrl + p Jump to the previous month
t Jump to today

Set your key bindings:
Edit setting.json, key bindings can be changed.

{
    "keyBindings": {
        "quit": [
            "q",
            "C-c"
        ],

        [...]

        "today": [
            "t",
            "home"
        ]
    }
}

License

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

About

指定した Google カレンダーのイベントを取得し,マークダウン記法で表示するプログラム

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • JavaScript 99.5%
  • Shell 0.5%