Welcome to the documentation of DotNetDataBot
DotNetDataBot is an extension of DotNetWikiBot to fit to Wikibase, an extension of MediaWiki. It is written in C# and runs on .NET Framework 2.0 and higher.
Download
If you want to have a look at the source code, go to DotNetDataBot on GitHub. You can also download the compiled binaryfiles. Click here to get the package. By downloading you make sure that you agree with the license of this software. After unpacking it you can see a file called DotNetDataBot.dll
and one called DotNetDataBot.xml
. The xml document is only for documentation. To use it you have to create a new refer in your project. Then you can write using DotNetDataBot;
to import the framework.
Download now
Example
Here is a short example how you can use DotNetData framework:
using DotNetDataBot; namespace MyBot { class Example { public static void Main(string[] args) { Site site = new Site("http://www.wikidata.org", "username", "#####"); // your user info // Edit an existing item Item item = new Item(site, "Q2"); item.setSiteLink("en", "Earth"); // set sitelink for item Q2 item.lang = "en"; // set the language for working to en item.setLabel("Earth"); // set the label (same to item.setLabel("en", "Earth");) item.setDescription("planet"); // set the description System.Collections.Generic.List<string> aliases = new System.Collections.Generic.List<string>(); // create list for aliases aliases.Add("Terra"); aliases.Add("the Blue Planet"); item.setAliases(aliases); // set the aliases // create a new item Item newItem = new Item(site); newItem.createItem("en", "Wikidata", "Wikidata", "database for collecting interwikilinks"); } } }
References
This framework was originally created for User:BeneBot*. If you have any questions, you can also ask them at the bot's userpage.
Licence
DotNetWikiBot Framework is available under The MIT License (also called X11 license). Below is the text of the license.
- Copyright © Iaroslav Vassiliev (2006-2012) <codedriller [at] gmail [dot] com>
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
The extension DotNetDataBot is available under the same license with copyright:
- Copyright © Bene* at http://www.wikidata.org (2012)