Git Product home page Git Product logo

calendarstat's Introduction

CalendarStat

CalendarStat generates report and statistics from your Google Calendar.

Usage

$ Install go
$ git clone https://github.com/yinfredyue/CalendarStat.git
$ cd CalendarStat/cmd
$ go install && cmd
$ cmd
NAME:
   CalendarStat - A tool for analyzing your Google Calendar

USAGE:
   CalendarStat [global options] command [command options] [arguments...]

COMMANDS:
   colors      Show all colorIds
   calendars   Show all calendars
   events      Show all events
   event-stat  Get statistics about events
   help, h     Shows a list of commands or help for one command

GLOBAL OPTIONS:
   --help, -h  show help (default: false)

Display calendars

$ cmd calendars
Calendar{[email protected], [email protected], BackgroundColor=#d06b64, ColorId=2}
Calendar{Id=en.usa#[email protected], Summary=Holidays in United States, BackgroundColor=#9fc6e7, ColorId=15}
Calendar{[email protected], [email protected], BackgroundColor=#9fe1e7, ColorId=14}

Display events

$ cmd events -start-date 2021-09-19T00:00:00Z -end-date 2021-10-23T00:00:00Z -calendar-id [email protected]
Event{Summary=LeetCode Weekly Contest, Start=2021-09-18T22:30:00-04:00, End=2021-09-19T00:00:00-04:00, ColorId=, Id=30vo8ircrvmatr0k9tbu10o881_20210919T023000Z, Source=<nil>}
Event{Summary=notes, Start=2021-09-19T08:30:00-04:00, End=2021-09-19T10:30:00-04:00, ColorId=2, Id=6kbiv5akr39dsd8tc5cqibgj36, Source=<nil>}
Event{Summary=Q3, Start=2021-09-19T10:30:00-04:00, End=2021-09-19T13:00:00-04:00, ColorId=2, Id=5lgvcf310lin56983sit0evncq, Source=<nil>}
Event{Summary=HW2 Disussion, Start=2021-09-19T18:00:00-04:00, End=2021-09-19T20:00:00-04:00, ColorId=2, Id=7jpf74gpmtgg7b6bl5i0v4eofr, Source=<nil>}
Event{Summary=Leetcode questions, Start=2021-09-20T08:40:00-04:00, End=2021-09-20T13:40:00-04:00, ColorId=1, Id=2ubeoe2o4jvi098lfkqb8v7tmr, Source=<nil>}
Event{Summary=Online Applications, Start=2021-09-20T14:45:00-04:00, End=2021-09-20T15:35:00-04:00, ColorId=1, Id=790h4d1t6oujm0vt6ghfnh01d8, Source=<nil>}
Event{Summary=Storage Systems, Start=2021-09-20T16:40:00-04:00, End=2021-09-20T18:00:00-04:00, ColorId=, Id=5k9t0jjpeh9onib6cehbqsigpu_20210920T204000Z, Source=<nil>}

Display statistics about events (calendar-wise)

$ cmd event-stat -start-date 2021-09-19T00:00:00Z -end-date 2021-10-23T00:00:00Z -group-event-by calendar
EventGroup{calendar=Job Search, len(events)=0, start=2021-09-19 00:00:00 +0000 UTC, end=2021-10-23 00:00:00 +0000 UTC, byColor={}}
  EventGroupStat{duration=0s, weeklyDuration=0s, byColor={}}
EventGroup{calendar=Study, len(events)=0, start=2021-09-19 00:00:00 +0000 UTC, end=2021-10-23 00:00:00 +0000 UTC, byColor={}}
  EventGroupStat{duration=0s, weeklyDuration=0s, byColor={}}
EventGroup{calendar=Course Schedule, len(events)=0, start=2021-09-19 00:00:00 +0000 UTC, end=2021-10-23 00:00:00 +0000 UTC, byColor={}}
  EventGroupStat{duration=0s, weeklyDuration=0s, byColor={}}
EventGroup{calendar=Others, len(events)=250, start=2021-09-19 00:00:00 +0000 UTC, end=2021-10-23 00:00:00 +0000 UTC, byColor={}}
  EventGroupStat{duration=314h55m0s, weeklyDuration=78h43m45s, byColor={}}

Display statistics about events (calendar-wise AND color-wise)

$ cmd event-stat -start-date 2021-09-19T00:00:00Z -end-date 2021-10-23T00:00:00Z -group-event-by colorId
EventGroup{calendar=Job Search, len(events)=0, start=2021-09-19 00:00:00 +0000 UTC, end=2021-10-23 00:00:00 +0000 UTC, byColor={}}
  EventGroupStat{duration=0s, weeklyDuration=0s, byColor={}}
EventGroup{calendar=CMU Study, len(events)=0, start=2021-09-19 00:00:00 +0000 UTC, end=2021-10-23 00:00:00 +0000 UTC, byColor={}}
  EventGroupStat{duration=0s, weeklyDuration=0s, byColor={}}
EventGroup{calendar=Course Schedule, len(events)=0, start=2021-09-19 00:00:00 +0000 UTC, end=2021-10-23 00:00:00 +0000 UTC, byColor={}}
  EventGroupStat{duration=0s, weeklyDuration=0s, byColor={}}
EventGroup{calendar=Others, len(events)=250, start=2021-09-19 00:00:00 +0000 UTC, end=2021-10-23 00:00:00 +0000 UTC, byColor={
  colorId=5, group=EventGroup{calendar=Others, len(events)=1, start=2021-09-19 00:00:00 +0000 UTC, end=2021-10-23 00:00:00 +0000 UTC, byColor={}}
  colorId=2, group=EventGroup{calendar=Others, len(events)=77, start=2021-09-19 00:00:00 +0000 UTC, end=2021-10-23 00:00:00 +0000 UTC, byColor={}}
  colorId=, group=EventGroup{calendar=Others, len(events)=39, start=2021-09-19 00:00:00 +0000 UTC, end=2021-10-23 00:00:00 +0000 UTC, byColor={}}
  colorId=1, group=EventGroup{calendar=Others, len(events)=87, start=2021-09-19 00:00:00 +0000 UTC, end=2021-10-23 00:00:00 +0000 UTC, byColor={}}
  colorId=4, group=EventGroup{calendar=Others, len(events)=46, start=2021-09-19 00:00:00 +0000 UTC, end=2021-10-23 00:00:00 +0000 UTC, byColor={}}}}
  EventGroupStat{duration=314h55m0s, weeklyDuration=78h43m45s, byColor={
    colorId=2, stat=EventGroupStat{duration=118h25m0s, weeklyDuration=29h36m15s, byColor={}}
    colorId=, stat=EventGroupStat{duration=45h40m0s, weeklyDuration=11h25m0s, byColor={}}
    colorId=1, stat=EventGroupStat{duration=117h10m0s, weeklyDuration=29h17m30s, byColor={}}
    colorId=4, stat=EventGroupStat{duration=33h25m0s, weeklyDuration=8h21m15s, byColor={}}
    colorId=5, stat=EventGroupStat{duration=15m0s, weeklyDuration=3m45s, byColor={}}}}

calendarstat's People

Contributors

yyin-dev avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.