Wikipedia:CSVLoader/Find and replace
Appearance
(Redirected from User:Ganeshk/CSVLoader/Find and replace)
Using AWB to find and replace strings using CSV data files
[edit]This option is very useful for collecting data related to articles, infoboxes, images, etc. in a spreadsheet, then processing and or cleaning it in the spreadsheet and reuploading results back to articles or images.
Steps:
- Create a CSV file. The first column must be the article name. See example here. Don't specify the column headers. You will do that later.
- Copy CSVLoader.dll to the AWB directory.
- Log in to AWB
- Create replacement rules in option tab Normal settings button. See here for examples. All replacement rules must be related to CSV file. You can use option tab Advanced settings button to create additional rules not related to CSV file.
- Select "CSV Loader plugin" from the Plugins menu. In the CSV loader settings box, (see example here)
- In Text File area select the CSV file that will be used.
- In Options area check "Find and Replace" and field separator (comma or semicolon for CSV).
- In Column Headers area enter the column headers (enclose them with ## (or any other symbol), example:
##city##,##district##,##state##,##country##
). Do not include spaces between around the commas. - Leave Article Text area unchanged
- click OK
- Plugin will add the article list to the main window
- At this point do not make any changes to replacement rules. If you need to change something then reload CSV Loader plugin. (In fact, while the plugin is running all changes to rules will be overwritten.)
- Review the page skip setting on the Skip tab. Do not use skip options in bot "auto save" mode, it seems to break the tool (version 1.0.0.10).
- Enter an edit summary
- Select the first file and Click Start. Be aware that extensive testing of replacement rules by clicking on random files and verifying results seems to break the tool (version 1.0.0.10).
- The Loader settings can be saved using the Save Settings on AWB's File menu. This will allow creating separate XML setting files for each type of load.