Exemplo n.º 1
0
        static void UpdateLuaInMediaWiki()
        {
            if(Globals.folder_root=="")
            {
                Console.WriteLine("Bitte geben sie in den Optionen den Pfad zum Invertika Repository an.");
                return;
            }

            if(Globals.Options.GetElementAsString("xml.Options.Mediawiki.URL")=="")
            {
                Console.WriteLine("Bitte geben sie eine Mediawiki URL in den Optionen an.");
                return;
            }

            if(Globals.Options.GetElementAsString("xml.Options.Mediawiki.Username")=="")
            {
                Console.WriteLine("Bitte geben sie einen Mediawiki Nutzernamen in den Optionen an.");
                return;
            }

            if(Globals.Options.GetElementAsString("xml.Options.Mediawiki.Passwort")=="")
            {
                Console.WriteLine("Bitte geben sie einen Mediawiki Passwort in den Optionen an.");
                return;
            }

            string url=Globals.Options.GetElementAsString("xml.Options.Mediawiki.URL");
            string username=Globals.Options.GetElementAsString("xml.Options.Mediawiki.Username");
            string password=Globals.Options.GetElementAsString("xml.Options.Mediawiki.Passwort");

            Site wiki=new Site(url, username, password);

            List<string> luafiles=FileSystem.GetFiles(Globals.folder_data_scripts_libs, true, "*.lua");

            foreach(string file in luafiles)
            {
                LuaDocParser ldp=new LuaDocParser(file);
                LucDocReturn ret=ldp.ExportLuaDocToMediaWiki();

                switch(ret.DocType)
                {
                    case LuaDocType.Module:
                        {
                            Page page=new Page(wiki, ret.Name+" (Lua Modul)");

                            page.Load();

                            string text=page.text;

                            if(text=="")
                            {
                                List<string> lines=new List<string>();

                                lines.Add("{{Status_Green}}");
                                lines.Add("{{Automatic}}");

                                lines.Add("");

                                lines.Add("==Funktionen==");

                                //Funktions
                                lines.Add("{{Anker|AutomaticStartFunctions}}");
                                lines.AddRange(ret.Functions);
                                lines.Add("{{Anker|AutomaticEndFunctions}}");
                                lines.Add("");
                                lines.Add("[[Kategorie: Lua]]");
                                lines.Add("[[Kategorie: Lua Modul]]");

                                foreach(string ll in lines)
                                {
                                    text+=ll+"\n";
                                }

                                if(page.text!=text)
                                {
                                    page.text=text;
                                    page.Save("Sourcecode Dokumentation erstellt.", false);
                                }
                            }
                            else //Entsprechende Bereiche ersetzen
                            {
                                string start="{{Anker|AutomaticStartFunctions}}";
                                string end="{Anker|AutomaticEndFunctions}}";
                                int idxBeginInfobox=text.IndexOf(start, 0);
                                int idxEndInfobox=text.IndexOf(end, 0);

                                int lengthOfString=(idxEndInfobox-idxBeginInfobox)-start.Length-1;
                                string vorkommen=text.Substring(idxBeginInfobox+start.Length, lengthOfString);

                                if(vorkommen!="\n")
                                {
                                    text=text.Replace(vorkommen, "");
                                }

                                string replaceString="{{Anker|AutomaticStartFunctions}}\n";

                                foreach(string ll in ret.Functions)
                                {
                                    replaceString+=ll+"\n";
                                }

                                text=text.Replace(start, replaceString);

                                if(page.text!=text)
                                {
                                    page.text=text;
                                    page.Save("Sourcecode Dokumentation aktualisiert.", true);
                                }
                            }
                            break;
                        }
                    default:
                        {
                            break;
                        }
                }

            }

            Console.WriteLine("Lua Dokumentation aktualisiert.");
        }
