Wikipedia: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:

  1. 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.
    • If csv file contains non-english characters than it needs to be saved in UTF-8 format. One way to do this is to change .csv file extension to .txt, and open resulting file in Notepad and use save as option to save in UTF-8 format.
  2. Copy CSVLoader.dll to the AWB directory.
  3. Log in to AWB
  4. 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.
  5. 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
  6. 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.)
  7. 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).
  8. Enter an edit summary
  9. 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).
  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.