User:Scray/Manually archiving the RefDesk
This is not a Wikipedia article: It is an individual user's work-in-progress page, and may be incomplete and/or unreliable. For guidance on developing this draft, see Wikipedia:So you made a userspace draft. Find sources: Google (books · news · scholar · free images · WP refs) · FENS · JSTOR · TWL |
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:
- Go to the RD archives page and click on the month for the desk to be archived
- Edit that page to add the day to be archived, and save
- 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>
- Cut the day's content (including the date header) and paste to the archive page below the header.
- 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):
- Copy daily archive content (not the first line that contains date) to text editor
- Replace
^[^=].*$
with null (blanks any lines that are not section headers) - Replace
(\r\n)+
with\r\n
(removes blank lines) - Replace
\[\[|\]\]
with null (removes any nested links from links to headers) - 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) - 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 - copy this back into monthly archive as the index for that date
- 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 "===").