forked from justinabrahms/randall
/
README
57 lines (41 loc) · 1.63 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
Randall, the Rememberer.
========================
Randall is a simple daemon that will look for very short urls and
direct you to where you want to go. You can define these small
redirections through a minimal web UI, backed by your own /etc/hosts
file.
Examples
--------
# Static redirections
m/ -> mail.google.com/
m2/ -> mail.google.com/u/2/
docs/ -> docs.google.com/
# Someday, we might have more complex redirections using capturing
# groups, such as:
s/1/1293 -> sprint.ly/products/1/ticket/1293
How it works
------------
1. Randall writes the things you want him to remember in your
/etc/hosts file.
2. When you navigate to them, he ushers you to his web server which
then 302's you to the correct location.
Randall just uses some special syntax in your /etc/hosts file, if you
don't want to use his web UI. The basic formula is:
127.0.0.1 my_short_name_here # => http://path/to/long/name
This will setup a redirect from my_short_name_here to
http://path/to/long/name
Getting up and running
----------------------
1. Create & activate a virtualenv for Randall's dependencies to be
installed in.
2. Install the requirements via `pip install -r requirements.txt`
3. Run `sudo ./randall.py`
4. Navigate to http://localhost/ to get started.
Caveats
-------
Randall must be run with sudo privledges. This is because he alters
your /etc/hosts file and his webserver listens on port 80.
Randall is currently in very early stages. He's perfectly functional,
but isn't battle-scarred. Specifically the way he writes to your
/etc/hosts may be 'incorrect'. He nor I take responsibility for
brokenness (though we do our bests to make backups).