Skip to content

Commit e9bdd4e

Browse files
committed
94 Documentation for plug-ins of user directory
1 parent d354e02 commit e9bdd4e

File tree

3 files changed

+201
-161
lines changed

3 files changed

+201
-161
lines changed

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,15 @@ When you start automatic ruby without argument -c option,
4949
the config/default.yml is called. You can use -c option for
5050
specify a file name.
5151

52+
The Recipe has an implicit naming convention.
53+
54+
``` html
55+
plugins:
56+
- module: MODULE_NAME
57+
config:
58+
VARIABLES
59+
```
60+
5261
For more info, refer to the document (doc/README).
5362

5463

doc/README

Lines changed: 101 additions & 82 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,11 @@ $ script/bootstrap
3535
If the ruby 1.8, necessary to manually install the gems in the Gemfile.
3636

3737

38-
===========
39-
Try running
40-
===========
38+
========
39+
Start Up
40+
========
4141

42-
To create (see below) of any recipe.
42+
To create of any recipe (see below).
4343
$ automatic -c your_recipe.yml
4444

4545
-c option to run with the manual. If there is no problem
@@ -52,6 +52,103 @@ this software.
5252
$ automatic -c config/feed2console.yml
5353

5454

55+
=======
56+
Recipes
57+
=======
58+
59+
Automatic Ruby parses configuration file that was written
60+
in the form of YAML which including variety of information
61+
of associated plug-ins.
62+
63+
This YAML file is called "Recipe".
64+
65+
When you start automatic ruby without argument -c option,
66+
the config/default.yml is called. You can use -c option for
67+
specify a file name.
68+
69+
[Example]
70+
$ automatic -c ~/recipes/your_recipe.yml
71+
72+
73+
=====================
74+
How to write a Recipe
75+
=====================
76+
77+
The Recipe has an implicit naming convention.
78+
79+
plugins:
80+
- module: MODULE_NAME
81+
config:
82+
VARIABLES
83+
84+
85+
The following is a sample of recipes and yaml files.
86+
87+
global:
88+
timezone: Asia/Tokyo
89+
cache:
90+
base: /tmp
91+
log:
92+
level: info
93+
94+
plugins:
95+
- module: SubscriptionFeed
96+
config:
97+
feeds:
98+
- http://example.com/rss2
99+
- http://hogefuga.com/feed
100+
101+
- module: FilterIgnore
102+
config:
103+
link:
104+
- hoge
105+
- fuga
106+
107+
- module: StorePermalink
108+
config:
109+
db: permalink.db
110+
111+
- module: PublishHatenaBookmark
112+
config:
113+
username: your_hatena_id
114+
password: your_password
115+
interval: 5
116+
117+
118+
In the case of sample this recipe.
119+
1. Subscribe to some RSS feeds.
120+
2. Feed ignore the keyword from the contains urls.
121+
3. Store permalink to database.
122+
4. Bookmarking to Hatena Bookmark.
123+
124+
(Hatena Bookmark is a most popular social bookmark service
125+
in Japan.)
126+
127+
These have been realized by a combination of plug-ins
128+
a series of processes.
129+
130+
In this way, by simply writing to the recipe and
131+
configuration information for plug-ins, free processing can
132+
be achieved by a combination of multiple plug-ins.
133+
134+
The possibility of infinite depending on the combination
135+
of plug-ins can be realized.
136+
137+
All depending on whether you make a plug-in looks like!
138+
139+
140+
=======
141+
Plug-in
142+
=======
143+
144+
Plug-ins from the plugins directory (see below) will be loaded.
145+
146+
If ~ /.automatic/plugins exists, is loaded into them as well.
147+
148+
Put your own plug-ins in your home directory.
149+
(How to make the plug-in will be described later)
150+
151+
55152
============================
56153
Directory and file structure
57154
============================
@@ -157,84 +254,6 @@ Directory and file structure
157254
This document.
158255

159256

160-
=======
161-
Recipes
162-
=======
163-
164-
Automatic Ruby parses configuration file that was written
165-
in the form of YAML which including variety of information
166-
of associated plug-ins.
167-
168-
This YAML file is called "Recipe".
169-
170-
When you start automatic ruby without argument -c option,
171-
the config/default.yml is called. You can use -c option for
172-
specify a file name.
173-
174-
[Example]
175-
$ automatic -c ~/recipes/your_recipe.yml
176-
177-
178-
=====================
179-
How to write a Recipe
180-
=====================
181-
182-
The Recipe has an implicit naming convention.
183-
The following is a sample of recipes and yaml files.
184-
185-
186-
global:
187-
timezone: Asia/Tokyo
188-
cache:
189-
base: /tmp
190-
log:
191-
level: info
192-
193-
plugins:
194-
- module: SubscriptionFeed
195-
config:
196-
feeds:
197-
- http://example.com/rss2
198-
- http://hogefuga.com/feed
199-
200-
- module: FilterIgnore
201-
config:
202-
link:
203-
- hoge
204-
- fuga
205-
206-
- module: StorePermalink
207-
config:
208-
db: permalink.db
209-
210-
- module: PublishHatenaBookmark
211-
config:
212-
username: your_hatena_id
213-
password: your_password
214-
interval: 5
215-
216-
217-
In the case of sample this recipe.
218-
1. Subscribe to some RSS feeds.
219-
2. Feed ignore the keyword from the contains urls.
220-
3. Store permalink to database.
221-
4. Bookmarking to Hatena Bookmark.
222-
223-
(Hatena Bookmark is a most popular social bookmark service
224-
in Japan.)
225-
226-
These have been realized by a combination of plug-ins
227-
a series of processes.
228-
229-
In this way, by simply writing to the recipe and
230-
configuration information for plug-ins, free processing can
231-
be achieved by a combination of multiple plug-ins.
232-
233-
The possibility of infinite depending on the combination
234-
of plug-ins can be realized.
235-
236-
All depending on whether you make a plug-in looks like!
237-
238257

239258
===========
240259
Development

0 commit comments

Comments
 (0)