mhc 1.2.3 → 1.2.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -1
- data/bin/mhc +19 -3
- data/emacs/Cask +1 -1
- data/emacs/mhc-date.el +4 -11
- data/emacs/mhc-record.el +1 -1
- data/emacs/mhc-summary.el +2 -1
- data/emacs/mhc-vars.el +1 -1
- data/emacs/mhc.el +2 -2
- data/lib/mhc/caldav.rb +1 -1
- data/lib/mhc/command/completions.rb +1 -1
- data/lib/mhc/version.rb +1 -1
- data/samples/japanese-holidays.mhcc +4 -3
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4522630272ecdc9d44c9b994b2b31f8e36278abb0004708ec0e39d63e5d16792
|
4
|
+
data.tar.gz: cbcd079db569d336eec4eb87f21e5598cd3735b04f0fef6ffbbc8b7fdb583067
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1f052c78047e59e8638248ef56928f2ee3e85ae544b959d294c6900afb06868cb305a4a23b1ae85a35d963b870dbb0ec950c4c1d5cd9ea25d9ffe07334be5cd8
|
7
|
+
data.tar.gz: 874b007618cfd8be8a49ba0fab497ba38f6a36edfedbedf0ec72bb983c6c5ceff67a52c2b6138a62ced23fb0586e5f644eca018e2d9b963a8d79666100b94b9a
|
data/.gitignore
CHANGED
data/bin/mhc
CHANGED
@@ -120,6 +120,7 @@ class MhcCLI < Thor
|
|
120
120
|
method_option :show_all, :desc => "Include all finished tasks."
|
121
121
|
|
122
122
|
def todo
|
123
|
+
todos = []
|
123
124
|
calendar.tasks.each do |task|
|
124
125
|
if task.recurring?
|
125
126
|
# Yearly: today - 90days .. today + 365d - 90days ?
|
@@ -130,9 +131,24 @@ class MhcCLI < Thor
|
|
130
131
|
search_range = nil
|
131
132
|
end
|
132
133
|
next if task.in_category?("done") && !options[:show_all]
|
133
|
-
|
134
|
-
|
135
|
-
|
134
|
+
todos << task.occurrences(range: search_range).first
|
135
|
+
end
|
136
|
+
todos.each.sort{|a, b| a.dtstart <=> b.dtstart}.each do |t|
|
137
|
+
deadline = t.dtstart
|
138
|
+
deadline_string = ""
|
139
|
+
remaining = (deadline - Mhc::PropertyValue::Date.today).to_i
|
140
|
+
if remaining == 0
|
141
|
+
deadline_string = " (due this date)"
|
142
|
+
elsif remaining > 0
|
143
|
+
deadline_string = format(" (%d days to go)", remaining)
|
144
|
+
else
|
145
|
+
deadline_string = format(" (%d days overdue)", -remaining)
|
146
|
+
end
|
147
|
+
location_string = " [#{t.location}]" if !t.location.empty?
|
148
|
+
puts format("%s %-11s %s%s%s",
|
149
|
+
deadline.strftime("%Y/%m/%d %a"),
|
150
|
+
t.time_range.to_mhc_string,
|
151
|
+
t.subject, location_string, deadline_string)
|
136
152
|
end
|
137
153
|
end # todo
|
138
154
|
|
data/emacs/Cask
CHANGED
data/emacs/mhc-date.el
CHANGED
@@ -411,17 +411,10 @@
|
|
411
411
|
`(/ (1- (mhc-date-dd ,date)) 7))
|
412
412
|
|
413
413
|
(defsubst mhc-date-cw (date)
|
414
|
-
(
|
415
|
-
|
416
|
-
|
417
|
-
|
418
|
-
(if (< days 0)
|
419
|
-
(setq days (mhc-date/iso-week-days
|
420
|
-
(+ yday 365 (if (mhc-date/leap-year-p (1- yy)) 1 0)) ww))
|
421
|
-
(setq d (mhc-date/iso-week-days
|
422
|
-
(- yday 365 (if (mhc-date/leap-year-p yy) 1 0)) ww))
|
423
|
-
(if (<= 0 d) (setq days d)))
|
424
|
-
(1+ (/ days 7)))))
|
414
|
+
(string-to-number
|
415
|
+
(format-time-string
|
416
|
+
(if (= mhc-start-day-of-week 1) "%V" "%U")
|
417
|
+
(mhc-date-to-second date))))
|
425
418
|
|
426
419
|
;;
|
427
420
|
;; compare.
|
data/emacs/mhc-record.el
CHANGED
data/emacs/mhc-summary.el
CHANGED
@@ -356,7 +356,8 @@ message and cdr keeps a visible message."
|
|
356
356
|
(or (null (setq dayinfo
|
357
357
|
(get-text-property (point) 'mhc-dayinfo)))
|
358
358
|
(not (eq (mhc-day-date dayinfo) date))))
|
359
|
-
(goto-char (next-single-property-change (point) 'mhc-dayinfo)
|
359
|
+
(goto-char (or (next-single-property-change (point) 'mhc-dayinfo)
|
360
|
+
(point-min))))))
|
360
361
|
|
361
362
|
(defun mhc-summary-record (&optional mailer)
|
362
363
|
"Return record on current line."
|
data/emacs/mhc-vars.el
CHANGED
data/emacs/mhc.el
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
;; Description: Message Harmonized Calendaring system.
|
4
4
|
;; Author: Yoshinari Nomura <nom@quickhack.net>
|
5
5
|
;; Created: 1994-07-04
|
6
|
-
;; Version: 1.2.
|
6
|
+
;; Version: 1.2.4
|
7
7
|
;; Keywords: calendar
|
8
8
|
;; URL: http://www.quickhack.net/mhc
|
9
9
|
;; Package-Requires: ((calfw "20150703"))
|
@@ -25,7 +25,7 @@
|
|
25
25
|
|
26
26
|
;;; Code:
|
27
27
|
|
28
|
-
(eval-when-compile (require 'cl))
|
28
|
+
(eval-when-compile (require 'cl-lib))
|
29
29
|
|
30
30
|
;; For Mule 2.3
|
31
31
|
(eval-and-compile
|
data/lib/mhc/caldav.rb
CHANGED
@@ -26,7 +26,7 @@ module Mhc
|
|
26
26
|
D:propstat/D:prop/caldav:calendar-data
|
27
27
|
).map{|e| xmldoc.elements[e].text rescue nil}
|
28
28
|
|
29
|
-
info.href = URI.
|
29
|
+
info.href = URI.decode_www_form_component(href)
|
30
30
|
info.uid = File.basename(info.href, ".ics")
|
31
31
|
info.status = status
|
32
32
|
info.content_type = content_type
|
data/lib/mhc/version.rb
CHANGED
@@ -72,14 +72,14 @@ X-SC-Record-Id: 5E03776A-4280-4337-85C0-F1322A3AAE6E
|
|
72
72
|
|
73
73
|
X-SC-Subject: 海の日
|
74
74
|
X-SC-Category: Holiday Japanese
|
75
|
-
X-SC-Day: !20200720 20200723
|
75
|
+
X-SC-Day: !20200720 20200723 !20210719 20210722
|
76
76
|
X-SC-Cond: 3rd Mon Jul
|
77
77
|
X-SC-Duration: 20030701-
|
78
78
|
X-SC-Record-Id: BD4156C2-5546-4146-8297-09CF4210A346
|
79
79
|
|
80
80
|
X-SC-Subject: 山の日
|
81
81
|
X-SC-Category: Holiday Japanese
|
82
|
-
X-SC-Day: 20200810 !20200811
|
82
|
+
X-SC-Day: 20200810 !20200811 20210808 !20210811
|
83
83
|
X-SC-Cond: 11 Aug
|
84
84
|
X-SC-Duration: 20160811-
|
85
85
|
X-SC-Record-Id: FC7C481B-7BF5-4639-B700-3B60CB99E05D
|
@@ -110,7 +110,7 @@ X-SC-Record-Id: C17D9CA5-28AF-4826-AD33-8B75473E5B52
|
|
110
110
|
|
111
111
|
X-SC-Subject: スポーツの日
|
112
112
|
X-SC-Category: Holiday Japanese
|
113
|
-
X-SC-Day: 20200724 !20201012
|
113
|
+
X-SC-Day: 20200724 !20201012 20210723 !20211011
|
114
114
|
X-SC-Cond: 2nd Mon Oct
|
115
115
|
X-SC-Duration: 20200101-
|
116
116
|
X-SC-Record-Id: F10B2B18-B0FB-477E-A7D3-A067B31F4736
|
@@ -184,6 +184,7 @@ X-SC-Day: 19730430 19730924 19740506 19740916 19741104 19751124
|
|
184
184
|
20081124 20090506 20100322 20120102 20120430 20121224 20130506
|
185
185
|
20131104 20140506 20141124 20150506 20160321 20170102 20180212
|
186
186
|
20180430 20180924 20181224 20190506 20190812 20191104 20200224 20200506
|
187
|
+
20210809
|
187
188
|
20230102 20240212 20240506 20240812 20240923 20241104 20250224 20250506
|
188
189
|
20251124 20260506 20270322 20290212 20290430 20290924 20291224
|
189
190
|
20300506 20300812 20301104 20310224 20310506 20311124 20330321 20340102
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mhc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yoshinari Nomura
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-11-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -255,8 +255,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
255
255
|
- !ruby/object:Gem::Version
|
256
256
|
version: '0'
|
257
257
|
requirements: []
|
258
|
-
|
259
|
-
rubygems_version: 2.7.6
|
258
|
+
rubygems_version: 3.1.4
|
260
259
|
signing_key:
|
261
260
|
specification_version: 4
|
262
261
|
summary: Message Harmonized Calendaring
|