olm 0.0.1 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -4
- data/lib/olm.rb +85 -35
- data/lib/olm/app.rb +183 -115
- data/olm.el +654 -334
- data/olm.gemspec +23 -23
- data/org-olm.el +71 -0
- metadata +4 -3
data/olm.gemspec
CHANGED
@@ -1,23 +1,23 @@
|
|
1
|
-
# coding: utf-8
|
2
|
-
lib = File.expand_path('../lib', __FILE__)
|
3
|
-
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
-
|
5
|
-
require 'olm'
|
6
|
-
|
7
|
-
Gem::Specification.new do |spec|
|
8
|
-
spec.name = "olm"
|
9
|
-
spec.version = Olm::VERSION
|
10
|
-
spec.authors = ["Takahiro Noda"]
|
11
|
-
spec.email = ["takahiro.noda+rubygems@gmail.com"]
|
12
|
-
spec.summary = %q{A glue library to
|
13
|
-
spec.description = %q{Olm is designed for reading and writing Outlook mail using the win32ole library and against Outlook 2007.}
|
14
|
-
spec.homepage = "https://github.com/tnoda/olm"
|
15
|
-
spec.license = "MIT"
|
16
|
-
spec.files = `git ls-files -z`.split("\x0")
|
17
|
-
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
|
-
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
|
-
spec.require_paths = ["lib"]
|
20
|
-
|
21
|
-
spec.add_development_dependency "bundler", "~> 1.6"
|
22
|
-
spec.add_development_dependency "rake"
|
23
|
-
end
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
|
5
|
+
require 'olm'
|
6
|
+
|
7
|
+
Gem::Specification.new do |spec|
|
8
|
+
spec.name = "olm"
|
9
|
+
spec.version = Olm::VERSION
|
10
|
+
spec.authors = ["Takahiro Noda"]
|
11
|
+
spec.email = ["takahiro.noda+rubygems@gmail.com"]
|
12
|
+
spec.summary = %q{A glue library to handle MS Outlook Mail.}
|
13
|
+
spec.description = %q{Olm is designed for reading and writing Outlook mail using the win32ole library and against Outlook 2007.}
|
14
|
+
spec.homepage = "https://github.com/tnoda/olm"
|
15
|
+
spec.license = "MIT"
|
16
|
+
spec.files = `git ls-files -z`.split("\x0")
|
17
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
|
+
spec.require_paths = ["lib"]
|
20
|
+
|
21
|
+
spec.add_development_dependency "bundler", "~> 1.6"
|
22
|
+
spec.add_development_dependency "rake"
|
23
|
+
end
|
data/org-olm.el
ADDED
@@ -0,0 +1,71 @@
|
|
1
|
+
;;; org-olm.el --- Org links to Outlook Mail messages
|
2
|
+
|
3
|
+
;; Copyright (C) 2014 Takahiro Noda
|
4
|
+
|
5
|
+
;; Author: Takahiro Noda <takahiro.noda+github@gmail.com>
|
6
|
+
;; Keywords: mail
|
7
|
+
|
8
|
+
;; This program is free software; you can redistribute it and/or modify
|
9
|
+
;; it under the terms of the GNU General Public License as published by
|
10
|
+
;; the Free Software Foundation, either version 3 of the License, or
|
11
|
+
;; (at your option) any later version.
|
12
|
+
|
13
|
+
;; This program is distributed in the hope that it will be useful,
|
14
|
+
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
15
|
+
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
16
|
+
;; GNU General Public License for more details.
|
17
|
+
|
18
|
+
;; You should have received a copy of the GNU General Public License
|
19
|
+
;; along with this program. If not, see <http://www.gnu.org/licenses/>.
|
20
|
+
|
21
|
+
;;; Commentary:
|
22
|
+
|
23
|
+
;; This file implements links to Outlook Mail messages from within Org mode.
|
24
|
+
;;
|
25
|
+
|
26
|
+
;;; Code:
|
27
|
+
|
28
|
+
(require 'org)
|
29
|
+
(require 'olm)
|
30
|
+
|
31
|
+
;;; Install the link type
|
32
|
+
(org-add-link-type "olm" 'org-olm-open)
|
33
|
+
(add-hook 'org-store-link-functions 'org-olm-store-link)
|
34
|
+
|
35
|
+
;;; Implementation
|
36
|
+
(defun org-olm-open (path)
|
37
|
+
"Follow an Outlook Mail message link specified by PATH."
|
38
|
+
(olm-open-message (org-no-properties path)))
|
39
|
+
|
40
|
+
(defun org-olm-store-link ()
|
41
|
+
"Store a link to an Outlook Mail message."
|
42
|
+
(or (org-olm-store-link-summary)
|
43
|
+
(org-olm-store-link-message)))
|
44
|
+
|
45
|
+
(defun org-olm-store-link-summary ()
|
46
|
+
(when (eq major-mode 'olm-summary-mode)
|
47
|
+
(org-store-link-props
|
48
|
+
:type "olm"
|
49
|
+
:link (concat "olm:" (olm-summary-message-entry-id))
|
50
|
+
:description (org-olm-store-link-description))))
|
51
|
+
|
52
|
+
(defun org-olm-store-link-message ()
|
53
|
+
(when (eq major-mode 'olm-message-mode)
|
54
|
+
(error "org-olm-store-link-message has not been implemented yet")))
|
55
|
+
|
56
|
+
(defun org-olm-store-link-description ()
|
57
|
+
(with-current-buffer (get-buffer "*olm-message*")
|
58
|
+
(save-excursion
|
59
|
+
(save-restriction
|
60
|
+
(let ((from (progn
|
61
|
+
(goto-char (point-min))
|
62
|
+
(re-search-forward "^From: *\\(.+\\)" nil t)
|
63
|
+
(match-string-no-properties 1)))
|
64
|
+
(subj (progn
|
65
|
+
(goto-char (point-min))
|
66
|
+
(re-search-forward "^Subject: *\\(.+\\)" nil t)
|
67
|
+
(match-string-no-properties 1))))
|
68
|
+
(concat "olm:" from "/" subj))))))
|
69
|
+
|
70
|
+
(provide 'org-olm)
|
71
|
+
;;; org-olm.el ends here
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: olm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Takahiro Noda
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-12-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -53,6 +53,7 @@ files:
|
|
53
53
|
- lib/olm/app.rb
|
54
54
|
- olm.el
|
55
55
|
- olm.gemspec
|
56
|
+
- org-olm.el
|
56
57
|
homepage: https://github.com/tnoda/olm
|
57
58
|
licenses:
|
58
59
|
- MIT
|
@@ -76,5 +77,5 @@ rubyforge_project:
|
|
76
77
|
rubygems_version: 2.0.14
|
77
78
|
signing_key:
|
78
79
|
specification_version: 4
|
79
|
-
summary: A glue library to
|
80
|
+
summary: A glue library to handle MS Outlook Mail.
|
80
81
|
test_files: []
|