Exemplo n.º 2
0
        static void CheckNPCsOnWiki()
        {
            if(Globals.folder_root=="")
            {
                Console.WriteLine("Bitte geben sie in den Optionen den Pfad zum Invertika Repository an.");
                return;
            }

            if(Globals.Options.GetElementAsString("xml.Options.Mediawiki.URL")=="")
            {
                Console.WriteLine("Bitte geben sie eine Mediawiki URL in den Optionen an.");
                return;
            }

            if(Globals.Options.GetElementAsString("xml.Options.Mediawiki.Username")=="")
            {
                Console.WriteLine("Bitte geben sie einen Mediawiki Nutzernamen in den Optionen an.");
                return;
            }

            if(Globals.Options.GetElementAsString("xml.Options.Mediawiki.Passwort")=="")
            {
                Console.WriteLine("Bitte geben sie einen Mediawiki Passwort in den Optionen an.");
                return;
            }

            //MediaWiki
            string url=Globals.Options.GetElementAsString("xml.Options.Mediawiki.URL");
            string username=Globals.Options.GetElementAsString("xml.Options.Mediawiki.Username");
            string password=Globals.Options.GetElementAsString("xml.Options.Mediawiki.Passwort");

            Site wiki=new Site(url, username, password);

            PageList pl=new PageList(wiki);
            pl.FillAllFromCategory("NPC");

            List<string> npcsInWiki=new List<string>();
            foreach(Page page in pl)
            {
                npcsInWiki.Add(page.title.ToLower());
            }

            //Bestimmte NPC Namen ausschließen
            npcsInWiki.Add("...");
            npcsInWiki.Add("grabstein");
            npcsInWiki.Add("roulette");
            npcsInWiki.Add("schild");
            npcsInWiki.Add("slotmaschine");
            npcsInWiki.Add("würfeltisch");

            //Mapskript
            List<string> mapscripts=FileSystem.GetFiles(Globals.folder_data_scripts_maps, false, "*.lua");

            foreach(string mapscript in mapscripts)
            {
                if(FileSystem.GetFilename(mapscript)=="uw-sandbox-o0000-o0000-o0000.lua")
                    continue;

                string[] lines=File.ReadAllLines(mapscript);

                foreach(string line in lines)
                {
                    //    create_npc("Isskel", 36, 17 * TILESIZE + 16, 21 * TILESIZE + 16, isskel_talk, nil) --- Isskel
                    if(line.Trim().StartsWith("create_npc"))
                    {
                        string npcname=line.Trim();
                        npcname=npcname.Replace("create_npc(\"", "");
                        npcname=npcname.Split(new char[] { '"' }, StringSplitOptions.RemoveEmptyEntries)[0];

                        npcname=npcname.Replace('_', ' ');

                        if(npcsInWiki.IndexOf(npcname.ToLower())==-1)
                        {
                            Console.WriteLine("NPC {0} in der Skriptdatei {1} ist nicht im Wiki dokumentiert.", npcname, FileSystem.GetFilename(mapscript));
                        }
                    }
                }
            }
        }
Exemplo n.º 3
0
        static void ExportMonstersVorkommenToMediawikiAPI()
        {
            string url=Globals.Options.GetElementAsString("xml.Options.Mediawiki.URL");
            string username=Globals.Options.GetElementAsString("xml.Options.Mediawiki.Username");
            string password=Globals.Options.GetElementAsString("xml.Options.Mediawiki.Passwort");

            Site wiki=new Site(url, username, password);

            PageList pl=new PageList(wiki);
            pl.FillAllFromCategory("Monster");
            pl.FillAllFromCategory("Pflanze");
            pl.Load();

            Dictionary<int, List<string>> MonsterMapList=GetAllMonsterSpawnsFromMaps();

            foreach(Page page in pl)
            {
                string text=page.text;

                //Monster ID ermitteln
                string start="{{Anker|AutomaticStartInfobox}}";
                string end="{Anker|AutomaticEndInfobox}}";
                int idxBeginInfobox=text.IndexOf(start, 0);
                int idxEndInfobox=text.IndexOf(end, 0);

                int lengthOfString=(idxEndInfobox-idxBeginInfobox)-start.Length-1;
                string infobox=text.Substring(idxBeginInfobox+start.Length, lengthOfString);

                int monsterIndex=-1;
                string[] splited=infobox.Split(new char[] { '|' }, StringSplitOptions.RemoveEmptyEntries);

                foreach(string entry in splited)
                {
                    string tmpEntry=entry.Replace(" ", "").ToLower();
                    if(tmpEntry.IndexOf("id=")!=-1)
                    {
                        string[] splited2=tmpEntry.Split(new char[] { '=' }, StringSplitOptions.RemoveEmptyEntries);
                        monsterIndex=Convert.ToInt32(splited2[1]);
                        break;
                    }
                }

                //Monster Vorkommen ermitteln
                start="{{Anker|AutomaticStartAppearance}}";
                end="{Anker|AutomaticEndAppearance}}";
                idxBeginInfobox=text.IndexOf(start, 0);
                idxEndInfobox=text.IndexOf(end, 0);

                lengthOfString=(idxEndInfobox-idxBeginInfobox)-start.Length-1;
                string vorkommen=text.Substring(idxBeginInfobox+start.Length, lengthOfString);
                if(vorkommen!="\n")
                {
                    text=text.Replace(vorkommen, "");
                }

                if(monsterIndex==-1)
                    continue;

                string fnMonstersXml=Globals.folder_data+"monsters.xml";
                List<Monster> monsters=Monster.GetMonstersFromMonsterXml(fnMonstersXml);

                foreach(Monster monster in monsters)
                {
                    if(monster.ID==monsterIndex)
                    {
                        List<string> mv=GetMonsterAppearance(monster.ID, MonsterMapList);
                        string mvRolled="{{Anker|AutomaticStartAppearance}}";

                        foreach(string mventry in mv)
                        {
                            mvRolled+=mventry+"\n";
                        }

                        if(mv.Count==0)
                        {
                            mvRolled+="* das Monster kommt auf keiner Karte vor\n";
                        }

                        text=text.Replace(start, mvRolled);

                        if(page.text!=text)
                        {
                            page.text=text;
                            page.Save("Bot: Vorkommen Monster aktualisiert.", true);
                        }
                        break;
                    }
                }
            }
        }
