Wikipedia talk:WikiProject Mountains/List of mountain ranges
Appearance
This project page does not require a rating on Wikipedia's content assessment scale. It is of interest to the following WikiProjects: | ||||||||
|
Re-generating the list
[edit]For those who cannot use AutoWikiBrowser, using the "What links here" link in the toolbox menu on the left hand side, works just as well, although requires a number of manual steps.
Using What links here
[edit]First, you will need to install the Pywikipedia robot framework in order to quickly extract the links into a format that can be posted into the article.
- Get the list of links to {{Infobox mountain range}} by clicking the following link (if you are using tabs in Firefox, you might want to use the key combination to open the link in a new tab).
- Save the page as a local file (In Firefox, select "Save Page As..." from the File menu).
- When there are more than 5,000 articles linking to the template, click the "Next 5,000 links" and save as a local file as well using a different name.
- Run the extract_wikilinks.py script in the Pywikipedia framework, giving it the name of the files you saved the pages under in the previous steps. Make sure you redirect the output to a file.
- python extract_wikilinks.py links_a.txt > links2.txt
- python extract_wikilinks.py links_b.txt >> links2.txt
- Sort the file and redirect the output to another file (if you have a Unix based system such as Mac OS X or Linux, use the "sort" command).
- sort -k 3 links2.txt > links_sorted.txt
- There are probably duplicate lines output by "What links here" so you can use the "uniq" Unix command to remove them.
- uniq links_sorted.txt links_unique.txt
- Edit the file and remove any common site links as well as any pages in the Wikipedia, talk and user name spaces.
- Add a "# " to the start of each line. Again, if you have a Unix based system, you can use "vi" to do this: %s/^/# /
- Copy and paste the updated list into the List of mountain ranges.