Menu

Tree [r39] /
 History

HTTPS access


File Date Author Commit
 VS2008 2013-10-21 code_driller [r21]
 VS2013 2016-02-13 code_driller [r39] version 3.15 (Feb 13, 2016)
 cache 2013-10-18 code_driller [r6]
 docs 2015-03-07 code_driller [r38] version 3.14 (Mar 7, 2015)
 legacy 2013-10-18 code_driller [r17]
 web 2015-03-07 code_driller [r38] version 3.14 (Mar 7, 2015)
 BatchFileUploader.cs 2013-10-18 code_driller [r14] Small GUI program for uploading sets of files t...
 BotInfo.cs 2016-02-13 code_driller [r39] version 3.15 (Feb 13, 2016)
 BotScript.cs 2013-10-21 code_driller [r20] 3.0 (Release)
 Compile & Run (Mono).bat 2015-02-13 code_driller [r37] version 3.13 (Feb 13, 2015)
 Compile & Run.bat 2013-10-18 code_driller [r15] End-user command-line script to compile and run...
 DebugBot.cs 2016-02-13 code_driller [r39] version 3.15 (Feb 13, 2016)
 DotNetWikiBot.cs 2016-02-13 code_driller [r39] version 3.15 (Feb 13, 2016)
 DotNetWikiBot.i18n.xml 2016-02-13 code_driller [r39] version 3.15 (Feb 13, 2016)
 DotNetWikiBot_msg_template.xml 2016-02-13 code_driller [r39] version 3.15 (Feb 13, 2016)
 GNU General Public License v2.0.htm 2013-10-18 code_driller [r19]
 Version history.txt 2016-02-13 code_driller [r39] version 3.15 (Feb 13, 2016)
 readme.html 2014-11-13 code_driller [r34] version 3.12beta

Read Me

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3. org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>DotNetWikiBot Framework</title>
<meta name="description" content="DotNetWikiBot Framework description and introduction." />
<meta name="keywords" content="DotNetWikiBot,Framework,wiki,MediaWiki,client,API,software,bot,robot,.NET,2.0,Mono,console,library,dll,C#,script,scripting,program,programming,develop,development,management,compile,download,learn,XML,XHTML,advanced,parsing,regular,expression,tutorial,web,Linux,Windows,free,freeware,open,source,code,.cs,Solaris,Mac,BSD,easy-to-learn,easy-to-use,educational,beginner,easy,easily,support,report,bug,feature,forum,tracker,good,learning,ready-to-use,clean,plain,classic,platform-independent,zip,stable,mature,release,run,file,package,Visual,Basic,Managed,C++,JScript,J#" />
<meta name="author" content="Iaroslav Vassiliev" />
<meta name="revised" content="2013-10-18" />
<style type="text/css">
<!--
body {
	font-family: Arial, Helvetica, Sans-serif;       
}

h1 {
	font-weight: normal;
	color: #000080;
	margin-top: 0px;	
	margin-bottom: 5px;
}

h2 {
	font-size:1 20%;
	font-weight: normal;
	margin-bottom: 10px;
}

p, ul, ol {
	line-height: 170%;
	padding-left: 5%;
	padding-right: 5%;	
}

pre.code {
	font-family: monospace;
	margin-left: 5%;
	margin-right: 5%;
	padding: 3%;
	background-color: #F8F8F8;
	border-style: solid;
	border-width: 1px;	
}

span.code_comment {
	color: #00AA00;
}

span.code_keyword {
	color: #0000FF;
}

span.code_string {
	color: #8B4513;
}

a.nav {
	text-decoration: none;
	color: #FFFFFF;
	font-weight: bold;
}

a:hover.nav {
	text-decoration: underline;
}
-->
</style>
</head>