Exemplo n.º 4
0
        static void ExportPlantsTableToMediawikiAPI()
        {
            string url=Globals.Options.GetElementAsString("xml.Options.Mediawiki.URL");
            string username=Globals.Options.GetElementAsString("xml.Options.Mediawiki.Username");
            string password=Globals.Options.GetElementAsString("xml.Options.Mediawiki.Passwort");

            Site wiki=new Site(url, username, password);

            Page page=new Page(wiki, "Liste der Pflanzen");
            page.Load();

            string monsterlist=GetPlantAsMediaWiki();

            //Monster Vorkommen ermitteln
            string text=page.text;
            string start="{{Anker|AutomaticStartPlantList}}";
            string end="{Anker|AutomaticEndPlantList}}";
            int idxBeginInfobox=text.IndexOf(start, 0);
            int idxEndInfobox=text.IndexOf(end, 0);

            int lengthOfString=(idxEndInfobox-idxBeginInfobox)-start.Length-1;

            string monsterdrops=text.Substring(idxBeginInfobox+start.Length, lengthOfString);
            if(monsterdrops!="\n")
            {
                text=text.Replace(monsterdrops, "");
            }

            string replaceString="{{Anker|AutomaticStartPlantList}}\n"+monsterlist;
            text=text.Replace(start, replaceString);

            if(page.text!=text)
            {
                page.text=text;
                page.Save("Bot: Liste der Pflanzen aktualisiert.", true);
            }
        }
