Difference between revisions of "Feeds Module"
From Stadm
Jump to navigationJump to searchLine 32: | Line 32: | ||
****In Node Processor Mapping, you can select which CSV fields should be put into each Event Field in Drupal | ****In Node Processor Mapping, you can select which CSV fields should be put into each Event Field in Drupal | ||
− | + | ===Exporting=== | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
**To use, place an exported xml file containing data from the old events database into the same directory as the script | **To use, place an exported xml file containing data from the old events database into the same directory as the script | ||
**the script should initially load a form that will ask you for the name of the file -- select it in the drip down menu and press Submit. | **the script should initially load a form that will ask you for the name of the file -- select it in the drip down menu and press Submit. | ||
Line 45: | Line 39: | ||
***Check to make sure there aren't any semicolons that should not be used as a delimiter | ***Check to make sure there aren't any semicolons that should not be used as a delimiter | ||
***Check to make sure there aren't any new lines wehre there shouldn't be. | ***Check to make sure there aren't any new lines wehre there shouldn't be. | ||
− | * | + | |
+ | ===Importing=== | ||
+ | *How feeds works | ||
+ | **In the feeds configuration settings, there is an option to add more "Importers" (see Pre-Configuration guide above) | ||
+ | **I created an import function specifically for events | ||
**go to /import | **go to /import | ||
− | **select | + | **select the Importer you want to use |
**leave all options as they are, and choose the converted file with the upload form | **leave all options as they are, and choose the converted file with the upload form | ||
**Click "Import" | **Click "Import" |
Revision as of 12:49, 10 August 2012
Feeds is a Drupal module for importing data from feeds or structured content files (ie. csv).
About
- Import csv data as nodes of a specified content type
- Module located at "import" page
- Several built in Importers
- You can add more importers in the module configuration page
- Can import csv with three types of delimiters
- semicolon
- comma
- TAB
Use
- Feeds can be used in two ways
- To sync data from an rss feed
- To import or migrate data in the form of a CSV file
Pre-configuration
- Before importing your content, you should set up an importer unless you plan on using the Events Importer that imports fields title, date, url and pi as nodes with the content type Event.
- To add an importer
- Go to admin->modules->Feeds->Feeds Admin UI->Configure->Add Importer
- Enter name and description of the importer you are creating
- On the configuration page of your importer:
- Fetcher -- change import type (upload or url)
- In the settings subsection you can chose which filetypes should be allowed
- Fetcher -- change import type (upload or url)
- You can select the parser to be used in the Parser field
- In most cases you should use CSV because it is easier to match to database
- In the settings you can change the default delimiter -- a semicolon is often the most effective because it is usually not used in content
- In most cases you should use CSV because it is easier to match to database
- Select Node Processor
- In settings, chose the content type for which you would like to add the imported nodes
- In Node Processor Mapping, you can select which CSV fields should be put into each Event Field in Drupal
- On the configuration page of your importer:
Exporting
- To use, place an exported xml file containing data from the old events database into the same directory as the script
- the script should initially load a form that will ask you for the name of the file -- select it in the drip down menu and press Submit.
- a link will appear to download the converted file
- You should check the file for obvious errors before you upload it
- Check to make sure there aren't any semicolons that should not be used as a delimiter
- Check to make sure there aren't any new lines wehre there shouldn't be.
Importing
- How feeds works
- In the feeds configuration settings, there is an option to add more "Importers" (see Pre-Configuration guide above)
- I created an import function specifically for events
- go to /import
- select the Importer you want to use
- leave all options as they are, and choose the converted file with the upload form
- Click "Import"