Wikipedia:CSVLoader/Find and replace
Jump to navigation Jump to search
Using AWB to find and replace strings using CSV data files
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.
- 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 file 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 184.108.40.206).
- 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 220.127.116.11).
- 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.