Exemplo n.º 5
0
        static void ExportMonstersDropsToMediawikiAPI()
        {
            string url=Globals.Options.GetElementAsString("xml.Options.Mediawiki.URL");
            string username=Globals.Options.GetElementAsString("xml.Options.Mediawiki.Username");
            string password=Globals.Options.GetElementAsString("xml.Options.Mediawiki.Passwort");

            Site wiki=new Site(url, username, password);

            PageList pl=new PageList(wiki);
            pl.FillAllFromCategory("Monster");
            pl.FillAllFromCategory("Pflanze");
            pl.Load();

            string fnMonsterXml=Globals.folder_data+"monsters.xml";
            string fnItemsXml=Globals.folder_data+"items.xml";

            List<Monster> monsters=Monster.GetMonstersFromMonsterXml(fnMonsterXml);
            List<Item> items=Item.GetItemsFromItemsXml(fnItemsXml);

            foreach(Page page in pl)
            {
                string text=page.text;

                //Monster ID ermitteln
                string start="{{Anker|AutomaticStartInfobox}}";
                string end="{Anker|AutomaticEndInfobox}}";
                int idxBeginInfobox=text.IndexOf(start, 0);
                int idxEndInfobox=text.IndexOf(end, 0);

                int lengthOfString=(idxEndInfobox-idxBeginInfobox)-start.Length-1;
                string infobox=text.Substring(idxBeginInfobox+start.Length, lengthOfString);

                int monsterIndex=-1;
                string[] splited=infobox.Split(new char[] { '|' }, StringSplitOptions.RemoveEmptyEntries);

                foreach(string entry in splited)
                {
                    string tmpEntry=entry.Replace(" ", "").ToLower();
                    if(tmpEntry.IndexOf("id=")!=-1)
                    {
                        string[] splited2=tmpEntry.Split(new char[] { '=' }, StringSplitOptions.RemoveEmptyEntries);
                        monsterIndex=Convert.ToInt32(splited2[1]);
                        break;
                    }
                }

                //Monster Vorkommen ermitteln
                start="{{Anker|AutomaticStartDrops}}";
                end="{Anker|AutomaticEndDrops}}";
                idxBeginInfobox=text.IndexOf(start, 0);
                idxEndInfobox=text.IndexOf(end, 0);

                lengthOfString=(idxEndInfobox-idxBeginInfobox)-start.Length-1;
                string vorkommen=text.Substring(idxBeginInfobox+start.Length, lengthOfString);
                if(vorkommen!="\n")
                {
                    text=text.Replace(vorkommen, "");
                }

                if(monsterIndex==-1)
                    continue;

                foreach(Monster monster in monsters)
                {
                    if(monster.ID==monsterIndex)
                    {
                        string droplines="Folgende Items werden von dem Monster gedropt:\n\n";
                        droplines+="{{DropTableStart}}\n";

                        foreach(Drop drop in monster.Drops)
                        {
                            Item dropItem=null;

                            foreach(Item si in items)
                            {
                                if(si.ID==drop.Item)
                                {
                                    dropItem=si;
                                    break;
                                }
                            }

                            if(dropItem==null)
                            {
                                droplines+=String.Format("{{{{DropTableRow| {0} | 0 %}}}}\n", "Unbekanntes Item");
                            }
                            else
                            {
                                droplines+=String.Format("{{{{DropTableRow| [[item-{0}|{1}]] | {2} %}}}}\n", dropItem.ID, dropItem.Name, drop.Percent);
                            }
                        }

                        if(monster.Drops.Count==0)
                        {
                            droplines="\n* keine Drops vorhanden\n";
                        }
                        else
                        {
                            droplines+="{{DropTableEnd}}\n";
                        }

                        string replaceString="{{Anker|AutomaticStartDrops}}"+droplines;
                        text=text.Replace(start, replaceString);

                        if(page.text!=text)
                        {
                            page.text=text;
                            page.Save("Bot: Drops Monster aktualisiert.", true);
                        }
                        break;
                    }
                }
            }
        }
Exemplo n.º 6
0
        static void ExportMonstersInfoboxToMediawikiAPI()
        {
            string fnItemsXml=Globals.folder_data+"items.xml";
            List<Item> items=Item.GetItemsFromItemsXml(fnItemsXml);

            string url=Globals.Options.GetElementAsString("xml.Options.Mediawiki.URL");
            string username=Globals.Options.GetElementAsString("xml.Options.Mediawiki.Username");
            string password=Globals.Options.GetElementAsString("xml.Options.Mediawiki.Passwort");

            Site wiki=new Site(url, username, password);

            PageList pl=new PageList(wiki);
            pl.FillAllFromCategory("Monster");
            pl.FillAllFromCategory("Pflanze");
            pl.Load();

            foreach(Page page in pl)
            {
                string text=page.text;

                //Monster ID ermitteln
                string start="{{Anker|AutomaticStartInfobox}}";
                string end="{Anker|AutomaticEndInfobox}}";
                int idxBeginInfobox=text.IndexOf(start, 0);
                int idxEndInfobox=text.IndexOf(end, 0);

                int lengthOfString=(idxEndInfobox-idxBeginInfobox)-start.Length-1;
                string infobox=text.Substring(idxBeginInfobox+start.Length, lengthOfString);

                int monsterIndex=-1;
                string[] splited=infobox.Split(new char[] { '|' }, StringSplitOptions.RemoveEmptyEntries);

                foreach(string entry in splited)
                {
                    string tmpEntry=entry.Replace(" ", "").ToLower();
                    if(tmpEntry.IndexOf("id=")!=-1)
                    {
                        string[] splited2=tmpEntry.Split(new char[] { '=' }, StringSplitOptions.RemoveEmptyEntries);
                        monsterIndex=Convert.ToInt32(splited2[1]);
                        break;
                    }
                }

                if(infobox!="\n")
                {
                    text=text.Replace(infobox, "");
                }

                if(monsterIndex==-1)
                    continue;

                //Infobox updaten
                string fnMonstersXml=Globals.folder_data+"monsters.xml";

                List<Monster> monsters=Monster.GetMonstersFromMonsterXml(fnMonstersXml);

                foreach(Monster monster in monsters)
                {
                    if(monster.ID==monsterIndex)
                    {
                        string replaceString="{{Anker|AutomaticStartInfobox}}"+monster.ToMediaWikiInfobox(items);

                        text=text.Replace(start, replaceString);

                        if(page.text!=text)
                        {
                            page.text=text;
                            page.Save("Bot: Infobox Monster aktualisiert.", true);
                        }
                        break;
                    }
                }
            }
        }
