Projet

Général

Profil

Paste
Télécharger (9,1 ko) Statistiques
| Branche: | Révision:

root / drupal7 / sites / all / modules / feeds / README.txt @ ed9a13f1

1

    
2

    
3
"It feeds"
4

    
5

    
6
FEEDS
7
=====
8

    
9
An import and aggregation framework for Drupal.
10
http://drupal.org/project/feeds
11

    
12
Features
13
========
14

    
15
- Pluggable import configurations consisting of fetchers (get data) parsers
16
  (read and transform data) and processors (create content on Drupal).
17
-- HTTP upload (with optional PubSubHubbub support).
18
-- File upload.
19
-- CSV, RSS, Atom parsing.
20
-- Creates nodes or terms.
21
-- Creates lightweight database records if Data module is installed.
22
   http://drupal.org/project/data
23
-- Additional fetchers/parsers or processors can be added by an object oriented
24
   plugin system.
25
-- Granular mapping of parsed data to content elements.
26
- Import configurations can be piggy backed on nodes (thus using nodes to track
27
  subscriptions to feeds) or they can be used on a standalone form.
28
- Unlimited number of import configurations.
29
- Export import configurations to code.
30
- Optional libraries module support.
31

    
32
Requirements
33
============
34

    
35
- CTools 7.x-1.x
36
  http://drupal.org/project/ctools
37
- Job Scheduler
38
  http://drupal.org/project/job_scheduler
39
- Drupal 7.x
40
  http://drupal.org/project/drupal
41
- PHP safe mode is not supported, depending on your Feeds Importer configuration
42
  safe mode may cause no problems though.
43

    
44
Installation
45
============
46

    
47
- Install Feeds, Feeds Admin UI.
48
- To get started quick, install one or all of the following Feature modules:
49
  Feeds News, Feeds Import, Feeds Fast News (more info below).
50
- Make sure cron is correctly configured http://drupal.org/cron
51
- Go to import/ to import data.
52

    
53
SimplePie Installation
54
======================
55

    
56
- To install the SimplePie parser plugin, complete the following steps:
57
  1. Download SimplePie from http://simplepie.org/downloads. The recommended
58
     version is: 1.3.
59
  2. Decompress the downloaded zip file.
60
  3. Rename the uncompressed folder to 'simplepie'.
61
     For example rename 'simplepie-simplepie-e9472a1' to 'simplepie'.
62
  4. Move the folder to sites/all/libraries. The final directory structure
63
     should be sites/all/libraries/simplepie.
64
  5. Flush the Drupal cache.
65
  6. The SimplePie parser should be available now in the list of parsers.
66

    
67
Feature modules
68
===============
69

    
70
Feeds ships with three feature modules that can be enabled on
71
admin/build/modules or - if you are using Features - on admin/build/features.
72
http://drupal.org/project/features
73

    
74
The purpose of these modules is to provide a quick start for using Feeds. You
75
can either use them out of the box as they come or you can take them as samples
76
to learn how to build import or aggregation functionality with Feeds.
77

    
78
The feature modules merely contain sets of configurations using Feeds and in
79
some cases the modules Node, Views or Data. If the default configurations do not
80
fit your use case you can change them on the respective configuration pages for
81
Feeds, Node, Views or Data.
82

    
83
Here is a description of the provided feature modules:
84

    
85
- Feeds News -
86

    
87
This feature is a news aggregator. It provides a content type "Feed" that can
88
be used to subscribe to RSS or Atom feeds. Every item on such a feed is
89
aggregated as a node of the type "Feed item", also provided by the module.
90

    
91
What's neat about Feeds News is that it comes with a configured View that shows
92
a list of news items with every feed on the feed node's "View items" tab. It
93
also comes with an OPML importer filter that can be accessed under /import.
94

    
95
- Feeds Import -
96

    
97
This feature is an example illustrating Feeds' import capabilities. It contains
98
a node importer and a user importer that can be accessed under /import. Both
99
accept CSV or TSV files as imports.
100

    
101
PubSubHubbub support
102
====================
103

    
104
Feeds supports the PubSubHubbub publish/subscribe protocol. Follow these steps
105
to set it up for your site.
106
https://github.com/pubsubhubbub/
107

    
108
- Go to admin/build/feeds and edit (override) the importer configuration you
109
  would like to use for PubSubHubbub.
110
- Choose the HTTP Fetcher if it is not already selected.
111
- On the HTTP Fetcher, click on 'settings' and check "Use PubSubHubbub".
112
- Optionally you can use a designated hub such as http://superfeedr.com/ or your
113
  own. If a designated hub is specified, every feed on this importer
114
  configuration will be subscribed to this hub, no matter what the feed itself
115
  specifies.
