mySSUS

What is it? Features

mySSUS is my Simple Short URL Service and it has the following features:

manage a hierarchical set of short URLs and their long translations

do not use a database

instead use simple ASCII files that can be created automatically or manually (whatever you prefer)

program is one Python file of ~ 3 KByte size

free software (GPL licensed)

Reasons for mySSUS; what the "database" looks like

Short URLs can be managed in a hierarchical way. The tool came into existence because I
needed a short URL service for the magazine I work for (EasyLinux). This was the task:
In

every issue of the magazine (first hierarchy layer) we have

several articles (second layer)

and each article has an info box with several links (third layer)

I searched for a tool that would let me create some kind of formatted file for each
issue, giving the translations from short to long URLs. When finished with writing/creating
that file it should be uploaded and be done with.

Empty lines will be ignored, but you can enter them in order to make the data file
readable. Separation of short and long URL happens with \t (tab) in this case,
you can reconfigure mySSUS to use something different. However the separator should
be something that will not appear anywhere else. If it does appear elsewhere, the
tool breaks (it is "simple", as promised).

The short URLs have a syntax which represents the hierarchy mentioned above. In the
example URL a1b4 the parts mean:

a1: issue (in my private notation that is: a=2010, 1=issue 1 of that year), use
anything you like, it just has to be two characters long

b: article ID within that issue

4: URL number within that article

Simple, isn't it? a2f9 would be the 9th URL in the "f" article of issue 02/2010.

The file contains header entries (a1, a1a, a1b in the example). The first one (a1)
is required for the file, it names the issue. The other ones (a1a, a1b) name articles,
and they will be shown in some situations if available.

Setup

In order to use mySSUS, you need to do three things:

put the index.py from the archive in the document root of your Apache installation
(or the virtual host's document root)

This basically maps every file request to index.py unless there's a file or
directory by that name. So don't create other content on the same host that
looks like a valid short URL.

Also you will have to provide at least one data file to make any use of the
software, but it will work without one, just displaying the standard texts.

Screenshot

This is what it will look like. (The sample images shows what you see when using
a short URL that cannot be found but seems to belong to an issue that is
known. If you enter a correct short URL you will be redirected after two
seconds.)

Download

mySSUS comes as a tar.gz archive containing index.py, a sample a1.data file
and some documentation.

License

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.