-
Notifications
You must be signed in to change notification settings - Fork 2
/
README.ja
210 lines (146 loc) · 6.28 KB
/
README.ja
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
* infodrawer
:Author: WAKAYAMA Shirou <[email protected]> twitter: r_rudi
** これはなに
infodrawerは、指定の場所から情報を取得し、指定の場所に送ります。
現在以下の情報を取得できます。
- input
- Google Readerのスター
- Twitterである文字が使われていた場合
- TwitterのFavorites
これらの情報を、以下の場所に送れます。
- output
- instapaper
- evernote
- mail
infodrawerを定期的に実行する事で、自動的に情報を蓄えることができます。
** 必要なもの
- python (2.6 or later)
- feedparser (RSSパーサー)
- yaml
** 使い方
- 1. "conf.yaml.sample" に "conf.yaml" コピーします
- 2. conf.yamlを編集します
- 3. crontabを編集します
- 4. enjoy!
** 注意
- 特にgmailを利用したメール送信処理は重いです。従って、cronの実行間隔を10分以下にしないでください
** config fileの書き方
conf.yamlはUTF-8でなければ動作しません。
** input
*** input/Google Reader Starred
Google Readerのスターをつけたエントリを取得します。
例
>||
googlereader:
url: http:https://www.google.com/reader/public/atom/user/XXXXX/state/com.google/starred
||<
urlは、Google ReaderのスターのRSSを設定してください。
"設定" -> "リーダー設定" -> "フォルダとタグ" -> "スター付きアイテム"です。
スターは"公開"に設定してください。
*** input/Twitter
例
>||
twitter:
url: http:https://twitter.com/statuses/user_timeline/XXXXX.rss
keyword: "メモ"
||<
urlは、rssを設定してください。
"keyword"で設定した言葉が含まれているTwitterの呟きを取得します。もし、"keyword"が設定されていなければ、全部の呟きを取得します。
*** input/Twitter お気に入り
urlは、Twitterのお気に入りのRSSを設定してください。
>||
twitterfav:
url: http:https://twitter.com/favorites/XXXXX.rss
||<
*** output/Instapaper
Instapaperに登録します。
例
>||
instapaper:
username: [email protected]
password: xxXpasswordXxx
||<
instapaperのusernameとpasswordを設定してください。
*** output/mail
メールを送ります。
例:
>||
mail:
mail_addr: [email protected]
from_addr: [email protected] # if use gmail, replaced to the addr
insta: yes
subject: "[Drawer]"
smtp: localhost
use_gmail: no # if yes, smtp will be ignored
gmail_addr: [email protected]
gmail_pass: xxXgmailpassXxx
||<
送信先メールアドレスは以下のようにして複数の宛先を記入できます。
>||
mail_addr: [email protected], [email protected]
||<
SMTPサーバではなく、gmailを利用してメールを送りたい場合は、"use_gmail"をyesと変え、gmail_addrとgmail_passを記入してください。もし、"use_gmail"がyesの場合、smtpの設定は無視されます。また、fromアドレスはgmailのアドレスになります。
insta
yesの場合、Instpaper.comを利用して送信するHTMLを省略します。
subject
送るメールのsubjectの先頭につける文字列を指定できます。
*** output/Evernote
>||
evernote:
mail_addr: [email protected]
from_addr: [email protected] # if use gmail, replaced to the addr
note: "あとで"
insta: yes
tag: "infodrawer"
smtp: localhost
use_gmail: yes # if yes, smtp will be ignored
gmail_addr: [email protected]
gmail_pass: xxXgmailpassXxx
||<
メールとほぼ同じです。
note
保存するノートを指定できます。
tag
つけるタグを指定できます。タグは今のところ一つだけしかつけられません。
** License
2条項のNew BSD Licenseです。
Copyright 2010 [email protected]. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided
with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER ``AS IS'' AND ANY
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
The views and conclusions contained in the software and documentation
are those of the authors and should not be interpreted as representing
official policies, either expressed or implied, of [email protected].
** 謝辞
メールの送信部分は、以下のURLを参考にさせて頂きました。
ウノウラボのchihiro様に感謝します。
http:https://labs.unoh.net/2007/06/python_2.html
** 名前の由来
drawerの意味は引き出しですが、想像しているのはたんすです。
情報をタンスの肥やしにしてください(笑)
** 著作者の免責
(1) 著作者は本ソフトウェアを特定物として現存するままの状態で提
供します。本ソフトウェアが、直接又は間接的に損害を生じさせて
も、著作者は一切の責任を負いません。また、機器や媒体が原因
の損害につきましても、著作者は一切の責任を負いません。よっ
て、著作者は本ソフトウェアに関するいかなる保証も行いません。
さらに、本ソフトウェアを使用した結果の影響に関しましても、一切
責任を負わないものとします。
(2) 著作者は、バージョンアップ、不具合修正の義務を負いません。