Exemplo n.º 7
0
 /// <summary>This constructor creates empty PageList object using most recently
 /// created Site object.</summary></summary>
 /// <returns>Returns the PageList object.</returns>
 public PageList()
 {
     site = Bot.GetMostRecentSiteObject();
 }
Exemplo n.º 8
0
        static void ExportItemMonstersDropsToMediawikiAPI()
        {
            string url=Globals.Options.GetElementAsString("xml.Options.Mediawiki.URL");
            string username=Globals.Options.GetElementAsString("xml.Options.Mediawiki.Username");
            string password=Globals.Options.GetElementAsString("xml.Options.Mediawiki.Passwort");

            Site wiki=new Site(url, username, password);

            PageList pl=new PageList(wiki);
            pl.FillAllFromCategory("Item");
            pl.Load();

            string fnMonsterXml=Globals.folder_data+"monsters.xml";

            List<Monster> monsters=Monster.GetMonstersFromMonsterXml(fnMonsterXml);

            foreach(Page page in pl)
            {
                string text=page.text;

                //Monster ID ermitteln
                string start="{{Anker|AutomaticStartInfobox}}";
                string end="{Anker|AutomaticEndInfobox}}";
                int idxBeginInfobox=text.IndexOf(start, 0);
                int idxEndInfobox=text.IndexOf(end, 0);

                int lengthOfString=(idxEndInfobox-idxBeginInfobox)-start.Length-1;
                string infobox=text.Substring(idxBeginInfobox+start.Length, lengthOfString);

                int itemIndex=-1;
                string[] splited=infobox.Split(new char[] { '|' }, StringSplitOptions.RemoveEmptyEntries);

                foreach(string entry in splited)
                {
                    string tmpEntry=entry.Replace(" ", "").ToLower();
                    if(tmpEntry.IndexOf("id=")!=-1)
                    {
                        string[] splited2=tmpEntry.Split(new char[] { '=' }, StringSplitOptions.RemoveEmptyEntries);
                        itemIndex=Convert.ToInt32(splited2[1]);
                        break;
                    }
                }

                //Monster Vorkommen ermitteln
                start="{{Anker|AutomaticStartDrops}}";
                end="{Anker|AutomaticEndDrops}}";
                idxBeginInfobox=text.IndexOf(start, 0);
                idxEndInfobox=text.IndexOf(end, 0);

                lengthOfString=(idxEndInfobox-idxBeginInfobox)-start.Length-1;
                string monsterdrops=text.Substring(idxBeginInfobox+start.Length, lengthOfString);
                if(monsterdrops!="\n")
                {
                    text=text.Replace(monsterdrops, "");
                }

                if(itemIndex==-1)
                    continue;

                string droplines="Folgende Monster dropen das Item:\n\n";
                droplines+="{{DropTableStart}}\n";

                bool OneDrop=false;

                foreach(Monster monster in monsters)
                {
                    if(monster.ID>=10000)
                        continue; //Pflanzen etc haben keine "Drops"

                    foreach(Drop drop in monster.Drops)
                    {
                        if(drop.Item==itemIndex)
                        {
                            OneDrop=true;
                            droplines+=String.Format("{{{{DropTableRow| [[monster-{0}|{1}]] | {2} %}}}}\n", monster.ID, monster.Name, drop.Percent);
                        }
                    }
                }

                if(OneDrop==false)
                {
                    droplines="\n* kein Monster dropt dieses Item\n";
                }
                else
                {
                    droplines+="{{DropTableEnd}}\n";
                }

                string replaceString="{{Anker|AutomaticStartDrops}}"+droplines;
                text=text.Replace(start, replaceString);

                if(page.text!=text)
                {
                    page.text=text;
                    page.Save("Bot: Item Drops aktualisiert.", true);
                }
            }
        }
