vgcal 0.3.1 → 0.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a632e5cfab5b38c6448d2ec560cbe8b7f81bfa60eaa7926a1cc007946f6d1ab0
4
- data.tar.gz: b558eee546de6744e98dd62828d0708c98b6d1bba1b209d8e0885fdb1b05e571
3
+ metadata.gz: ef38649601c8235213557c91a0140fc4b9dbb48321cd8681a52f5a8175b7ad8c
4
+ data.tar.gz: 2858b7e91979460d4528b85592b6be3279f4c44504f64513ca3face8beb77adf
5
5
  SHA512:
6
- metadata.gz: a5a8d0dd3424094faafd0c3f70a009f2ec95cdfbdb54773ca4da29dae27fcdaa942e3d31de0d5ebc9aa23c3b424dbf5bc8beb3847db8ecf3b41867c5e1d0a107
7
- data.tar.gz: 4151ee42551a148d35e6230c99e466ba000778ca60aa4871c1e932664519785fc5b8466febe7afa1709724ce96dcac9af41db4484b07822a1e3baff15ce836c6
6
+ metadata.gz: 2945ec5f859fdf234b24c848b0f8a253d09d6b82d07ae7a9be77ccc7129e9ce19d5d2cc9189e11031532704d2562d24dcfd15b7a2a75c44c6e2ab3d9708a724e
7
+ data.tar.gz: d06dd6b8a38199c763096f0b5cf5195455be81cb67af952f6c93d653d8065a2683afbe23760e3b2ec96f1e34dacc7a945cf1b1cd4d1def1a12ba762ea276174e
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- vgcal (0.3.1)
4
+ vgcal (0.3.2)
5
5
  dotenv
6
6
  google-api-client
7
7
  thor (~> 1.1)
data/README.md CHANGED
@@ -46,6 +46,7 @@ Options:
46
46
  -n, [--next-week], [--no-next-week] # Show next week tasks
47
47
  -s, [--start-date=N] # Start date. ex.20210701
48
48
  -e, [--end-date=N] # End date. ex.20210728
49
+ -o, [--output=OUTPUT] # Output format. [text|json]
49
50
 
50
51
  Show google calendar
51
52
  $
@@ -61,8 +62,8 @@ $ vgcal show
61
62
  Period: 2021-07-24T00:00:00+09:00 - 2021-07-24T23:59:59+09:00
62
63
 
63
64
  My tasks: 5.25h(0.66day)
64
- ・all day task 1: all day
65
- ・all day task2: all day
65
+ ・all day task 1: 0h
66
+ ・all day task2: 0h
66
67
  ・meeting1: 2.0h
67
68
  ・meeting2: 0.25h
68
69
  ・meeting3: 3.0h
@@ -80,6 +81,30 @@ $ vgcal show -d +1
80
81
 
81
82
  # Schedule for 2021/07/01 - 2021/07/28
82
83
  $ vgcal show -s 20210701 -e 20210728
84
+
85
+ # Formatted json
86
+ $ vgcal show -o json | jq .
87
+ {
88
+ "start_date": "2021-09-05T00:00:00+09:00",
89
+ "end_date": "2021-09-05T23:59:59+09:00",
90
+ "tasks": [
91
+ {
92
+ "title": "all day task 1",
93
+ "time": 0,
94
+ "task_type": "my_task"
95
+ },
96
+ {
97
+ "title": "task a",
98
+ "time": 1,
99
+ "task_type": "my_task"
100
+ },
101
+ {
102
+ "title": "task b",
103
+ "time": 1,
104
+ "task_type": "my_task"
105
+ }
106
+ ]
107
+ }
83
108
  ```
84
109
 
85
110
  ## Development
@@ -29,7 +29,7 @@ module Vgcal
29
29
  events.items.each do |e|
30
30
  if e.organizer.email.include?(my_email_address) && !e.summary.start_with?(*hide_words)
31
31
  if all_day_event?(e.start.date)
32
- tasks_hash[e.summary] = 'all day'
32
+ tasks_hash[e.summary] = 0
33
33
  else
34
34
  task_time = (e.end.date_time - e.start.date_time).to_f * 24
35
35
  # 1日の中で同じタスク名が複数あったら時間を集計する。例.午前と午後それぞれでAプロジェクトに1時間スケジュール
data/lib/vgcal/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Vgcal
4
- VERSION = '0.3.1'
4
+ VERSION = '0.3.2'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vgcal
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shota Ito