Wikipedia:CSVLoader/Find and replace

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 spreadsh…

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.

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 (with bot account)
  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.

Content Disclaimer

Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.

  1. The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
  2. There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
  3. It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
  4. Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
  5. Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.