User:MiniBot/Mapping

From eRepublik Official Wiki
Jump to: navigation, search

The idea

I wanted to know how the wiki looks like

The tools

The Bot

I had a bot, a program that can travel the wiki much faster than I can

RadialNet

I had found [www.dca.ufrn.br/~joaomedeiros/radialnet RadialNet], that is a program which can draw maps of a net starting from a nmap output.

I've modified it to load special formatted files.

The procedure

Preparing

I've studied nmap output format, to adapt it to my needs, removing all the unnecessary information.

The BIG reading

I've written a bot module that:

  1. Fetches the list of pages Special:AllPages (the code will be posted soon)
  2. Loads, for every(yes, that's the longest thing to do) page on the wiki the Special:Whatlinkshere page
  3. Prints out in a specific format the information fetched

The conversion

I've written a program that:

  1. Reads the output of the big reading module
  2. Prints out a file in nmap format, detailing all the links from main page to every page (that means that every page that is linked from main page has all his links inserted)
  3. Prints out the number of pages it wasn't able to add (the number, atm is ~162)

The map

At this point everyone can open the resulting xml file, using the modified version of RadialNet (watch out because it's VERY HEAVY on CPU, something like 100% cpu for 1 minute on an economic quad core)

What do you need to build the map

Downloading the links info and creating the map source file

You'll need:

  • [www.mono-project.com/ Mono] or the Microsoft .Net Framework
  • If you want to compile the code yourself you'll need Monodevelop or a knowledge of the command line.
  • A wiki account (a bot account is not needed, because we are only reading pages)
  • The code or the program (uploading it in a short while)
  • Patience (the operation takes about 12 minutes, mostly depending on internet connection speed)

Viewing the map

You'll need:

  • RadialNet, which indeed imply having
  • My modified version of integration.py (uploading it in a short while)
  • Patience (loading and drawing the map takes about 3.30 minutes, mostly depending on your cpu)