<body>
<h1>DotNetWikiBot Framework</h1>
<table class="nav" style="width:100%; font-size:80%; line-height:100%; color:#FFFFFF; background-color:#000080">
<tr><td>
&nbsp;
<a class="nav" href="http://dotnetwikibot.sourceforge.net">Home</a> |
<a class="nav" href="http://sourceforge.net/project/showfiles.php?group_id=167838">Download</a> |
<a class="nav" href="http://sourceforge.net/tracker/?func=add&amp;group_id=167838&amp;atid=844535">Request a new feature</a> |
<a class="nav" href="http://sourceforge.net/tracker/?func=add&amp;group_id=167838&amp;atid=844532">Report a bug</a> |
<a class="nav" href="http://sourceforge.net/forum/forum.php?forum_id=572545">Ask for support</a>
</td></tr>
</table>

<h2>Purpose</h2>
<p>
DotNetWikiBot Framework is designed to help with many complicated and routine tasks of wiki site development and maintenance. DotNetWikiBot Framework is a  full-featured client API, that allows you to build programs and web robots easily to manage information on MediaWiki-powered sites. DotNetWikiBot Framework is also good for learning C# and .NET.
</p>

<h2>Some facts about DotNetWikiBot Framework</h2>
<ul>
<li>DotNetWikiBot Framework is an easy-to-learn and easy-to-use library (API) for programming applications and web robots, that could help in construction and maintenance of wiki sites.</li>
<li>DotNetWikiBot is compiled as a .NET dynamic link library (.dll file), that could be used directly or in other products.</li>
<li>DotNetWikiBot is written in <a href="http://msdn.microsoft.com/en-us/library/z1zx9t92(v=vs.90).aspx">C#</a>, based on <a href="http://www.microsoft.com/en-us/download/details.aspx?id=22">Microsoft® .NET Framework 3.5</a> and targets the sites running free <a href="http://www.mediawiki.org">MediaWiki</a> software.</li>
<li>Using <a href="http://www.mono-project.com/">Mono</a> framework, DotNetWikiBot can work under Linux, BSD, Solaris, Mac OS X and iPhone OS as well as under Windows.</li>
<li>Any .NET language can be used to access DotNetWikiBot library functions, including Visual Basic, Managed C++, JScript, J# and F#. Only minimal programming skills are required to make bots with DotNetWikiBot Framework, it allows to build bots in fast and simple manner.</li>
<li>DotNetWikiBot source code is located in a single .cs file, that could be easily changed and recompiled to suite your needs. It requires only C# compiler, no other tools.</li>
<li>DotNetWikiBot Framework is good for educational purposes. It's source code is written in a plain classic manner, allowing to learn object-oriented programming, .NET features, LINQ, web robots making, regular expressions and advanced XML parsing in a short time.</li>
<li>DotNetWikiBot doesn't require installation. It is downloaded in a single small .zip file along with compiled documentation, source code, ready-to-use sample bot script and sample GUI utility "BatchFileUploader.exe", that allows batch upload of files to wiki sites.</li>
<li>DotNetWikiBot is free.</li>
</ul>

