User:Scray/Manually archiving the RefDesk

From Wikipedia, the free encyclopedia
Jump to: navigation, search


When the archiving bot is not working, manual archiving becomes necessary. The process can be confusing, so here are detailed steps.

Create the daily archive[edit]

Based on instructions here by Steve Summit:

  1. Go to the RD archives page and click on the month for the desk to be archived
  2. Edit that page to add the day to be archived, and save
  3. Click the redlink you just created, and paste in this header:
    <noinclude>{{subst:RD Archive header|%d%|%Mmm%|%desk%|%YYYY%}}</noinclude>
    editing of course to replace %d% [0-31], %Mmm% [Jan-Dec], %Desk% [Computing-Miscellaneous], and %YYYY% [e.g. 2012].
    For example: <noinclude>{{subst:RD Archive header|23|Oct|Science|2012}}</noinclude>
  4. Cut the day's content (including the date header) and paste to the archive page below the header.
  5. Save the RefDesk and its archive page

Create the daily archive index[edit]

The following is based on what Scray said here, using POSIX regex as implemented in Notepad++. Started from the RD archive page, open a month for a desk and then keep two windows open - one for the monthly index (for editing the index) and one for the daily archive (from which to grab questions used to create the links, as follows):

  1. Copy daily archive content (not the first line that contains date) to text editor
  2. Replace ^[^=].*$ with null (blanks any lines that are not section headers)
  3. Replace (\r\n)+ with \r\n (removes blank lines)
  4. Replace \[\[|\]\] with null (removes any nested links from links to headers)
  5. To create heading links, replace ^== (.*) ==$ with # [[Wikipedia:Reference_desk/Archives/%%deskname%%/2012 October 4#\1|\1]] (obviously, edit the replacement expression to show the correct desk name and date)
  6. To create subheading links (if present), replace ^=== (.*) ===$ with #: [[Wikipedia:Reference_desk/Archives/%%deskname%%/2012 October 4#\1|\1]] (obviously, edit the replacement expression to show the correct desk name and date) - for subheadings
  7. copy this back into monthly archive as the index for that date
  8. test a link or two to make sure they work

Note: steps 5 (and 6) assume that headings (or subheadings) have a space between the heading text and "==" (or "===").