Exemplo n.º 9
0
 /// <summary>This constructor creates PageList object with specified Site object and fills
 /// it with Page objects with specified titles. When constructed, new Page objects
 /// in PageList don't contain text. Use Load() method to get text from live wiki,
 /// or use LoadWithMetadata() to get both text and metadata via
 /// XML export interface.</summary>
 /// <param name="site">Site object, it must be constructed beforehand.</param>
 /// <param name="pageNames">Page titles in List object.</param>
 /// <returns>Returns the PageList object.</returns>
 public PageList(Site site, List<string> pageNames)
 {
     this.site = site;
     foreach (string pageName in pageNames)
         pages.Add(new Page(site, pageName));
     CorrectNsPrefixes();
 }
Exemplo n.º 10
0
 /// <summary>This constructor creates empty PageList object with specified
 /// Site object.</summary>
 /// <param name="site">Site object, it must be constructed beforehand.</param>
 /// <returns>Returns the PageList object.</returns>
 public PageList(Site site)
 {
     this.site = site;
 }
Exemplo n.º 11
0
 /// <summary>This constructor creates Page object without title using most recently
 /// created Site object.</summary>
 /// <returns>Returns Page object.</returns>
 public Page()
 {
     this.site = Bot.GetMostRecentSiteObject();
 }
Exemplo n.º 12
0
 /// <summary>This constructor creates Page object with specified page's numeric revision ID
 /// (also called "oldid") using most recently created Site object.</summary>
 /// <param name="revision">Page's numeric revision ID (also called "oldid").</param>
 /// <returns>Returns Page object.</returns>
 public Page(Int64 revisionId)
 {
     if (revisionId <= 0)
         throw new ArgumentOutOfRangeException("revisionID",
             Bot.Msg("Revision ID must be positive."));
     this.site = Bot.GetMostRecentSiteObject();
     revision = revisionId.ToString();
     GetTitle();
 }
Exemplo n.º 13
0
 /// <summary>This constructor creates Page object with specified page's numeric revision ID
 /// (also called "oldid"). Page title is retrieved automatically
 /// in this constructor.</summary>
 /// <param name="site">Site object, it must be constructed beforehand.</param>
 /// <param name="revision">Page's numeric revision ID (also called "oldid").</param>
 /// <returns>Returns Page object.</returns>
 public Page(Site site, Int64 revisionId)
 {
     if (revisionId <= 0)
         throw new ArgumentOutOfRangeException("revisionID",
             Bot.Msg("Revision ID must be positive."));
     this.site = site;
     revision = revisionId.ToString();
     GetTitle();
 }
Exemplo n.º 14
0
 /// <summary>This constructor creates empty Page object with specified Site object,
 /// but without title. Avoid using this constructor needlessly.</summary>
 /// <param name="site">Site object, it must be constructed beforehand.</param>
 /// <returns>Returns Page object.</returns>
 public Page(Site site)
 {
     this.site = site;
 }
Exemplo n.º 15
0
        /// <summary>This constructor creates Page object with specified title and specified
        /// Site object. This is preferable constructor. Basic title normalization occurs during
        /// construction.
        /// When constructed, new Page object doesn't contain text, use Load() method to get text
        /// from live wiki or use LoadWithMetadata() to get both text and metadata.</summary>
        /// <param name="site">Site object, it must be constructed beforehand.</param>
        /// <param name="title">Page title as string.</param>
        /// <returns>Returns Page object.</returns>
        public Page(Site site, string title)
        {
            if (string.IsNullOrEmpty(title))
                throw new ArgumentNullException("title");
            if (title[0] == ':')
                title = title.TrimStart(new char[] { ':' });
            if (title.Contains('_'))
                title = title.Replace('_', ' ');

            this.site = site;
            this.title = title;

            /* // RESERVED, may interfere user intentions
            int ns = GetNamespace();
            RemoveNsPrefix();
            if (site.capitalization == "first-letter")
                title = Bot.Capitalize(title);
            title = site.namespaces[ns] + title;
            */
        }