printable_calendar 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/lib/printable_calendar.rb +1 -1
- data/lib/printable_calendar/range.rb +1 -1
- data/lib/printable_calendar/version.rb +1 -1
- data/sample-config.json +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b3dcce62800d249dace8dcebc8ad6d5e9f5eb482
|
4
|
+
data.tar.gz: b452a354825167c2102f3062ab33f0a2405c87fd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8b4d03b250c4cecc7be95c9dcb299e220b670352bee79a40329544e8a191efbc473b8087c1abef7046540f44b0fab595ca4d73639327b3b9f582381286b2ceab
|
7
|
+
data.tar.gz: 3ee3ff91f36ad87a77449111fd424c485c8cc29b5cbd0ccdf595c4e31d936a611c76b2fb02dace6cba6029f1f3d66942dd1eb175404bd5a1ad395643d8186b8b
|
data/README.md
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Generate printable agendas from Google Calendars.
|
4
4
|
|
5
|
-
I got sick of Google Calendar's terrible print dialog and decided to code around it. This command line utility will download a week,
|
5
|
+
I got sick of Google Calendar's terrible print dialog and decided to code around it. This command line utility will download a week, work week, or month of agenda items and render them in your default browser so you can print them easily.
|
6
6
|
|
7
7
|
![Screenshot](docs/screenshot.png)
|
8
8
|
|
@@ -32,7 +32,7 @@ usage: printable_calendar [options]
|
|
32
32
|
--client-id Google client id
|
33
33
|
--client-secret Google client secret
|
34
34
|
--refresh-token Google refresh token
|
35
|
-
-p, --period Time period to use. Accepts
|
35
|
+
-p, --period Time period to use. Accepts work_week, american_week, intl_week, month, day
|
36
36
|
--title Title for this calendar
|
37
37
|
--starting-from Date to anchor on. Defaults to today. Format as YYYY-MM-DD
|
38
38
|
--calendar-ids Google calendar IDs
|
data/lib/printable_calendar.rb
CHANGED
@@ -17,7 +17,7 @@ module PrintableCalendar
|
|
17
17
|
end
|
18
18
|
|
19
19
|
def run
|
20
|
-
starts, ends = Range.compute(@settings[:period] || "
|
20
|
+
starts, ends = Range.compute(@settings[:period] || "work_week", @settings[:starting_from] || Date.today)
|
21
21
|
data = Calendar.new(client_id, client_secret).fetch(starts: starts, ends: ends, refresh_token: refresh_token, calendar_ids: calendar_ids)
|
22
22
|
html = View.new(@settings, starts, ends, data).to_html
|
23
23
|
tempfile = write_tempfile(html)
|
@@ -7,7 +7,7 @@ module PrintableCalendar
|
|
7
7
|
|
8
8
|
def self.range_map
|
9
9
|
{
|
10
|
-
|
10
|
+
work_week: ->(t){[t.beginning_of_week(:monday), t.beginning_of_week(:monday) + 4]},
|
11
11
|
american_week: ->(t){[t.beginning_of_week(:sunday), t.end_of_week(:sunday)]},
|
12
12
|
intl_week: ->(t){[t.beginning_of_week(:monday), t.end_of_week(:sunday)]},
|
13
13
|
month: ->(t){[t.beginning_of_month, t.end_of_month]},
|
data/sample-config.json
CHANGED