<h2>Requirements</h2>
<p style="margin:0 0 0 0; padding:0 0 0 0">
Only a few things are required to run DotNetWikiBot Framework on .NET Framework 3.5:
</p>
<ul>
<!-- http://msdn.microsoft.com/en-us/library/bb882520(v=vs.90).aspx -->
<li>Microsoft .NET Framework 3.5-compatible machine.<br /><span style="font-size:70%">(minimum: 400 MHz processor, 96 Mb RAM, 280 Mb free disk space for 32-bit machines or 610 Mb for 64-bit machines)</span></li>
<li>Microsoft .NET Framework 3.5-compatible operating system.<br /><span style="font-size:70%">(any Microsoft OS suits starting with Windows XP SP2 and futher, except Windows Server 2003 Enterprise/Datacenter Edition for Itanium-based systems)</span></li>
<li><a href="http://www.microsoft.com/en-us/download/dlx/listdetailsview.aspx?id=25150">Microsoft .NET Framework 3.5</a> itself.<br /><span style="font-size:70%">(.NET Framework 3.5 redistributable package already has C# compiler (csc.exe) onboard and no other is required, although you can use .NET SDK or Visual Studio)</span></li>
<li>Text editor to edit source code.</li>
<li>Web browser to control bot activities on-line.</li>
</ul>
<p style="margin:0 0 0 0; padding:0 0 0 0">
The following is required to run DotNetWikiBot Framework on Mono:
</p>
<ul>
<li>Mono-compatible machine.<br /><span style="font-size:70%">(on <a href="http://www.mono-project.com/Supported_Platforms">this page</a> you can find the detailed list of supported architectures)</span></li>
<li>Mono-compatible operating system.<br /><span style="font-size:70%">(Linux, BSD, Mac OS X, iPhone OS, Sun Solaris, Nintendo Wii, Sony PlayStation 3, Microsoft Windows)</span></li>
<li><a href="http://www.mono-project.com/Downloads">Mono</a> framework 1.9 or higher.</li>
<li>Text editor to edit source code.</li>
<li>Web browser to control bot activities on-line.</li>
</ul>

<h2>Files</h2>
<p style="margin:0 0 0 0; padding:0 0 0 0">
DotNetWikiBot Framework package includes several files:
</p>
<ul title="DotNetWikiBot Framework package includes several files:">
<li>Readme.html - this introductory file.</li>
<li>DotNetWikiBot.dll - the compiled framework, it's a dynamic-link library.</li>
<li>DotNetWikiBot.cs - source code of the framework.</li>
<li>BotScript.cs - C# source code file ready to become your first bot. Contains some instructions and basic examples.</li>
<li>Documentation.chm - documentation file. It contains detailed description of DotNetWikiBot Framework's classes, types, properties and methods. A few examples are also available in it.</li>
<li>Compile &amp; Run.bat - fast-build batch script for Windows. It will compile and run BotScript.exe file. Run it to compile and launch your bot. Additional compilation instructions can be found inside this file.</li>
<li>DotNetWikiBot.i18n.xml - internationalization file which contains bot's interface messages, translated to other languages. You are welcome to translate messages in that file to your local language and send it back for redistribution. And you can add your own messages to that file too, if it is necessry.</li>
<li>BotInfo.netmodule (bundled with some versions) - assembly description module, which is necessary in some IDEs, when you reference DotNetWikiBot.dll in your project.</li>
<li>BatchFileUploader.exe - sample GUI utility, that allows batch upload of files to wiki sites.</li>
<li>BatchFileUploader.cs - C# source code file of "BatchFileUploader.exe" utility.</li>
<li>GNU General Public License v2.0.htm - license file.</li>
</ul>

<h2>Usage</h2>
<ol>
<li>Extract DotNetWikiBot Framework files from .zip package.</li>
<li>Open BotScript.cs file in any text editor. Look at the example code there.</li>
<li>Input some experimental code.</li>
<li>Make sure .NET Framework libraries and C# compiler is available. Correct path to C# compiler ("csc.exe" file) in "Compile &amp; Run.bat" file if necessary</li>
<li>Run "Compile &amp; Run.bat" file.</li>
<li>Debug your code.</li>
<li>Explore the documentation ("Documentation.chm" file) and the framework source code to deeper understand the framework's structure.</li>
</ol>

<h2>Short tutorial</h2>
<p>
There are only 3 types of objects in DotNetWikiBot Framework: Site, Page and PageList. They are used as follows.
</p>
<pre class="code">
<span class="keyword">using</span> DotNetWikiBot;	<span class="code_comment">// Reference DotNetWikiBot namespace for easy access</span>

<span class="keyword">class</span> MyBot : Bot	<span class="code_comment">// Derive your bot class from framework's Bot class</span>
{
    <span class="keyword">public static void</span> Main()
    {
        <span class="code_comment">// Firstly make Site object, specifying site's URL and your bot account</span>
        Site enWiki = <span class="code_keyword">new</span> Site(<span class="code_string">"http://en.wikipedia.org"</span>, <span class="code_string">"myBotLogin"</span>, <span class="code_string">"myPassword"</span>);
        <span class="code_comment">// Then make Page object, specifying site and page title in constructor</span>
        Page p = <span class="code_keyword">new</span> Page(enWiki, <span class="code_string">"Art"</span>);
        <span class="code_comment">// Load actual page text from live wiki</span>
        p.Load();
        <span class="code_comment">// Add "Visual arts" category link to "Art" page's text</span>
        p.AddToCategory(<span class="code_string">"Visual arts"</span>);
        <span class="code_comment">// Save "Art" article's text back to live wiki with specified comment</span>
        p.Save(<span class="code_string">"comment: category link added"</span>, <span class="code_keyword">true</span>);

        <span class="code_comment">// Make empty PageList object, representing collection of pages</span>
        PageList pl = <span class="code_keyword">new</span> PageList(enWiki);
        <span class="code_comment">// Fill it with 100 pages, where "nuclear disintegration" is mentioned</span>
        pl.FillFromGoogleSearchResults(<span class="code_string">"nuclear disintegration"</span>, 100);
        <span class="code_comment">// Load texts and metadata of all found pages from live wiki</span>
        pl.LoadWithMetadata();
        <span class="code_comment">// Now suppose, that we must correct some typical mistake in all our pages</span>
        <span class="code_keyword">foreach</span> (Page i <span class="code_keyword">in</span> pl)
            <span class="code_comment">// In each page we will replace one phrase with another</span>
            i.text = i.text.Replace(<span class="code_string">"fusion products"</span>, <span class="code_string">"fission products"</span>);
        <span class="code_comment">// Finally we'll save all changed pages to wiki with 5 seconds interval</span>			
        pl.SaveSmoothly(5, <span class="code_string">"comment: mistake autocorrection"</span>, <span class="code_keyword">true</span>);
		
        <span class="code_comment">// Now clear our PageList so we could re-use it</span>
        pl.Clear();
        <span class="code_comment">// Fill it with all articles in "Astronomy" category and it's subcategories</span>
        pl.FillFromCategoryTree(<span class="code_string">"Astronomy"</span>);
        <span class="code_comment">// Download and save all PageList's articles to specified local XML file</span>
        pl.SaveXmlDumpToFile(<span class="code_string">"Dumps\\ArticlesAboutAstronomy.xml"</span>);		
    }
}
</pre>
<p>
A very compehensive DotNetWikiBot usage examples can be found
in <a href="http://sourceforge.net/p/dotnetwikibot/svn/HEAD/tree/DebugBot.cs">unit testing file called DebugBot.cs</a>.
Refer to documentation for functions details.
</p>

<p>
<i>Bot scripts <a href="https://sourceforge.net/apps/mediawiki/dotnetwikibot/index.php?title=Bot_Scripts_Repository">repository</a> is being created. You are welcome to share your scripts.</i>
</p>

<h2>License</h2>
<p>
DotNetWikiBot Framework is available under GNU General Public License, version 2.<br />
Full text of the license in English is located in "GNU General Public License v2.0.htm" file.<br />
You can find license texts in local languages at <a href="http://www.gnu.org/licenses/gpl-2.0.html">GNU site</a>.
</p>

<hr />

<p>
<a href="http://sourceforge.net/projects/dotnetwikibot" style="float:right; padding-left:10px; margin-bottom:20px"><img src="http://sflogo.sourceforge.net/sflogo.php?group_id=167838&type=13" width="120" height="30" border="0" alt="Get DotNetWikiBot Framework at SourceForge.net. Fast, secure and Free Open Source software downloads" /></a>

<a href="http://validator.w3.org/check?uri=referer" style="float:right; padding-left:10px; padding-bottom:20px"><img src="http://www.w3.org/Icons/valid-xhtml11" style="border:none" alt="Valid XHTML 1.1" height="31" width="88" /></a>
</p>

</body>
</html>