vgcal 0.3.1 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +27 -2
- data/lib/vgcal/my_calendar.rb +1 -1
- data/lib/vgcal/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ef38649601c8235213557c91a0140fc4b9dbb48321cd8681a52f5a8175b7ad8c
|
4
|
+
data.tar.gz: 2858b7e91979460d4528b85592b6be3279f4c44504f64513ca3face8beb77adf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2945ec5f859fdf234b24c848b0f8a253d09d6b82d07ae7a9be77ccc7129e9ce19d5d2cc9189e11031532704d2562d24dcfd15b7a2a75c44c6e2ab3d9708a724e
|
7
|
+
data.tar.gz: d06dd6b8a38199c763096f0b5cf5195455be81cb67af952f6c93d653d8065a2683afbe23760e3b2ec96f1e34dacc7a945cf1b1cd4d1def1a12ba762ea276174e
|
data/Gemfile.lock
CHANGED
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:
|
65
|
-
・all day task2:
|
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
|
data/lib/vgcal/my_calendar.rb
CHANGED
@@ -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] =
|
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