116

    
117
Libraries support
118
=================
119

    
120
If you are using Libraries module, you can place external libraries in the
121
Libraries module's search path (for instance sites/all/libraries. The only
122
external library used at the moment is SimplePie.
123

    
124
Libraries found in the libraries search path are preferred over libraries in
125
feeds/libraries/.
126

    
127
Transliteration support
128
=======================
129

    
130
If you plan to store files with Feeds - for instance when storing podcasts
131
or images from syndication feeds - it is recommended to enable the
132
Transliteration module to avoid issues with non-ASCII characters in file names.
133
http://drupal.org/project/transliteration
134

    
135
API Overview
136
============
137

    
138
See "The developer's guide to Feeds":
139
http://drupal.org/node/622700
140

    
141
Running the Drush integration tests
142
===================================
143

    
144
In order the run Drush integration tests, Drush itself needs to be installed
145
with its *dev dependencies*. Furthermore, the phpunit version that comes with
146
Drush should be used for running the tests (instead of a globally installed
147
phpunit), as that one has proven to be compatible with the Drush tests.
148

    
149
  1. Git clone of Drush 8.
150

    
151
       git clone --branch 8.x https://github.com/drush-ops/drush.git
152
       cd drush
153

    
154
  2. Install Drush with dev dependencies using Composer.
155

    
156
       composer install
157

    
158
     And ensure that the following text is displayed:
159

    
160
       "Loading composer repositories with package information
161
       Installing dependencies (including require-dev) from lock file"
162

    
163
     Especially note that Composer says 'including require-dev'. This means that
164
     the Drush dev dependencies are installed (including phpunit).
165

    
166
  3. Execute a command like the following:
167

    
168
       UNISH_NO_TIMEOUTS=1 UNISH_DRUPAL_MAJOR_VERSION=7 /path/to/drush/vendor/bin/phpunit --configuration /path/to/drush/tests /path/to/feeds/tests/drush
169

    
170
     Replace '/path/to' with the appropriate path to the directory in question.
171
     Also be sure to point to the phpunit version that comes with Drush.
172

    
173
     So if Drush is installed in /users/megachriz/drush and the Feeds module is
174
     located at /users/megachriz/Sites/drupal7/sites/all/modules/feeds:
175

    
176
       UNISH_NO_TIMEOUTS=1 UNISH_DRUPAL_MAJOR_VERSION=7 /users/megachriz/drush/vendor/bin/phpunit --configuration /users/megachriz/drush/tests /users/megachriz/Sites/drupal7/sites/all/modules/feeds/tests/drush
177

    
178
Debugging
179
=========
180

    
181
Set the Drupal variable 'feeds_debug' to TRUE (i. e. using drush). This will
182
create a file /tmp/feeds_[my_site_location].log. Use "tail -f" on the command
183
line to get a live view of debug output.
184

    
185
Note: at the moment, only PubSubHubbub related actions are logged.
186

    
187
Performance
188
===========
189

    
190
See "The site builder's guide to Feeds":
191
http://drupal.org/node/622698
192

    
193
Hidden settings
194
===============
195

    
196
Hidden settings are variables that you can define by adding them to the $conf
197
array in your settings.php file.
198

    
199
Name:        feeds_debug
200
Default:     FALSE
201
Description: Set to TRUE for enabling debug output to
202
             /DRUPALTMPDIR/feeds_[sitename].log
203

    
204
Name:        feeds_library_dir
205
Default:     FALSE
206
Description: The location where Feeds should look for libraries that it uses.
207
             You can use this variable to override the libraries that are in
208
             the Feeds libraries folder, for example "http_request.inc".
209

    
210
Name:        feeds_importer_class
211
Default:     'FeedsImporter'
212
Description: The class to use for importing feeds.
213

    
214
Name:        feeds_source_class
215
Default:     'FeedsSource'
216
Description: The class to use for handling feed sources.
217

    
218
Name:        feeds_process_limit
219
Default:     50
220
             The number of nodes feed node processor creates or deletes in one
221
             page load.
222

    
223
Name:        http_request_timeout
224
Default:     15
225
Description: Timeout in seconds to wait for an HTTP get request to finish.
226
Note:        This setting could be overridden per importer in admin UI :
227
             admin/structure/feeds/<your_importer>/settings/<your_fetcher> page.
228

    
229
Name:        feeds_never_use_curl
230
Default:     FALSE
231
Description: Flag to stop feeds from using its cURL for http requests. See
232
             http_request_use_curl().
233

    
234
Name:        feeds_http_file_cache_dir
235
Default:     private://feeds/cache
236
Description: The location on the file system where results of HTTP requests are
237
             cached.
238

    
239
Name:        feeds_in_progress_dir
240
Default:     private://feeds/in_progress
241
Description: The location on the file system where temporary files are stored
242
             that are in progress of being imported.
243

    
244
Name:        feeds_sync_cache_feeds_http_interval
245
Default:     21600
246
Description: How often the feeds cache directory should be checked for orphaned
247
             cache files.
248

    
249
Name:        feeds_use_mbstring
250
Default:     TRUE
251
Description: The extension mbstring is used to convert encodings during parsing.
252
             The reason that this can be turned off is to be able to test Feeds
253
             behavior when the extension is not available.
254

    
255
Glossary
256
========
257

    
258
See "Feeds glossary":
259
http://drupal.org/node/622710