Giter Site home page Giter Site logo

wikipediaphilosophy's Introduction

WikipediaPhilosophy

The alt text of xkcd 903 states:

Wikipedia trivia: if you take any article, click on the first link in the article text not in parentheses or italics, and then repeat, you will eventually end up at "Philosophy".

This is a python script that tests and visualizes that using pygraphviz.

Dependencies

Usage

wiki.py [-i iterations] [-o outfile] [-p] [-l layout] [-s start]
        -i : iterations, default is 10
        -o : outfile, without the file extension. 
             e.g. specifying '-o wiki' (the default)
             will output wiki.log, wiki.dot, and wiki.png
             if -p is specified
        -l : layout to be applied. One of 'twopi', 'neato', 
             'dot', 'fdp'. 'dot' is the default. 
        -p : print graph as png.
        -s : url to start searching from. Must be of the form
             /wiki/foo

Examples

wiki.py -p will generate three files: wiki.log, wiki.dot, and wiki.png

wiki.py -i 1 -s /wiki/xkcd -o xkcd -p will perform 1 iteration starting at the xkcd wikipedia page. The output files will be xkcd.log, xkcd.dot, and xkcd.png

wiki.py -i 100 -l twopi -p will greate a graph in the twopi format using 100 iterations.

Example Output

example output

Generated with wiki.py -p.

License

MIT

wikipediaphilosophy's People

Contributors

jdtw avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.