Websourcebrowser

Introduction

Websourcebrowser makes it easy to visually scan trees of source code. In particular, you can view the directory tree and the source code of a file side by side, so you can quickly change to a different file.

Some features of Websourcebrowser:

You can use Websourcebrowser by starting the script wsbrowser and pointing your web browser to the address http://localhost:8000/.

Go to the Websourcebrowser website to see screenshots.

Documentation

There's not much documentation for Websourcebrowser yet. However, once you started the program and typed the displayed URL into the address line of a web browser, the program should be easy to use after experimenting a bit with it.

To get help for the command line options, invoke the installed program with the help option:

$ wsbrowser --help

where $ is a shell prompt. Probably, the most useful options are --root and --line-numbers. Ignore patterns given via the command line option --ignore-pattern are added to those from the environment variable WSB_IGNORE. (Note that you can't use a whitespace-separated list with --ignore-pattern but instead use the option multiple times.)

There's an environment variable which influences Websourcebrowser. WSB_IGNORE can contain a whitespace-separated list of wildcards which are used as ignore patterns. My list is usually:

*.pyc  *.pyo  */.svn  *.svn/*  */.hg  */.hg/*  *.swp

which ignores Python bytecode files, version control files from Subversion and Mercurial, and Vim swap files.

Prerequisites

Websourcebrowser requires only Python, version 2.5 or later. It's recommended though not strictly necessary to also install Pygments to get syntax highlighting.

Using Websourcebrowser without installation

Though it's recommended, you don't have to install Websourcebrowser. Instead you can get away with extracting the source archive (see below) and adding the extracted directory to the PYTHONPATH environment variable. For example, if the directory is /home/me/downloads/websourcebrowser-0.2, add that to PYTHONPATH.

Installation

You install Websourcebrowser like most Python packages.

License

Websourcebrowser is Open Source Software, distributed under the MIT license.

Author

The author of Websourcebrowser is Stefan Schwarzer <sschwarzer@sschwarzer.net> . I'm thankful for feedback! :-)