mhc 1.0.3 → 1.0.4
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 +4 -4
- data/README.org +206 -15
- data/Rakefile +5 -2
- data/emacs/Cask +1 -1
- data/emacs/mhc-calendar.el +4 -3
- data/emacs/mhc-calfw.el +2 -2
- data/emacs/mhc-date.el +7 -0
- data/emacs/mhc-db.el +2 -2
- data/emacs/mhc-draft.el +0 -2
- data/emacs/mhc-message.el +19 -6
- data/emacs/mhc-misc.el +20 -0
- data/emacs/mhc-parse.el +7 -0
- data/emacs/mhc-summary.el +33 -7
- data/emacs/mhc-vars.el +1 -1
- data/emacs/mhc.el +29 -65
- data/lib/mhc/event.rb +8 -0
- data/lib/mhc/formatter.rb +5 -5
- data/lib/mhc/occurrence.rb +2 -1
- data/lib/mhc/property_value/date.rb +4 -0
- data/lib/mhc/version.rb +1 -1
- data/mhc.gemspec +6 -1
- data/samples/japanese-holidays.mhcc +52 -23
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b1c058aa0f117bd28b047082f0bffb7829a65336
|
4
|
+
data.tar.gz: 33e55550fee0eab49840f679b57f703803bc9ac7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 59543a84b06f8f386b7f3bd33ad4ba8116479308d69a2079d1a8c30dc03a38a5433119117852168b746e364ccbec43576cb9ac3b15fc11532ce5ea5bc5389097
|
7
|
+
data.tar.gz: 2ba5edb349ac06b2e5cc31891c37fe2bde122db6918c0bfec4d9589f1c4c7ccd667adcdb5f99a678a135e5ae2815d0c90164f5fe6aac0da984cf776ab1b3dfa5
|
data/README.org
CHANGED
@@ -23,9 +23,12 @@
|
|
23
23
|
# #+LATEX_HEADER: \pagestyle{empty}
|
24
24
|
# #+LaTeX: \thispagestyle{empty}
|
25
25
|
|
26
|
+
[[file:https://badge.fury.io/rb/mhc.svg]]
|
27
|
+
[[http://melpa.org/#/mhc][file:http://melpa.org/packages/mhc-badge.svg]]
|
28
|
+
|
26
29
|
* DESCRIPTION
|
27
|
-
MHC is
|
28
|
-
|
30
|
+
MHC is a simple and powerful calendar tool, which consists of
|
31
|
+
a CLI tool written in Ruby (mhc) and a nifty Emacs frontend UI (mhc.el).
|
29
32
|
|
30
33
|
You can get the latest version from:
|
31
34
|
+ https://github.com/yoshinari-nomura/mhc
|
@@ -33,24 +36,212 @@
|
|
33
36
|
|
34
37
|
MHC has following features:
|
35
38
|
|
36
|
-
+ Easy import
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
+
|
39
|
+
+ Easy import from existing Emacs buffers
|
40
|
+
+ MHC will guess the title, date, time and description from the content of buffer.
|
41
|
+
|
42
|
+
+ Simple plain-text data format
|
43
|
+
+ MHC stores articles in similar format to MH (email); you can manipulate them
|
44
|
+
by many other text-manipulation tools, editors, UNIX command-line tools or your own scripts.
|
45
|
+
|
46
|
+
+ Flexible output format
|
47
|
+
+ Currently plain-text, iCalendar, S-formula (mhc.el, calfw), org-table, howm, JSON: ([[http://fullcalendar.io/][full-calendar]]) are supported.
|
44
48
|
|
45
|
-
|
46
|
-
|
47
|
-
|
49
|
+
+ Selective export to Google Calendar with flexible filters and modifiers.
|
50
|
+
+ MHC can export custom-filtered calendars to Google Calendar via CalDaV.
|
51
|
+
Check [[https://github.com/yoshinari-nomura/mhc/blob/master/samples/DOT.mhc-config.yml][mhc-config.yml]] for details.
|
48
52
|
|
49
53
|
* SYSTEM REQUIREMENTS
|
50
54
|
+ Ruby 2.1 or newer
|
51
55
|
+ Emacs 24 or newer
|
52
56
|
|
53
|
-
*
|
57
|
+
* INSTALL AND SETUP
|
58
|
+
** Ruby CLI (mhc)
|
59
|
+
mhc CLI command can be installed from rubygems.org.
|
60
|
+
#+BEGIN_SRC shell-script
|
61
|
+
$ gem install mhc
|
62
|
+
#+END_SRC
|
63
|
+
|
64
|
+
Or, if you want to install mhc in a sandbox (recommended),
|
65
|
+
Bunlder would help you:
|
66
|
+
#+BEGIN_SRC shell-script
|
67
|
+
$ gem install bundler
|
68
|
+
$ mkdir /path/to/install/mhc
|
69
|
+
$ cd /path/to/install/mhc
|
70
|
+
$ bundle init
|
71
|
+
$ echo 'gem "mhc"' >> Gemfile
|
72
|
+
$ bundle install --path=vendor/bundle --binstubs=bin
|
73
|
+
$ export PATH=/path/to/install/mhc/bin:$PATH
|
74
|
+
#+END_SRC
|
75
|
+
|
76
|
+
Then, initialize config file and spool directory:
|
77
|
+
#+BEGIN_SRC shell-script
|
78
|
+
$ mhc init ~/mhc
|
79
|
+
|
80
|
+
# Read comments in config.yml carefully
|
81
|
+
$ vi ~/.config/mhc/config.yml
|
82
|
+
|
83
|
+
# Add Japanese Holidays if needed.
|
84
|
+
$ cp samples/japanese-holidays.mhcc ~/mhc/presets/
|
85
|
+
#+END_SRC
|
86
|
+
|
87
|
+
Check if mhc is working correctly:
|
88
|
+
#+BEGIN_SRC shell-script
|
89
|
+
$ mhc scan thismonth
|
90
|
+
#+END_SRC
|
91
|
+
|
92
|
+
** Emacs UI (mhc.el)
|
93
|
+
*You have to install Ruby CLI before install mhc.el*
|
94
|
+
|
95
|
+
MHC is now available on [[http://melpa.org/][MELPA]]. If you set up packaging system correctly,
|
96
|
+
You can install mhc with package.el (=M-x= =package-install= =mhc=).
|
97
|
+
Check [[https://github.com/milkypostman/melpa#usage][MELPA usage]] for details.
|
98
|
+
|
99
|
+
And then, =M-x mhc= will show up the monthly calendar.
|
100
|
+
|
101
|
+
* USAGE
|
102
|
+
** Ruby CLI (mhc)
|
103
|
+
: mhc help
|
104
|
+
|
105
|
+
** Emacs UI (mhc.el)
|
106
|
+
*** Keybind
|
107
|
+
1) Jump and Show
|
108
|
+
|
109
|
+
=n/p=, =h/j/k/l= would work as expected.
|
110
|
+
|
111
|
+
| Key | Function |
|
112
|
+
|-----------------+----------------------------|
|
113
|
+
| =<= | Show previous month |
|
114
|
+
| =P= | Show previous year |
|
115
|
+
| =>= | Show next month |
|
116
|
+
| =N= | Show next year |
|
117
|
+
| =g= | Go to specific month |
|
118
|
+
| =v= | Toggle message window |
|
119
|
+
| =RET/SPC/./DEL= | Show/scroll message buffer |
|
120
|
+
| =/= | Search by keyword |
|
121
|
+
|
122
|
+
2) Manipulate articles
|
123
|
+
|
124
|
+
| Key | Function |
|
125
|
+
|-----+------------------------------------------------|
|
126
|
+
| =E= | Create a new article draft interactively |
|
127
|
+
| =M= | Open pointed article to edit |
|
128
|
+
| =D= | Delete pointed article |
|
129
|
+
| =C= | Copy article temporally as a reusable template |
|
130
|
+
| =Y= | Same as =E= but use the template stored by =C= |
|
131
|
+
|
132
|
+
3) Draft Buffer
|
133
|
+
|
134
|
+
| Key | Function |
|
135
|
+
|----------+----------------------------------------|
|
136
|
+
| =C-cC-c= | Finish editing and register to DB |
|
137
|
+
| =C-cC-q= | Discard editing buffer w/o touching DB |
|
138
|
+
|
139
|
+
* Article format
|
140
|
+
** Example
|
141
|
+
MHC stores every article in the form of RFC822-like format.
|
142
|
+
Once you open a new article draft in Emacs by typing =E=,
|
143
|
+
You may feel the draft is very similar to email's one.
|
144
|
+
This is an example of MHC article:
|
145
|
+
#+BEGIN_EXAMPLE
|
146
|
+
X-SC-Subject: Home party
|
147
|
+
X-SC-Location: my second house
|
148
|
+
X-SC-Day: 20150715
|
149
|
+
X-SC-Time: 18:00-21:00
|
150
|
+
X-SC-Category: Private Party
|
151
|
+
X-SC-Cond:
|
152
|
+
X-SC-Duration:
|
153
|
+
X-SC-Record-Id: C34D89F5-27FA-4243-AC6C-168D8D243D9A
|
154
|
+
X-SC-Sequence: 0
|
155
|
+
|
156
|
+
This is a sample schedule article about a home party scheduled on
|
157
|
+
20150715 18:00-21:00. MHC schedule articles are similar to RFC822
|
158
|
+
style message like this. In the header part, you can place any extra
|
159
|
+
headers you want. if you import an article from existing email, you
|
160
|
+
may want to insert the original email headers such as Subject,
|
161
|
+
From, Date.
|
162
|
+
#+END_EXAMPLE
|
163
|
+
|
164
|
+
** Time related headers
|
165
|
+
MHC has four types of headers to specify time/date-range or recurring conditions:
|
166
|
+
+ =X-SC-Day=
|
167
|
+
+ =X-SC-Time=
|
168
|
+
+ =X-SC-Cond=
|
169
|
+
+ =X-SC-Duration=
|
170
|
+
|
171
|
+
*** X-SC-Day
|
172
|
+
=X-SC-Day:= specifies an enumeration of occurrence dates separated by white space:
|
173
|
+
#+BEGIN_EXAMPLE
|
174
|
+
X-SC-Day: 20150704 ... all-day event
|
175
|
+
X-SC-Day: 20150704-20150705 ... two-days long single event
|
176
|
+
X-SC-Day: 20150704 20150705 ... two all-day events
|
177
|
+
#+END_EXAMPLE
|
178
|
+
|
179
|
+
If =X-SC-Time:= is specified with =X-SC-Day:=,
|
180
|
+
=X-SC-Time:= acts on all enumerated dates in =X-SC-Day:=.
|
181
|
+
So, you cannot set multiple-days value (=20150704-20150705=) with =X-SC-Time:=.
|
182
|
+
You can also put =!= prefix to specify the exception days (See below about =X-SC-Cond:=)
|
183
|
+
|
184
|
+
*** X-SC-Time
|
185
|
+
=X-SC-Time:= specifies a time range in a day or a point of time like:
|
186
|
+
#+BEGIN_EXAMPLE
|
187
|
+
X-SC-Time: 10:00-12:00
|
188
|
+
X-SC-Time: 10:00
|
189
|
+
#+END_EXAMPLE
|
190
|
+
You can leave it blank for all-day events.
|
191
|
+
|
192
|
+
With the combination of =X-SC-Day:=, you can specify some particular
|
193
|
+
time-range of a day. Currently, you cannot specify a time-range
|
194
|
+
across the multiple days.
|
195
|
+
|
196
|
+
*** X-SC-Cond
|
197
|
+
=X-SC-Cond:= defines a rule of recurrence; weekly, monthly or yearly.
|
198
|
+
You can place these keywords in =X-SC-Cond:= separating by white spaces:
|
199
|
+
| Keyword | Purpose |
|
200
|
+
|----------------------------+-----------------------|
|
201
|
+
| =01/02/.../31= | Day of month |
|
202
|
+
| =1st/2nd/3rd/4th/5th/Last= | Week order in a month |
|
203
|
+
| =Sun/Mon/.../Sat= | Day of week |
|
204
|
+
| =Jan/Feb/.../Dec= | Name of month |
|
205
|
+
|
206
|
+
Example:
|
207
|
+
#+BEGIN_EXAMPLE
|
208
|
+
X-SC-Cond: Fri ... Every Friday
|
209
|
+
X-SC-Cond: Tue Fri ... Every Tueday and Friday
|
210
|
+
X-SC-Cond: 31 Aug ... August 31st every year
|
211
|
+
X-SC-Cond: 1 ... First day on every month
|
212
|
+
X-SC-Cond: 1st 3rd Fri ... First and Third Friday every month
|
213
|
+
X-SC-Cond: Fri 13 ... 13th on every month or every Friday (not Friday 13th)
|
214
|
+
#+END_EXAMPLE
|
215
|
+
|
216
|
+
Sometimes you may want to set a particular date as exception.
|
217
|
+
In such case, you can exclude a date by placing =!YYYYMMDD=
|
218
|
+
in =X-SC-Day:=. For example:
|
219
|
+
#+BEGIN_EXAMPLE
|
220
|
+
X-SC-Day: !20150715 20150716
|
221
|
+
X-SC-Cond: Wed
|
222
|
+
X-SC-Duration: 20150701-20150731
|
223
|
+
|
224
|
+
This article occurs every Wednesday in July 2015 with the exception
|
225
|
+
of 2015-07-15 (Wed) and inclusion of 2015-07-16 (Thu).
|
226
|
+
#+END_EXAMPLE
|
227
|
+
|
228
|
+
*** X-SC-Duration
|
229
|
+
=X-SC-Duration:= acts on =X-SC-Cond:= to bounds the recurrence rule
|
230
|
+
in an inclusive manner.
|
231
|
+
Note that, =X-SC-Duration:= itself does not define any concrete occurrences and
|
232
|
+
does not act on =X-SC-Day:=.
|
233
|
+
|
234
|
+
Example:
|
235
|
+
#+BEGIN_EXAMPLE
|
236
|
+
X-SC-Day: !20150715 20150801
|
237
|
+
X-SC-Cond: Wed
|
238
|
+
X-SC-Duration: 20150701-20150731
|
239
|
+
|
240
|
+
Every Wednesday in July 2015 with the exception
|
241
|
+
of 2015-07-15 (Wed) and inclusion of 2015-08-01 (Sat).
|
242
|
+
#+END_EXAMPLE
|
243
|
+
|
244
|
+
* INFORMATION FOR DEVELOPERS
|
54
245
|
** INSTALL for developers:
|
55
246
|
1) Install rbenv + ruby-build
|
56
247
|
(see https://github.com/sstephenson/rbenv#basic-github-checkout for details)
|
@@ -186,7 +377,7 @@
|
|
186
377
|
+ sync_channels/* :: Sync records of MHC DB.
|
187
378
|
If you remove any files under this directory,
|
188
379
|
MHC Sync will be DAMAGED.
|
189
|
-
*
|
380
|
+
* HOW TO CONVERT FROM THE OLD MHC SPOOL
|
190
381
|
[[https://gist.github.com/yoshinari-nomura/bb9a197e0e01ad81c883][update-uuid.sh]] would help you.
|
191
382
|
|
192
383
|
New format is:
|
data/Rakefile
CHANGED
@@ -18,11 +18,14 @@ task :build => :check_version
|
|
18
18
|
# Emacs stuffs must have the same version numbers
|
19
19
|
# with Mhc::VERSION.
|
20
20
|
task :check_version do
|
21
|
-
for file in %w(mhc-vars.el Cask)
|
21
|
+
for file in %w(mhc.el mhc-vars.el Cask)
|
22
22
|
path = File.expand_path("../emacs/#{file}", __FILE__)
|
23
23
|
raise "File not found #{path}" unless File.exists?(path)
|
24
24
|
|
25
|
-
|
25
|
+
content = File.open(path).read
|
26
|
+
unless (/^;; Version: (\d+\.\d+\.\d+)$/ =~ content ||
|
27
|
+
/(\d+\.\d+\.\d+).*MHC_VERSION$/ =~ content) &&
|
28
|
+
Mhc::VERSION == $1
|
26
29
|
raise "#{path} does not have valid version number (#{$1})."
|
27
30
|
end
|
28
31
|
end
|
data/emacs/Cask
CHANGED
data/emacs/mhc-calendar.el
CHANGED
@@ -12,6 +12,7 @@
|
|
12
12
|
;;; Configration Variables:
|
13
13
|
|
14
14
|
(require 'mhc-date)
|
15
|
+
(require 'mhc-misc)
|
15
16
|
(require 'mhc-day)
|
16
17
|
(require 'mhc-schedule)
|
17
18
|
(require 'mhc-vars)
|
@@ -635,7 +636,7 @@ The keys that are defined for mhc-calendar-mode are:
|
|
635
636
|
(defun mhc-calendar (&optional date)
|
636
637
|
"Display 3-month mini calendar."
|
637
638
|
(interactive)
|
638
|
-
(setq date (or date (mhc-current-date) (mhc-calendar-get-date)))
|
639
|
+
(setq date (or date (mhc-summary-current-date) (mhc-calendar-get-date)))
|
639
640
|
(when (and (get-buffer mhc-calendar/buffer) (set-buffer mhc-calendar/buffer))
|
640
641
|
(setq date (or date mhc-calendar-view-date))
|
641
642
|
(unless (mhc-date-yymm= date mhc-calendar-date)
|
@@ -1530,8 +1531,8 @@ The keys that are defined for mhc-calendar-mode are:
|
|
1530
1531
|
mhc-calendar/hnf-ignore-categories))
|
1531
1532
|
(setq lst (cdr lst))))
|
1532
1533
|
(with-temp-buffer
|
1533
|
-
(insert-file-contents-as-coding-system
|
1534
|
-
|
1534
|
+
(mhc-insert-file-contents-as-coding-system
|
1535
|
+
mhc-default-coding-system mhcfile)
|
1535
1536
|
(mhc-header-decode-ewords)
|
1536
1537
|
(mhc-header-narrowing
|
1537
1538
|
(setq cats (mhc-header-get-value "x-sc-category"))
|
data/emacs/mhc-calfw.el
CHANGED
@@ -113,8 +113,8 @@
|
|
113
113
|
(if schedule
|
114
114
|
(cfw:details-popup
|
115
115
|
(with-temp-buffer
|
116
|
-
(insert-file-contents-as-coding-system
|
117
|
-
|
116
|
+
(mhc-insert-file-contents-as-coding-system
|
117
|
+
mhc-default-coding-system
|
118
118
|
(mhc-record-name (mhc-schedule-record schedule)))
|
119
119
|
(mhc-calendar/view-file-decode-header)
|
120
120
|
(buffer-string)
|
data/emacs/mhc-date.el
CHANGED
@@ -89,6 +89,13 @@
|
|
89
89
|
(defmacro mhc-time-to-string (time)
|
90
90
|
`(mhc-time-let ,time (format "%02d:%02d" hh mm)))
|
91
91
|
|
92
|
+
(defun mhc-time-range-to-string (time-range)
|
93
|
+
(let ((time1 (nth 0 time-range))
|
94
|
+
(time2 (nth 1 time-range)))
|
95
|
+
(concat
|
96
|
+
(if time1 (mhc-time-to-string time1))
|
97
|
+
(if time2 (concat "-" (mhc-time-to-string time2))))))
|
98
|
+
|
92
99
|
(defsubst mhc-time-to-list (time)
|
93
100
|
(list (mhc-time-HH time)
|
94
101
|
(mhc-time-MM time)))
|
data/emacs/mhc-db.el
CHANGED
@@ -32,7 +32,7 @@
|
|
32
32
|
|
33
33
|
(defun mhc-db-search (&rest query)
|
34
34
|
(let ((b (mhc-date-new 1970 1 1))
|
35
|
-
(e (mhc-date-yy
|
35
|
+
(e (mhc-date-yy+ (mhc-date-now) 10)))
|
36
36
|
(mhc-db-scan b e nil nil (mhc-db/query-to-search-string query))))
|
37
37
|
|
38
38
|
(defun mhc-db/quote-string (string)
|
@@ -42,7 +42,7 @@
|
|
42
42
|
(format "%s" keyword))
|
43
43
|
|
44
44
|
(defun mhc-db/query-to-search-string (query)
|
45
|
-
(let ((keywords '(:subject :body :category)) string)
|
45
|
+
(let ((keywords '(:subject :body :category :recurrence_tag)) string)
|
46
46
|
(mapconcat 'identity
|
47
47
|
(delq nil
|
48
48
|
(mapcar
|
data/emacs/mhc-draft.el
CHANGED
@@ -68,8 +68,6 @@ these fields are set to the draft after import TEMPLATE."
|
|
68
68
|
(mhc-draft-setup-new)
|
69
69
|
(mhc-draft-delete-garbage-headers)
|
70
70
|
(mhc-draft-setup-headers preset-fields)
|
71
|
-
;; remove end of message marker
|
72
|
-
(mhc-draft-remove-tailers)
|
73
71
|
(mhc-draft-mode)
|
74
72
|
(switch-to-buffer draft-buffer t)
|
75
73
|
(goto-char (point-min)))))
|
data/emacs/mhc-message.el
CHANGED
@@ -30,6 +30,23 @@
|
|
30
30
|
|
31
31
|
(defvar mhc-message-end-of-messge-marker "[End of message]")
|
32
32
|
|
33
|
+
(defun mhc-message/remove-overlay (overlay-property)
|
34
|
+
"Remove OVERLAY-PROPERTY from current buffer."
|
35
|
+
(dolist (ovl (overlays-in (point-max) (point-max)))
|
36
|
+
(if (overlay-get ovl overlay-property)
|
37
|
+
(delete-overlay ovl))))
|
38
|
+
|
39
|
+
(defun mhc-message/insert-end-mark ()
|
40
|
+
"Insert end of message mark."
|
41
|
+
(let ((end-mark (make-overlay (point-max) (point-max) nil t t))
|
42
|
+
(end-text mhc-message-end-of-messge-marker))
|
43
|
+
;; Delete any previous markers.
|
44
|
+
(mhc-message/remove-overlay 'mhc-eom-overlay)
|
45
|
+
;; Add a new marker.
|
46
|
+
(mhc-face-put end-text 'mhc-message-face-eof-marker)
|
47
|
+
(overlay-put end-mark 'mhc-eom-overlay t)
|
48
|
+
(overlay-put end-mark 'after-string end-text)))
|
49
|
+
|
33
50
|
(define-derived-mode mhc-message-mode
|
34
51
|
text-mode
|
35
52
|
"MHC-Msg"
|
@@ -37,12 +54,8 @@
|
|
37
54
|
(save-excursion
|
38
55
|
(mhc-header-decode-ewords)
|
39
56
|
(goto-char (point-max))
|
40
|
-
(unless (
|
41
|
-
|
42
|
-
(- (point) (length mhc-message-end-of-messge-marker))
|
43
|
-
t)
|
44
|
-
(unless (bolp) (insert "\n"))
|
45
|
-
(insert mhc-message-end-of-messge-marker))
|
57
|
+
(unless (bolp) (insert "\n"))
|
58
|
+
(mhc-message/insert-end-mark)
|
46
59
|
(mhc-highlight-message))
|
47
60
|
;; (setq mhc-message-mode-called-count (1+ mhc-message-mode-called-count))
|
48
61
|
;; (message "mhc-message-mode-called-count: %d" mhc-message-mode-called-count)
|
data/emacs/mhc-misc.el
CHANGED
@@ -212,6 +212,26 @@
|
|
212
212
|
(sit-for 0)
|
213
213
|
pass))))
|
214
214
|
|
215
|
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
216
|
+
;; Window stack
|
217
|
+
|
218
|
+
(defvar mhc-misc-window-stack nil)
|
219
|
+
|
220
|
+
(defun mhc-misc-window-push ()
|
221
|
+
(interactive)
|
222
|
+
(setq mhc-misc-window-stack
|
223
|
+
(cons (current-window-configuration) mhc-misc-window-stack)))
|
224
|
+
|
225
|
+
(defun mhc-misc-window-pop ()
|
226
|
+
(interactive)
|
227
|
+
(if mhc-misc-window-stack
|
228
|
+
(set-window-configuration (car-safe mhc-misc-window-stack)))
|
229
|
+
(setq mhc-misc-window-stack (cdr-safe mhc-misc-window-stack)))
|
230
|
+
|
231
|
+
(defalias 'mhc-window-push 'mhc-misc-window-push)
|
232
|
+
(defalias 'mhc-window-pop 'mhc-misc-window-pop)
|
233
|
+
|
234
|
+
|
215
235
|
(eval-and-compile
|
216
236
|
(autoload 'rfc2047-decode-string "rfc2047"))
|
217
237
|
(defalias 'mhc-misc-decode-eword-string 'rfc2047-decode-string)
|
data/emacs/mhc-parse.el
CHANGED
@@ -250,6 +250,13 @@
|
|
250
250
|
(mhc-parse-buffer (mhc-record-new filename))))
|
251
251
|
|
252
252
|
|
253
|
+
(defun mhc-parse-string (string)
|
254
|
+
"Parse schedules headers in the file, STRING."
|
255
|
+
(with-current-buffer
|
256
|
+
(mhc-get-buffer-create " *mhc-parse-file*")
|
257
|
+
(delete-region (point-min) (point-max))
|
258
|
+
(insert string)
|
259
|
+
(mhc-parse-buffer)))
|
253
260
|
|
254
261
|
(provide 'mhc-parse)
|
255
262
|
|
data/emacs/mhc-summary.el
CHANGED
@@ -280,8 +280,8 @@ If optional argument FOR-DRAFT is non-nil, Hilight message as draft message."
|
|
280
280
|
(let ((buffer-read-only nil))
|
281
281
|
(goto-char (point-min))
|
282
282
|
(erase-buffer)
|
283
|
-
|
284
|
-
|
283
|
+
(mhc-insert-file-contents-as-coding-system
|
284
|
+
mhc-default-coding-system file)
|
285
285
|
(mhc-header-narrowing
|
286
286
|
(mhc-header-delete-header
|
287
287
|
"^\\(Content-.*\\|Mime-Version\\|User-Agent\\):" 'regexp))
|
@@ -559,8 +559,8 @@ If BANNER is set, it is printed on the horizontal line."
|
|
559
559
|
(defmacro mhc-line-inserter-setup (inserter format alist)
|
560
560
|
`(let (byte-compile-warnings)
|
561
561
|
(setq ,inserter
|
562
|
-
|
563
|
-
|
562
|
+
(byte-compile
|
563
|
+
(list 'lambda ()
|
564
564
|
(mhc-line-parse-format ,format ,alist))))
|
565
565
|
(when (get-buffer "*Compile-Log*")
|
566
566
|
(bury-buffer "*Compile-Log*"))
|
@@ -588,8 +588,8 @@ If BANNER is set, it is printed on the horizontal line."
|
|
588
588
|
(defun mhc-summary-line-insert ()
|
589
589
|
"Insert summary line."
|
590
590
|
(let ((mhc-tmp-day-face (cond
|
591
|
-
((mhc-
|
592
|
-
mhc-tmp-
|
591
|
+
((mhc-day-holiday
|
592
|
+
mhc-tmp-dayinfo)
|
593
593
|
'mhc-category-face-holiday)
|
594
594
|
((eq (mhc-day-day-of-week
|
595
595
|
mhc-tmp-dayinfo) 0)
|
@@ -622,7 +622,7 @@ If BANNER is set, it is printed on the horizontal line."
|
|
622
622
|
(define-key mhc-summary-mode-map "P" 'mhc-goto-prev-year)
|
623
623
|
|
624
624
|
(define-key mhc-summary-mode-map "s" 'mhc-rescan-month)
|
625
|
-
(define-key mhc-summary-mode-map "
|
625
|
+
(define-key mhc-summary-mode-map "D" 'mhc-delete)
|
626
626
|
(define-key mhc-summary-mode-map "c" 'mhc-set-default-category)
|
627
627
|
(define-key mhc-summary-mode-map "?" 'mhc-calendar)
|
628
628
|
(define-key mhc-summary-mode-map "t" 'mhc-calendar-toggle-insert-rectangle)
|
@@ -658,6 +658,32 @@ If BANNER is set, it is printed on the horizontal line."
|
|
658
658
|
(use-local-map mhc-summary-mode-map)
|
659
659
|
(run-hooks 'mhc-summary-mode-hook))
|
660
660
|
|
661
|
+
(defun mhc-summary-buffer-p (&optional buffer)
|
662
|
+
(if buffer
|
663
|
+
(set-buffer buffer))
|
664
|
+
mhc-summary-buffer-current-date-month)
|
665
|
+
|
666
|
+
(defun mhc-summary-current-date ()
|
667
|
+
(when (mhc-summary-buffer-p)
|
668
|
+
(let ((dayinfo (get-text-property (point) 'mhc-dayinfo)))
|
669
|
+
(or (and dayinfo (mhc-day-date dayinfo))
|
670
|
+
(save-excursion
|
671
|
+
(end-of-line)
|
672
|
+
(while (and (not (bobp))
|
673
|
+
(null dayinfo))
|
674
|
+
(or (setq dayinfo (get-text-property (point) 'mhc-dayinfo))
|
675
|
+
(forward-char -1)))
|
676
|
+
(and dayinfo (mhc-day-date dayinfo)))))))
|
677
|
+
|
678
|
+
(defvar mhc-summary-buffer-current-date-month nil
|
679
|
+
"Indicate summary buffer's month. It is also used by mhc-summary-buffer-p")
|
680
|
+
(make-variable-buffer-local 'mhc-summary-buffer-current-date-month)
|
681
|
+
|
682
|
+
(defun mhc-summary-current-date-month ()
|
683
|
+
mhc-summary-buffer-current-date-month)
|
684
|
+
(defalias 'mhc-current-date-month 'mhc-summary-current-date-month)
|
685
|
+
|
686
|
+
|
661
687
|
(defun mhc-summary-display-message ()
|
662
688
|
(interactive)
|
663
689
|
(save-selected-window
|
data/emacs/mhc-vars.el
CHANGED
data/emacs/mhc.el
CHANGED
@@ -1,9 +1,12 @@
|
|
1
|
-
;;; mhc.el ---
|
1
|
+
;;; mhc.el --- Message Harmonized Calendaring system.
|
2
2
|
|
3
|
+
;; Description: Message Harmonized Calendaring system.
|
3
4
|
;; Author: Yoshinari Nomura <nom@quickhack.net>
|
4
|
-
;;
|
5
|
-
;;
|
6
|
-
;;
|
5
|
+
;; Created: 1994-07-04
|
6
|
+
;; Version: 1.0.4
|
7
|
+
;; Keywords: calendar
|
8
|
+
;; URL: http://www.quickhack.net/mhc
|
9
|
+
;; Package-Requires: ((calfw "20150703"))
|
7
10
|
|
8
11
|
;;;
|
9
12
|
;;; Commentary:
|
@@ -487,10 +490,6 @@ If HIDE-PRIVATE, private schedules are suppressed."
|
|
487
490
|
|
488
491
|
(defvar mhc-face-week-color-paint-thick nil)
|
489
492
|
|
490
|
-
(defvar mhc-summary-buffer-current-date-month nil
|
491
|
-
"Indicate summary buffer's month. It is also used by mhc-summary-buffer-p")
|
492
|
-
(make-variable-buffer-local 'mhc-summary-buffer-current-date-month)
|
493
|
-
|
494
493
|
(defun mhc-expand-date-scope-backward (date scope)
|
495
494
|
"Expand date scope backward involving the whole first week of month.
|
496
495
|
DATE can be any date of the target month.
|
@@ -572,6 +571,14 @@ If SUBJECT-ONLY is non-nil, it will search only on X-SC-Subject:"
|
|
572
571
|
(message "No match")
|
573
572
|
(mhc-scan match))))
|
574
573
|
|
574
|
+
(defun mhc-search-recurrence (recurrence-tag)
|
575
|
+
"Search events by RECURRENCE-TAG."
|
576
|
+
(interactive "sSearch recurrence-tag: ")
|
577
|
+
(let* ((match (mhc-db-search :recurrence_tag recurrence-tag)))
|
578
|
+
(if (null match)
|
579
|
+
(message "No match")
|
580
|
+
(mhc-scan match))))
|
581
|
+
|
575
582
|
(defun mhc-scan (events &optional insert-current-buffer clip-from clip-to)
|
576
583
|
"Create mhc-summary buffer using EVENTS list.
|
577
584
|
If INSERT-CURRENT-BUFFER is non-nil, insert contents in the current buffer.
|
@@ -607,7 +614,7 @@ Returns t if the importation was succeeded."
|
|
607
614
|
(list (get-buffer (read-buffer "Import buffer: "
|
608
615
|
(current-buffer))))))
|
609
616
|
(let ((draft-buffer (generate-new-buffer mhc-draft-buffer-name))
|
610
|
-
(current-date (or (mhc-current-date) (mhc-calendar-get-date) (mhc-date-now)))
|
617
|
+
(current-date (or (mhc-summary-current-date) (mhc-calendar-get-date) (mhc-date-now)))
|
611
618
|
(succeed t)
|
612
619
|
msgp date time subject location category recurrence-tag priority alarm)
|
613
620
|
(and (called-interactively-p 'interactive)
|
@@ -632,7 +639,7 @@ Returns t if the importation was succeeded."
|
|
632
639
|
(condition-case ()
|
633
640
|
(if import-buffer
|
634
641
|
(progn
|
635
|
-
(delete-other-windows)
|
642
|
+
(delete-other-windows-vertically)
|
636
643
|
(goto-char (point-min))
|
637
644
|
(if (y-or-n-p "Do you want to import this article? ")
|
638
645
|
(let* ((original (with-current-buffer
|
@@ -762,13 +769,7 @@ Returns t if the importation was succeeded."
|
|
762
769
|
(mhc-date-format day "%04d%02d%02d" yy mm dd))
|
763
770
|
date " ")
|
764
771
|
"\nX-SC-Time: "
|
765
|
-
(
|
766
|
-
(let ((begin (car time))
|
767
|
-
(end (nth 1 time)))
|
768
|
-
(concat
|
769
|
-
(if begin (mhc-time-to-string begin) "")
|
770
|
-
(if end (concat "-" (mhc-time-to-string end)) "")))
|
771
|
-
"")
|
772
|
+
(mhc-time-range-to-string time)
|
772
773
|
"\nX-SC-Category: "
|
773
774
|
(mapconcat (function capitalize) category " ")
|
774
775
|
"\nX-SC-Priority: " (if priority
|
@@ -842,7 +843,7 @@ the default action of this command is changed to the latter."
|
|
842
843
|
(mhc-record-subject-as-string record)))))
|
843
844
|
(mhc-db-add-exception-rule
|
844
845
|
record
|
845
|
-
(or (mhc-current-date)
|
846
|
+
(or (mhc-summary-current-date)
|
846
847
|
(mhc-calendar-view-date)))
|
847
848
|
(mhc-db-delete-file record))
|
848
849
|
(or (and (mhc-summary-buffer-p)
|
@@ -856,12 +857,18 @@ the default action of this command is changed to the latter."
|
|
856
857
|
(let ((date-list (mapconcat
|
857
858
|
(lambda (day)
|
858
859
|
(mhc-date-format day "%04d%02d%02d" yy mm dd))
|
859
|
-
(mhc-input-day "Date: " (mhc-current-date))
|
860
|
-
" "))
|
860
|
+
(mhc-input-day "Date: " (mhc-summary-current-date))
|
861
|
+
" "))
|
862
|
+
(time-list (mhc-time-range-to-string
|
863
|
+
(mhc-input-time "Time: "
|
864
|
+
(mhc-schedule-time-as-string
|
865
|
+
(car (mhc-record-schedules
|
866
|
+
(mhc-parse-string (mhc-draft-template)))))))))
|
861
867
|
(mhc-window-push)
|
862
868
|
(mhc-draft-new (mhc-draft-template)
|
863
869
|
`(("x-sc-record-id" . ,(mhc-record-create-id))
|
864
870
|
("x-sc-sequence" . 0)
|
871
|
+
("x-sc-time" . ,time-list)
|
865
872
|
("x-sc-day" . ,date-list)))))
|
866
873
|
|
867
874
|
(defun mhc-reuse-copy ()
|
@@ -871,8 +878,8 @@ the default action of this command is changed to the latter."
|
|
871
878
|
(record (mhc-summary-record)))
|
872
879
|
(if (and (stringp file) (file-exists-p file))
|
873
880
|
(with-temp-buffer
|
874
|
-
|
875
|
-
|
881
|
+
(mhc-insert-file-contents-as-coding-system
|
882
|
+
mhc-default-coding-system file)
|
876
883
|
(mhc-header-decode-ewords)
|
877
884
|
(mhc-draft-store-template
|
878
885
|
(buffer-substring-no-properties (point-min) (point-max)))
|
@@ -926,54 +933,11 @@ the default action of this command is changed to the latter."
|
|
926
933
|
(message "Specified file(%s) does not exist." file)))
|
927
934
|
|
928
935
|
|
929
|
-
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
930
|
-
;;
|
931
|
-
;; Window stack
|
932
|
-
;;
|
933
|
-
|
934
|
-
(defvar mhc-window-stack nil)
|
935
|
-
|
936
|
-
(defun mhc-window-push ()
|
937
|
-
(interactive)
|
938
|
-
(setq mhc-window-stack
|
939
|
-
(cons (current-window-configuration) mhc-window-stack)))
|
940
|
-
|
941
|
-
(defun mhc-window-pop ()
|
942
|
-
(interactive)
|
943
|
-
(if mhc-window-stack
|
944
|
-
(set-window-configuration (car-safe mhc-window-stack)))
|
945
|
-
(setq mhc-window-stack (cdr-safe mhc-window-stack)))
|
946
|
-
|
947
936
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
948
937
|
;;
|
949
938
|
;; (Category . (parent-face fg bg))
|
950
939
|
;;
|
951
940
|
|
952
|
-
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
953
|
-
;; manipulate data from mhc-summary-buffer.
|
954
|
-
|
955
|
-
(defconst mhc-summary-day-regex "\\([^|]+| +\\)?[0-9]+/\\([0-9]+\\)")
|
956
|
-
|
957
|
-
(defun mhc-summary-buffer-p (&optional buffer)
|
958
|
-
(if buffer
|
959
|
-
(set-buffer buffer))
|
960
|
-
mhc-summary-buffer-current-date-month)
|
961
|
-
|
962
|
-
(defun mhc-current-date ()
|
963
|
-
(when (mhc-summary-buffer-p)
|
964
|
-
(let ((dayinfo (get-text-property (point) 'mhc-dayinfo)))
|
965
|
-
(or (and dayinfo (mhc-day-date dayinfo))
|
966
|
-
(save-excursion
|
967
|
-
(end-of-line)
|
968
|
-
(while (and (not (bobp))
|
969
|
-
(null dayinfo))
|
970
|
-
(or (setq dayinfo (get-text-property (point) 'mhc-dayinfo))
|
971
|
-
(forward-char -1)))
|
972
|
-
(and dayinfo (mhc-day-date dayinfo)))))))
|
973
|
-
|
974
|
-
(defun mhc-current-date-month ()
|
975
|
-
mhc-summary-buffer-current-date-month)
|
976
|
-
|
977
941
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
978
942
|
;; misc.
|
979
943
|
|
data/lib/mhc/event.rb
CHANGED
@@ -95,6 +95,14 @@ module Mhc
|
|
95
95
|
return @categories = categories.parse(string)
|
96
96
|
end
|
97
97
|
|
98
|
+
def holiday?
|
99
|
+
in_category?("holiday")
|
100
|
+
end
|
101
|
+
|
102
|
+
def in_category?(category)
|
103
|
+
categories.map{|c| c.to_s.downcase}.member?(category.downcase)
|
104
|
+
end
|
105
|
+
|
98
106
|
## description
|
99
107
|
def description
|
100
108
|
unless @description
|
data/lib/mhc/formatter.rb
CHANGED
@@ -77,7 +77,7 @@ module Mhc
|
|
77
77
|
|
78
78
|
def format_header(context); ""; end
|
79
79
|
def format_footer(context); ""; end
|
80
|
-
def format_day_header(context, date); ""; end
|
80
|
+
def format_day_header(context, date, is_holiday); ""; end
|
81
81
|
def format_day_footer(context, date); ""; end
|
82
82
|
|
83
83
|
def format_body(context)
|
@@ -86,7 +86,7 @@ module Mhc
|
|
86
86
|
end
|
87
87
|
|
88
88
|
def format_day(context, date, items)
|
89
|
-
string = format_day_header(context, date)
|
89
|
+
string = format_day_header(context, date, items.any?{|e| e.holiday?})
|
90
90
|
|
91
91
|
items = sort_items_in_day(items)
|
92
92
|
items.each_with_index do |occurrence, count|
|
@@ -176,7 +176,7 @@ module Mhc
|
|
176
176
|
def format_header(context); "("; end
|
177
177
|
def format_footer(context); "(periods #{@periods}))\n"; end
|
178
178
|
|
179
|
-
def format_day_header(context, date)
|
179
|
+
def format_day_header(context, date, is_holiday)
|
180
180
|
date.strftime("((%2m %2d %Y) . (")
|
181
181
|
end
|
182
182
|
|
@@ -218,9 +218,9 @@ module Mhc
|
|
218
218
|
def format_header(context); "("; end
|
219
219
|
def format_footer(context); ")\n"; end
|
220
220
|
|
221
|
-
def format_day_header(context, date)
|
221
|
+
def format_day_header(context, date, is_holiday)
|
222
222
|
# (DAYS_FROM_EPOC . [year month day wday holiday-p (
|
223
|
-
format("(%d . [%d %d %d %d nil (", date.absolute_from_epoch, date.year, date.month, date.day, date.wday)
|
223
|
+
format("(%d . [%d %d %d %d #{is_holiday ? 't' : 'nil'} (", date.absolute_from_epoch, date.year, date.month, date.day, date.wday)
|
224
224
|
end
|
225
225
|
|
226
226
|
def format_item(context, date, item)
|
data/lib/mhc/occurrence.rb
CHANGED
@@ -44,6 +44,10 @@ module Mhc
|
|
44
44
|
|
45
45
|
def self.parse_range(range_string)
|
46
46
|
case range_string
|
47
|
+
# all
|
48
|
+
when /^all$/
|
49
|
+
return self.parse("19700101")..self.today + 365*10 # 10 years ahead
|
50
|
+
|
47
51
|
# yyyymmdd-yyyymmdd
|
48
52
|
when /^([^+-]+)-([^+-]+)$/
|
49
53
|
return parse_relative($1)..parse_relative($2)
|
data/lib/mhc/version.rb
CHANGED
data/mhc.gemspec
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
# coding: utf-8
|
2
2
|
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
git = File.expand_path('../.git', __FILE__)
|
3
4
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
5
|
require 'mhc/version'
|
5
6
|
|
@@ -13,7 +14,11 @@ Gem::Specification.new do |spec|
|
|
13
14
|
spec.homepage = "http://www.quickhack.net/mhc"
|
14
15
|
spec.license = "BSD"
|
15
16
|
|
16
|
-
spec.files =
|
17
|
+
spec.files = if Dir.exist?(git)
|
18
|
+
`git ls-files -z`.split("\x0")
|
19
|
+
else
|
20
|
+
Dir['**/*']
|
21
|
+
end
|
17
22
|
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
23
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
24
|
spec.require_paths = ["lib"]
|
@@ -1,18 +1,19 @@
|
|
1
1
|
##
|
2
2
|
## Japanese Holidays
|
3
3
|
##
|
4
|
-
## Place this as
|
4
|
+
## Place this as REPOSITORY/presets/japanese-holidays.mhcc
|
5
5
|
##
|
6
6
|
|
7
7
|
X-SC-Subject: 元日
|
8
8
|
X-SC-Category: Holiday Japanese
|
9
|
+
X-SC-Duration: 19480101-
|
9
10
|
X-SC-Cond: 1 Jan
|
10
11
|
X-SC-Record-Id: E2BAB555-3CEB-4508-96AD-1B59AA24ADC3
|
11
12
|
|
12
13
|
X-SC-Subject: 成人の日
|
13
14
|
X-SC-Category: Holiday Japanese
|
14
15
|
X-SC-Cond: 15 Jan
|
15
|
-
X-SC-Duration: -19990115
|
16
|
+
X-SC-Duration: 19480115-19990115
|
16
17
|
X-SC-Record-Id: EA9F4BA5-7D5A-4794-AFB3-6AB68FCA9719
|
17
18
|
|
18
19
|
X-SC-Subject: 成人の日
|
@@ -24,12 +25,19 @@ X-SC-Record-Id: 0BC2CBD0-D81E-4315-B9A8-E112C8E3DC1C
|
|
24
25
|
X-SC-Subject: 建国記念の日
|
25
26
|
X-SC-Category: Holiday Japanese
|
26
27
|
X-SC-Cond: 11 Feb
|
28
|
+
X-SC-Duration: 19670211-
|
27
29
|
X-SC-Record-Id: AC1B378C-BAFE-4B6E-AF9C-78C2377E8AA4
|
28
30
|
|
31
|
+
X-SC-Subject: 天皇誕生日
|
32
|
+
X-SC-Category: Holiday Japanese
|
33
|
+
X-SC-Cond: 29 Apr
|
34
|
+
X-SC-Duration: 19480429-19980429
|
35
|
+
X-SC-Record-Id: B78EAAEE-9963-4573-9EC7-0879F8940AEE
|
36
|
+
|
29
37
|
X-SC-Subject: みどりの日
|
30
38
|
X-SC-Category: Holiday Japanese
|
31
39
|
X-SC-Cond: 29 Apr
|
32
|
-
X-SC-Duration: -20060429
|
40
|
+
X-SC-Duration: 19890429-20060429
|
33
41
|
X-SC-Record-Id: B78EAAEE-9963-4573-9EC7-0879F8940AEE
|
34
42
|
|
35
43
|
X-SC-Subject: 昭和の日
|
@@ -41,14 +49,9 @@ X-SC-Record-Id: A458E14C-960C-4F01-AF73-8ACB1B51A6A1
|
|
41
49
|
X-SC-Subject: 憲法記念日
|
42
50
|
X-SC-Category: Holiday Japanese
|
43
51
|
X-SC-Cond: 3 May
|
52
|
+
X-SC-Duration: 19480503-
|
44
53
|
X-SC-Record-Id: BA89778E-E8CC-4588-B5C3-56F86483DEC1
|
45
54
|
|
46
|
-
X-SC-Subject: 国民の休日
|
47
|
-
X-SC-Category: Holiday Japanese
|
48
|
-
X-SC-Cond: 4 May
|
49
|
-
X-SC-Duration: -20060504
|
50
|
-
X-SC-Record-Id: 46953810-BD72-45DE-BC11-104CBE970CFF
|
51
|
-
|
52
55
|
X-SC-Subject: みどりの日
|
53
56
|
X-SC-Category: Holiday Japanese
|
54
57
|
X-SC-Cond: 4 May
|
@@ -58,12 +61,13 @@ X-SC-Record-Id: 47938EDA-41A5-4E51-BDCB-2D3B60F49D71
|
|
58
61
|
X-SC-Subject: こどもの日
|
59
62
|
X-SC-Category: Holiday Japanese
|
60
63
|
X-SC-Cond: 5 May
|
64
|
+
X-SC-Duration: 19480505-
|
61
65
|
X-SC-Record-Id: 4AE5568A-2DFE-4B6B-92E5-C4BFADFB2CCF
|
62
66
|
|
63
67
|
X-SC-Subject: 海の日
|
64
68
|
X-SC-Category: Holiday Japanese
|
65
69
|
X-SC-Cond: 20 Jul
|
66
|
-
X-SC-Duration: -20020720
|
70
|
+
X-SC-Duration: 19960720-20020720
|
67
71
|
X-SC-Record-Id: 5E03776A-4280-4337-85C0-F1322A3AAE6E
|
68
72
|
|
69
73
|
X-SC-Subject: 海の日
|
@@ -72,22 +76,28 @@ X-SC-Cond: 3rd Mon Jul
|
|
72
76
|
X-SC-Duration: 20030701-
|
73
77
|
X-SC-Record-Id: BD4156C2-5546-4146-8297-09CF4210A346
|
74
78
|
|
79
|
+
X-SC-Subject: 山の日
|
80
|
+
X-SC-Category: Holiday Japanese
|
81
|
+
X-SC-Cond: 11 Aug
|
82
|
+
X-SC-Duration: 20160811-
|
83
|
+
X-SC-Record-Id: FC7C481B-7BF5-4639-B700-3B60CB99E05D
|
84
|
+
|
75
85
|
X-SC-Subject: 敬老の日
|
76
86
|
X-SC-Category: Holiday Japanese
|
77
87
|
X-SC-Cond: 15 Sep
|
78
|
-
X-SC-Duration: -20020915
|
88
|
+
X-SC-Duration: 19660915-20020915
|
79
89
|
X-SC-Record-Id: 29BC6E4E-0D70-4EF8-8AF0-7000254D3CDB
|
80
90
|
|
81
91
|
X-SC-Subject: 敬老の日
|
82
92
|
X-SC-Category: Holiday Japanese
|
83
93
|
X-SC-Cond: 3rd Mon Sep
|
84
|
-
X-SC-Duration:
|
94
|
+
X-SC-Duration: 20030915-
|
85
95
|
X-SC-Record-Id: F303C1C9-01B0-437C-A2E2-BCD1ADD901F2
|
86
96
|
|
87
97
|
X-SC-Subject: 体育の日
|
88
98
|
X-SC-Category: Holiday Japanese
|
89
99
|
X-SC-Cond: 10 Oct
|
90
|
-
X-SC-Duration: -19991010
|
100
|
+
X-SC-Duration: 19661010-19991010
|
91
101
|
X-SC-Record-Id: AFABC42C-2E9D-4093-A4AF-DA12D4D4B9D7
|
92
102
|
|
93
103
|
X-SC-Subject: 体育の日
|
@@ -99,16 +109,19 @@ X-SC-Record-Id: C17D9CA5-28AF-4826-AD33-8B75473E5B52
|
|
99
109
|
X-SC-Subject: 文化の日
|
100
110
|
X-SC-Category: Holiday Japanese
|
101
111
|
X-SC-Cond: 3 Nov
|
112
|
+
X-SC-Duration: 19481103-
|
102
113
|
X-SC-Record-Id: A76779D2-BB44-4ED5-ACF9-B646E10C7313
|
103
114
|
|
104
115
|
X-SC-Subject: 勤労感謝の日
|
105
116
|
X-SC-Category: Holiday Japanese
|
106
117
|
X-SC-Cond: 23 Nov
|
118
|
+
X-SC-Duration: 19481123-
|
107
119
|
X-SC-Record-Id: 97E6F125-2625-44A9-8D43-A6FCA9670D8D
|
108
120
|
|
109
121
|
X-SC-Subject: 天皇誕生日
|
110
122
|
X-SC-Category: Holiday Japanese
|
111
123
|
X-SC-Cond: 23 Dec
|
124
|
+
X-SC-Duration: 19891223-
|
112
125
|
X-SC-Record-Id: 51D42B0D-EF46-4D65-B62A-6ED2F0D1F0B5
|
113
126
|
|
114
127
|
## 毎年変わる祝日と振替休日
|
@@ -134,20 +147,36 @@ X-SC-Category: Holiday Japanese
|
|
134
147
|
X-SC-Record-Id: 54A339AD-F7FD-4E56-9B70-2D09F840E94D
|
135
148
|
|
136
149
|
X-SC-Subject: 振替休日
|
137
|
-
X-SC-Day:
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
150
|
+
X-SC-Day: 19730430 19730924 19740506 19740916 19741104 19751124
|
151
|
+
19761011 19780102 19780116 19790212 19790430 19801124 19810504
|
152
|
+
19820322 19821011 19840102 19840116 19840430 19840924 19850506
|
153
|
+
19850916 19851104 19861124 19870504 19880321 19890102 19890116
|
154
|
+
19900212 19900430 19900924 19901224 19910506 19910916 19911104
|
155
|
+
19920504 19931011 19950102 19950116 19960212 19960506 19960916
|
156
|
+
19961104 19970721 19971124 19980504 19990322 19991011 20010212
|
157
|
+
20010430 20010924 20011224 20020506 20020916 20021104 20031124
|
158
|
+
20050321 20060102 20070212 20070430 20070924 20071224 20080506
|
159
|
+
20081124 20090506 20100322 20120102 20120430 20121224 20130506
|
143
160
|
20131104 20140506 20141124 20150506 20160321 20170102 20180212
|
144
|
-
20180430 20180924 20181224 20190506 20191104 20200506
|
145
|
-
20240212 20240506 20240923 20241104 20250506
|
146
|
-
20270322 20290212 20290430 20290924 20291224
|
147
|
-
20310506 20311124
|
161
|
+
20180430 20180924 20181224 20190506 20190812 20191104 20200506
|
162
|
+
20230102 20240212 20240506 20240812 20240923 20241104 20250506
|
163
|
+
20251124 20260506 20270322 20290212 20290430 20290924 20291224
|
164
|
+
20300506 20300812 20301104 20310506 20311124 20330321 20340102
|
165
|
+
20350212 20350430 20350924 20351224 20360506 20361124 20370506
|
166
|
+
20400102 20400430 20401224 20410506 20410812 20411104 20420506
|
167
|
+
20421124 20430506 20440321 20450102 20460212 20460430 20460924
|
168
|
+
20461224 20470506 20470812 20471104 20480506 20500321
|
148
169
|
X-SC-Category: Holiday Japanese
|
149
170
|
X-SC-Record-Id: E2D696DF-EB49-44D7-B06C-812B10BD99A2
|
150
171
|
|
172
|
+
X-SC-Subject: 国民の休日
|
173
|
+
X-SC-Category: Holiday Japanese
|
174
|
+
X-SC-Day: 19880504 19890504 19900504 19910504 19930504 19940504 19950504
|
175
|
+
19960504 19990504 20000504 20010504 20020504 20040504 20050504 20060504
|
176
|
+
20090922 20150922 20260922 20320921 20370922 20430922 20490921 20540922
|
177
|
+
20600921 20650922 20710922 20770921 20880921 20940921 20990922
|
178
|
+
X-SC-Record-Id: 46953810-BD72-45DE-BC11-104CBE970CFF
|
179
|
+
|
151
180
|
## Make sure you have at least one blank line for each entry (改行で終わる)
|
152
181
|
|
153
182
|
## EOF
|
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.0.
|
4
|
+
version: 1.0.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: 2015-
|
11
|
+
date: 2015-09-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|