forked from backdrop-contrib/feeds
-
Notifications
You must be signed in to change notification settings - Fork 0
/
feeds.plugins.inc
173 lines (169 loc) · 4.78 KB
/
feeds.plugins.inc
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
<?php
/**
* @file
* Feeds plugins declarations.
*/
/**
* Break out for feeds_feed_plugins().
*/
function _feeds_feeds_plugins() {
$path = backdrop_get_path('module', 'feeds') . '/plugins';
$info = array();
$info['FeedsPlugin'] = array(
'hidden' => TRUE,
'handler' => array(
'class' => 'FeedsPlugin',
'file' => 'FeedsPlugin.inc',
'path' => $path,
),
);
$info['FeedsMissingPlugin'] = array(
'name' => 'Missing plugin',
'description' => 'There is a problem with your configuration.',
'handler' => array(
'class' => 'FeedsMissingPlugin',
'file' => 'FeedsPlugin.inc',
'path' => $path,
),
);
$info['FeedsFetcher'] = array(
'hidden' => TRUE,
'handler' => array(
'parent' => 'FeedsPlugin',
'class' => 'FeedsFetcher',
'file' => 'FeedsFetcher.inc',
'path' => $path,
),
);
$info['FeedsParser'] = array(
'hidden' => TRUE,
'handler' => array(
'parent' => 'FeedsPlugin',
'class' => 'FeedsParser',
'file' => 'FeedsParser.inc',
'path' => $path,
),
);
$info['FeedsProcessor'] = array(
'hidden' => TRUE,
'handler' => array(
'parent' => 'FeedsPlugin',
'class' => 'FeedsProcessor',
'file' => 'FeedsProcessor.inc',
'path' => $path,
),
);
$info['FeedsHTTPFetcher'] = array(
'name' => 'HTTP Fetcher',
'description' => 'Download content from a URL.',
'handler' => array(
// This is the key name, not the class name.
'parent' => 'FeedsFetcher',
'class' => 'FeedsHTTPFetcher',
'file' => 'FeedsHTTPFetcher.inc',
'path' => $path,
),
);
$info['FeedsFileFetcher'] = array(
'name' => 'File upload',
'description' => 'Upload content from a local file.',
'handler' => array(
'parent' => 'FeedsFetcher',
'class' => 'FeedsFileFetcher',
'file' => 'FeedsFileFetcher.inc',
'path' => $path,
),
);
$info['FeedsCSVParser'] = array(
'name' => 'CSV parser',
'description' => 'Parse data in Comma Separated Value format.',
'handler' => array(
'parent' => 'FeedsParser',
'class' => 'FeedsCSVParser',
'file' => 'FeedsCSVParser.inc',
'path' => $path,
),
);
if (extension_loaded('SimpleXML')) {
$info['FeedsSyndicationParser'] = array(
'name' => 'Common syndication parser',
'description' => 'Parse RSS and Atom feeds.',
'help' => 'Parse XML feeds in RSS 1, RSS 2 and Atom format.',
'handler' => array(
'parent' => 'FeedsParser',
'class' => 'FeedsSyndicationParser',
'file' => 'FeedsSyndicationParser.inc',
'path' => $path,
),
);
}
$info['FeedsOPMLParser'] = array(
'name' => 'OPML parser',
'description' => 'Parse OPML files.',
'handler' => array(
'parent' => 'FeedsParser',
'class' => 'FeedsOPMLParser',
'file' => 'FeedsOPMLParser.inc',
'path' => $path,
),
);
if (feeds_simplepie_exists()) {
$info['FeedsSimplePieParser'] = array(
'name' => 'SimplePie parser',
'description' => 'Parse RSS and Atom feeds.',
'help' => 'Use <a href="http://simplepie.org">SimplePie</a> to parse XML feeds in RSS 1, RSS 2 and Atom format.',
'handler' => array(
'parent' => 'FeedsParser',
'class' => 'FeedsSimplePieParser',
'file' => 'FeedsSimplePieParser.inc',
'path' => $path,
),
);
}
$info['FeedsSitemapParser'] = array(
'name' => 'Sitemap parser',
'description' => 'Parse Sitemap XML format feeds.',
'handler' => array(
'parent' => 'FeedsParser',
'class' => 'FeedsSitemapParser',
'file' => 'FeedsSitemapParser.inc',
'path' => $path,
),
);
$info['FeedsNodeProcessor'] = array(
'name' => 'Node processor',
'description' => 'Create and update nodes.',
'help' => 'Create and update nodes from parsed content.',
'handler' => array(
'parent' => 'FeedsProcessor',
'class' => 'FeedsNodeProcessor',
'file' => 'FeedsNodeProcessor.inc',
'path' => $path,
),
);
$info['FeedsUserProcessor'] = array(
'name' => 'User processor',
'description' => 'Create users.',
'help' => 'Create users from parsed content.',
'handler' => array(
'parent' => 'FeedsProcessor',
'class' => 'FeedsUserProcessor',
'file' => 'FeedsUserProcessor.inc',
'path' => $path,
),
);
if (module_exists('taxonomy')) {
$info['FeedsTermProcessor'] = array(
'name' => 'Taxonomy term processor',
'description' => 'Create taxonomy terms.',
'help' => 'Create taxonomy terms from parsed content.',
'handler' => array(
'parent' => 'FeedsProcessor',
'class' => 'FeedsTermProcessor',
'file' => 'FeedsTermProcessor.inc',
'path' => $path,
),
);
}
return $info;
}