Improving productivity by useful collaborative webapps

I work for a multinational company which means there are more sections collaborating, each with numerous people. Workplaces such like this aren’t famous for their well-organized structure, optimized resource usage, etc. Nowadays we’ve faced the problem of effective information sharing.

First attempt : MoinMoin

There was an attempt to build an usable knowledge base by using wiki so we’ve installed MoinMoin Wiki on our application server. Moin is a great python based wiki, installing under Debian is very easy:

Installation:

apt-get install python-moinmoin
mkdir /var/www/monkeywiki
cp usr/share/moin/data /var/www/monkeywiki/
cp usr/share/moin/underlay /var/www/monkeywiki/
chown root:www-data /var/www/monkeywiki -R
chmod 775 /var/www/monkeywiki -R

In /etc/moin/ copy the basic mywiki.py an edit it according to your needs (fore example monkeywiki.py ). Change the “datadir” to “./data”. Then edit farmconfig.py and add your wiki to the wikilist.

With the following apache siteconfig, everything works:

ScriptAlias /monkeywiki “/var/www/monkeywiki/moin.cgi”
alias /moin_static182 “/usr/share/moin/htdocs”
alias /wiki “/usr/share/moin/htdocs”
<Directory /usr/share/moin/htdocs>
Order allow,deny
allow from all
</Directory>

Enable it:

a2ensite pastebin
apache2ctl restart

How it looks:

MoinMoin Wiki

MoinMoin Wiki

But … there are a lot of internal sites which are hardly searchable if you don’t know what you exactly are searching. And quick sharing different type of information (example code snippets, logs, configs, links, etc) is also uneasy, slow. So this is not a perfect solution, but it is useful for writing articles.

The killer tool : Scuttle

Then, I’ve found Scuttle. Anyone who knows delicious will like scuttle. It is an open source delicious like social bookmarking system. It is even mostly compatible with delicious API so anything uses delicious by it’s API will probably work with a scuttle installation.The idea was to install scuttle and let everyone use it for bookmarking and tagging every useful page so they will be searchable by everyone. It was considered that one common user is enough, because there are no need of private and non-work related bookmarks.

Installation:

Scuttle is also available as a debian distribution package (talking about unstable sid) so the installation is very easy:

apt-get install scuttle

It puts things under /usr/share/scuttle, creates a database for it and configures apache2. The only thing I’ve ‘fine-tuned’ is the /usr/share/scuttle/www/register.php because it checks the e-mail address validity by default and I don’t want to set up any valid (and especially internal) e-mail address to this tool.

This is how does it look after adding some pages:

Scuttle

Scuttle

For firefox users, there are extensions for scuttle, which aren’t as good as the delicious bookmark extension, but very useful. I’ve found this (for firefox 3) a very interesting, it adds a “scuttle this” option in the right click menu, and a link for the homepage, which are also available as buttons. So all the user has to do is to use this extension or add a keyword to the scuttle search.

And the crown : Pastebin

So the easy and fast searching and sharing links part of the requirement has been done. Then I’ve found pastebin. It is a “collaborative debugging tool” which means it is very easy to share and edit code snippets, logs, config files, etc. It can do syntax highlighting and has the option to automatically delete snippets if you don’t need it forever. It is very useful if you want to share some log with a collague (instead sending the whole thing in a mail attachment you send only the link and pastebin will automatically delete the thing – if you want). And together with scuttle it is more useful. If you want to share some useful code, script, etc you just upload (paste) into pastebin and share the link with scuttle the same moment.

Installation:

Download pastebin from the site. Unzip into somewhere.

mkdir /var/www/pastebin
cp /tmp/pastebin/lib /var/www/pastebin/
cp /tmp/pastebin/public_html /var/www/pastebin/

For installing the database, create a new database, example “pastebin” and execute the following sql commands. I recommend phpmyadmin to do anything in mysql:

CREATE TABLE pastebin (
pid int(11) NOT NULL auto_increment,
poster varchar(16) default NULL,
posted datetime default NULL,
code text,
parent_pid int(11) default ‘0′,
format varchar(16) default NULL,
codefmt mediumtext,
codecss text,
domain varchar(255) default ”,
expires DATETIME,
expiry_flag ENUM(’d',’m', ‘f’) NOT NULL DEFAULT ‘m’,

PRIMARY KEY (pid),
KEY (domain),
KEY (parent_pid),
KEY (expires)
);

CREATE TABLE recent
(
domain varchar(255),
pid int NOT NULL,
seq_no int NOT NULL,

PRIMARY KEY(domain,seq_no)
);

Now the configuring:

In the pastebin/config/default.conf.php I’ve changed the mysql password, the script path and the url format and also commented out the google adsense line:

$CONF['dbpass']=’password1234′;

$CONF['url_format']=’/pastebin/%s’;

$CONF['this_script']=’/pastebin/pastebin.php’;

#$CONF['google_ad_client']=’pub-3281640380846080′;

Now only the apache2 configuration is left. I’ve configured it with url rewriting (mod_rewrite) because it’s cool, if you don’t want (or can’t) to use mod_rewrite then change the url format to something like this:

$CONF['url_format']=”/pastebin/pastebin.php?show=%s”;

This is the apache2 site config (/etc/apache2/sites-available/pastebin):

<Directory /var/www/pastebin>
RewriteEngine on
RewriteBase /pastebin/
RewriteRule ^([0-9]+)$ pastebin.php?show=$1
DirectoryIndex pastebin.php
</Directory

Enable it:

a2ensite pastebin
apache2ctl restart

I have made some some customized css file (blue and green ), because the basic theme does not fit me (Sorry Paul :) ). This is the green one:

Pastebin with green theme

Pastebin with green theme

I hope you like these ideas and you can use this post to set up an efficient knowledge base on your environment!

No Comments »

admin on August 2nd 2009 in Uncategorized