User:Mithbot/Scripts
(Difference between revisions)
m (Added more jobs) |
m (→Changing Internal Links: Added more work) |
||
| Line 103: | Line 103: | ||
*''Morwen Eledhwen'' to [[Morwen]] (20 June 2010); | *''Morwen Eledhwen'' to [[Morwen]] (20 June 2010); | ||
*''Húrin Thalion'' to [[Húrin]] (20 June 2010); | *''Húrin Thalion'' to [[Húrin]] (20 June 2010); | ||
| + | *''Gimli Elf-friend'' to [[Gimli]] (28 June 2010); | ||
| + | *''Legolas of Mirkwood'' and ''Legolas Greenlead'' to [[Legolas]] (1 July 2010); | ||
| + | *''Arwen Undómiel'', ''Arwen Undomiel'' and ''Arwen Evenstar'' to [[Arwen]] (1 July 2010); | ||
| + | *''Gandalf the Grey'' and ''Gandalf the White'' to [[Gandalf]] (1 July 2010); | ||
| + | *''Frodo'' to [[Frodo Baggins]] (1 July 2010); | ||
| + | *''Sam Gamgee'', ''Sam'' and ''Samwise'' to [[Samwise Gamgee]] (1 July 2010); | ||
| + | *''Merry'' and ''Merry Brandybuck'' to [[Meriadoc Brandybuck]] (1 July 2010); | ||
| + | *''Pippin'', ''Pippin Took'' ''Peregrin Took I'' and ''Peregrin I Took'' to [[Peregrin Took]] (1 July 2010); | ||
| + | *''Hobbit'' to ''Hobbits'' (1 July 2010); | ||
| + | *''Adamanta Took'' to [[Adamanta Chubb]] (2 July 2010); | ||
| + | *''Bullroarer'' to [[Bandobras Took]] (2 July 2010); | ||
| + | *''Bell Goodchild'' to [[Bell Gamgee]] (2 July 2010); | ||
| + | *''Berylla Boffin'' to [[Berylla Baggins]] (2 July 2010); | ||
| + | *''Deagol'' to [[Déagol]] (2 July 2010); | ||
| + | *''Estella Bolger'' to [[Estella Brandybuck]] (2 July 2010); | ||
| + | *''Elanor Gamgee'' and ''Elanor Fairbairns'' to [[Elanor Gardner]] (2 July 2010); | ||
| + | *''Maggot'' to [[Farmer Maggot]] (2 July 2010); | ||
| + | *''Fatty Bolger'' to [[Fredegar Bolger]] (2 July 2010); | ||
| + | *''Broadbelt Brandybuck'' to [[Gorbadoc Brandybuck]] (2 July 2010); | ||
| + | *''Old Took'', ''Gerontius'' and ''The Old Took'' to [[Gerontius Took]] (2 July 2010); | ||
| + | *''Hamfast Gamgee'' and ''Gaffer'' to [[Gaffer Gamgee]] (2 July 2010); | ||
| + | *''Hamfast Gamwich'' to [[Hamfast of Gamwich]] (2 July 2010); | ||
| + | *''Hobson Gamgee'' and ''Roper Gamgee'' to [[Hobson]] (2 July 2010); | ||
| + | *''Lobelia Bracegirdle'' to [[Lobelia Sackville-Baggins]] (2 July 2010); | ||
| + | *''Linda Baggins'' to [[Linda Proudfoot]] (2 July 2010); | ||
| + | *''Stoor'' to [[Stoors]] (2 July 2010); | ||
| + | *''Farmer Cotton'' to [[Tolman Cotton Senior]] (2 July 2010); | ||
| + | *''Rosie Cotton'' to [[Rose Cotton]] (2 July 2010); | ||
| + | *''Primrose Boffin'' to [[Primrose Bracegirdle]] (2 July 2010); | ||
| + | *''Rosamunda Bolger'' to [[Rosamunda Took]] (2 July 2010); | ||
| + | *''Goldfather'' to [[Rorimac Brandybuck]] (2 July 2010); | ||
| + | *''Smeagol'' to [[Sméagol]] (2 July 2010); | ||
| + | *''Burrows'' to [[Burrows Family]] (2 July 2010); | ||
| + | *''Brandybuck'' and ''Brandybucks'' to [[Brandybuck Family]] (2 July 2010); | ||
| + | *''Bolger'' to [[Bolger Family]] (2 July 2010); | ||
| + | *''Baggins'', ''Baggins family'' and ''Labingi'' to [[Baggins Family]] (2 July 2010); | ||
| + | *''Gamgee'' to [[Gamgee Family]] (2 July 2010); | ||
| + | *''Chubb-Baggins'' to [[Chubb-Baggins Family]] (2 July 2010); | ||
| + | *''Took'', ''Tooks'' and ''Took family'' to [[Took Family]] (2 July 2010); | ||
| + | *''Sackville-Bagginses'' and ''Sackville-Baggins'' to [[Sackville-Baggins Family]] (3 July 2010); | ||
| + | *''Proudfoot'' and ''Proudfeet'' to [[Proudfoot Family]] (3 July 2010); | ||
Revision as of 23:44, 2 July 2010
Changing Internal Links
using System;
using DotNetWikiBot;
class MyBot : Bot
{
public static void Main()
{
Site site = new Site("http://tolkiengateway.net", "Mithbot", "PASSWORD");
PageList p = new PageList(site);
p.FillFromLinksToPage("Bilbo");
p.LoadEx();
foreach (Page i in p)
i.text = i.text.Replace("[[Bilbo]]", "[[Bilbo Baggins]]");
p.SaveSmoothly(1, "Bot Message: changing link to [[Bilbo Baggins]]", true);
}
}
To avoid certain namespaces, add this before p.LoadEx();, User and Template in this example:-
p.RemoveNamespaces(new int[] {2,10});
The above code is used to change links to a particular page in order to remove redirects. By changing "Bilbo" and "Bilbo Baggins" this script can be re-used again and again to edit internal links. So far, it has been used for changing:
- Bilbo to Bilbo Baggins (14 June 2010);
- Siriondil of Gondor to Siriondil (King of Gondor) (14 June 2010);
- Calmacil of Gondor to Calmacil (King of Gondor) (14 June 2010);
- Cemendur of Gondor to Cemendur (King of Gondor) (14 June 2010);
- Eärendil of Gondor to Eärendil (King of Gondor) (14 June 2010);
- Anardil of Gondor to Anardil (King of Gondor) (14 June 2010);
- Turambar of Gondor to Turambar (King of Gondor) (14 June 2010);
- Eldacar of Gondor to Eldacar (King of Gondor) (14 June 2010);
- Tarondor of Gondor to Tarondor (King of Gondor) (14 June 2010);
- Calimehtar, King of Gondor to Calimehtar (King of Gondor) (14 June 2010);
- Amandil of Andúnië to Amandil (Lord of Andúnië) (14 June 2010);
- Anárion son of Elendil to Anárion (14 June 2010);
- Changing "||" to "|" - fixing own mistake (15 June 2010);
- Eärendur, Lord of Andúnië to Eärendur (Lord of Andúnië) (15 June 2010);
- Valandil of Númenor to Valandil (Lord of Andúnië) (15 June 2010);
- Silmarien to Silmariën (15 June 2010);
- Ardamir son of Axantur to Ardamir (son of Axantur) (15 June 2010);
- Eärendur, son of Tar-Amandil to Eärendur (son of Tar-Amandil) (15 June 2010);
- Cemendur of Númenor to Cemendur (son of Axantur) (15 June 2010);
- Aulendil of Númenor to Aulendil (son of Vardamir) (15 June 2010);
- Eärendur, King of Arnor to Eärendur (King of Arnor) (15 June 2010);
- Elendur, son of Isildur to Elendur (son of Isildur) (15 June 2010);
- Elendur, King of Arnor to Elendur (King of Arnor) (15 June 2010);
- Tarondor of Arnor to Tarondor (King of Arnor) (15 June 2010);
- Valandil of Arnor to Valandil (King of Arnor) (15 June 2010);
- Eldacar of Arnor to Eldacar (King of Arnor) (15 June 2010);
- Beleg of Arthedain to Beleg (King of Arthedain) (15 June 2010);
- Faramir son of Ondoher to Faramir (son of Ondoher) (15 June 2010);
- Beregond, Steward of Gondor to Beregond (Steward of Gondor) (15 June 2010);
- Boromir I and Boromir son of Denethor I to Boromir (Steward of Gondor) (15 June 2010);
- Dior of Gondor to Dior (Steward of Gondor) (15 June 2010);
- Steward Cirion to Cirion (15 June 2010);
- Barahir son of Hador to Barahir (Steward of Gondor) (15 June 2010);
- Hador of Gondor to Hador (Steward of Gondor) (15 June 2010);
- Egalmoth, Steward of Gondor to Egalmoth (Steward of Gondor) (15 June 2010);
- Faramir son of Denethor II, Faramir, son of Denethor II and Faramir (son of Denethor II) to Faramir (15 June 2010);
- Mardil to Mardil Voronwë (15 June 2010);
- Orodreth of Gondor to Orodreth (Steward of Gondor) (15 June 2010);
- Turgon of Gondor to Turgon (Steward of Gondor) (15 June 2010);
- Baranor of Gondor to Baranor (Man of Gondor) (15 June 2010);
- Beregond, soldier of Gondor to Beregond (soldier of Gondor) (15 June 2010);
- Barahir grandson of Faramir to Barahir (grandson of Faramir) (15 June 2010);
- Boromir son of Denethor II, Boromir II, Boromir, son of Denethor II Boromir (son of Denethor II) to Boromir (15 June 2010);
- Míriel of Númenor to Tar-Míriel (15 June 2010);
- Veantur to Vëantur (15 June 2010);
- Ar-Gimilzor and Gimilzôr to Ar-Gimilzôr (15 June 2010);
- Herunúmen to Tar-Herunúmen (15 June 2010);
- Beruthiel and Queen Berúthiel to Berúthiel (15 June 2010);
- Tar-Calion, Pharazôn and Ar-Pharazon to Ar-Pharazôn (16 June 2010);
- Numenor to Númenor (16 June 2010);
- Black Numenoreans and Black Númenórean to Black Númenóreans (16 June 2010);
- Númenoreans, Númenórean, Men of Númenor, Númenorean and Numenoreans to Númenóreans (16 June 2010);
- Adunaic to Adûnaic (16 June 2010);
- Akallabeth, Downfall of Numenor, Drowning of Númenor and The Akallabêth to Akallabêth (16 June 2010);
- Anarion and Anárion son of Elendil to Anárion (16 June 2010);
- Lord of Andúnië to Lords of Andúnië (16 June 2010);
- Andune to Andúnië (16 June 2010);
- Anduril to Andúril (16 June 2010);
- Eomer and Éomer Éadig to Éomer (16 June 2010);
- Dior and Dior Eluchil to Dior Eluchíl (16 June 2010);
- Elurin to Elurín (16 June 2010);
- Elured to Eluréd (16 June 2010);
- Man of the West, Men of the West, Núnatani, Núnatan, Dúnadan, Dunadan and Dunedain to Dúnedain (16 June 2010);
- Lothiriel to Lothíriel (16 June 2010);
- Ghan-buri-Ghan to Ghân-buri-Ghân (16 June 2010);
- Old Púkel land to Drúwaith Iaur (16 June 2010);
- Drúath, Drughu, Drûgs, Drûg, Drúadan and Druadan to Drúedain (16 June 2010);
- Barahir son of Bregor to Barahir (16 June 2010);
- Baranor son of Baran to Baranor (son of Baran) (16 June 2010);
- Beren son of Belemir to Beren (son of Belemir) (16 June 2010);
- Elros Tar-Minyatur and Tar-Minyatur to Elros (17 June 2010);
- Earendil and Eärendil the Mariner to Eärendil (17-8 June 2010);
- Brandir of Arachon to Brandir (son of Arachon) (18 June 2010);
- Rian to Rían (18 June 2010);
- Third House of the Edain, People of Hador, Third House and House of Marach to House of Hador (18 June 2010);
- Malach Aradan to Malach (18 June 2010);
- Dunlending language to Dunlendish (20 June 2010);
- Haleth the Hunter' to Haleth (20 June 2010);
- Túrin Turambar, Turin and Turindo to Túrin (20 June 2010);
- Morwen Eledhwen to Morwen (20 June 2010);
- Húrin Thalion to Húrin (20 June 2010);
- Gimli Elf-friend to Gimli (28 June 2010);
- Legolas of Mirkwood and Legolas Greenlead to Legolas (1 July 2010);
- Arwen Undómiel, Arwen Undomiel and Arwen Evenstar to Arwen (1 July 2010);
- Gandalf the Grey and Gandalf the White to Gandalf (1 July 2010);
- Frodo to Frodo Baggins (1 July 2010);
- Sam Gamgee, Sam and Samwise to Samwise Gamgee (1 July 2010);
- Merry and Merry Brandybuck to Meriadoc Brandybuck (1 July 2010);
- Pippin, Pippin Took Peregrin Took I and Peregrin I Took to Peregrin Took (1 July 2010);
- Hobbit to Hobbits (1 July 2010);
- Adamanta Took to Adamanta Chubb (2 July 2010);
- Bullroarer to Bandobras Took (2 July 2010);
- Bell Goodchild to Bell Gamgee (2 July 2010);
- Berylla Boffin to Berylla Baggins (2 July 2010);
- Deagol to Déagol (2 July 2010);
- Estella Bolger to Estella Brandybuck (2 July 2010);
- Elanor Gamgee and Elanor Fairbairns to Elanor Gardner (2 July 2010);
- Maggot to Farmer Maggot (2 July 2010);
- Fatty Bolger to Fredegar Bolger (2 July 2010);
- Broadbelt Brandybuck to Gorbadoc Brandybuck (2 July 2010);
- Old Took, Gerontius and The Old Took to Gerontius Took (2 July 2010);
- Hamfast Gamgee and Gaffer to Gaffer Gamgee (2 July 2010);
- Hamfast Gamwich to Hamfast of Gamwich (2 July 2010);
- Hobson Gamgee and Roper Gamgee to Hobson (2 July 2010);
- Lobelia Bracegirdle to Lobelia Sackville-Baggins (2 July 2010);
- Linda Baggins to Linda Proudfoot (2 July 2010);
- Stoor to Stoors (2 July 2010);
- Farmer Cotton to Tolman Cotton Senior (2 July 2010);
- Rosie Cotton to Rose Cotton (2 July 2010);
- Primrose Boffin to Primrose Bracegirdle (2 July 2010);
- Rosamunda Bolger to Rosamunda Took (2 July 2010);
- Goldfather to Rorimac Brandybuck (2 July 2010);
- Smeagol to Sméagol (2 July 2010);
- Burrows to Burrows Family (2 July 2010);
- Brandybuck and Brandybucks to Brandybuck Family (2 July 2010);
- Bolger to Bolger Family (2 July 2010);
- Baggins, Baggins family and Labingi to Baggins Family (2 July 2010);
- Gamgee to Gamgee Family (2 July 2010);
- Chubb-Baggins to Chubb-Baggins Family (2 July 2010);
- Took, Tooks and Took family to Took Family (2 July 2010);
- Sackville-Bagginses and Sackville-Baggins to Sackville-Baggins Family (3 July 2010);
- Proudfoot and Proudfeet to Proudfoot Family (3 July 2010);
