annotate README.txt @ 5:7328744920de

adding README file
author k0s <k0scist@gmail.com>
date Wed, 03 Mar 2010 01:07:17 -0500
parents
children a62fbff067f8
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
5
7328744920de adding README file
k0s <k0scist@gmail.com>
parents:
diff changeset
1 smartopen
7328744920de adding README file
k0s <k0scist@gmail.com>
parents:
diff changeset
2 =========
7328744920de adding README file
k0s <k0scist@gmail.com>
parents:
diff changeset
3
7328744920de adding README file
k0s <k0scist@gmail.com>
parents:
diff changeset
4 smartopen is a command line program that will transform text according
7328744920de adding README file
k0s <k0scist@gmail.com>
parents:
diff changeset
5 to handlers to URLs and open them
7328744920de adding README file
k0s <k0scist@gmail.com>
parents:
diff changeset
6
7328744920de adding README file
k0s <k0scist@gmail.com>
parents:
diff changeset
7 Usage
7328744920de adding README file
k0s <k0scist@gmail.com>
parents:
diff changeset
8 -----
7328744920de adding README file
k0s <k0scist@gmail.com>
parents:
diff changeset
9
7328744920de adding README file
k0s <k0scist@gmail.com>
parents:
diff changeset
10 ``smartopen --help`` displays the program usage:
7328744920de adding README file
k0s <k0scist@gmail.com>
parents:
diff changeset
11
7328744920de adding README file
k0s <k0scist@gmail.com>
parents:
diff changeset
12 """
7328744920de adding README file
k0s <k0scist@gmail.com>
parents:
diff changeset
13 Usage: smartopen [options]
7328744920de adding README file
k0s <k0scist@gmail.com>
parents:
diff changeset
14
7328744920de adding README file
k0s <k0scist@gmail.com>
parents:
diff changeset
15 Options:
7328744920de adding README file
k0s <k0scist@gmail.com>
parents:
diff changeset
16 -h, --help show this help message and exit
7328744920de adding README file
k0s <k0scist@gmail.com>
parents:
diff changeset
17 -c CONFIG, --config=CONFIG
7328744920de adding README file
k0s <k0scist@gmail.com>
parents:
diff changeset
18 config file to read
7328744920de adding README file
k0s <k0scist@gmail.com>
parents:
diff changeset
19 -u, --url print the first url handled
7328744920de adding README file
k0s <k0scist@gmail.com>
parents:
diff changeset
20 -a, --all print all handlers that match the query
7328744920de adding README file
k0s <k0scist@gmail.com>
parents:
diff changeset
21 -H HANDLERS, --handler=HANDLERS
7328744920de adding README file
k0s <k0scist@gmail.com>
parents:
diff changeset
22 name of the handler to use, in order
7328744920de adding README file
k0s <k0scist@gmail.com>
parents:
diff changeset
23 --print-handlers print all handlers in order they would be tried
7328744920de adding README file
k0s <k0scist@gmail.com>
parents:
diff changeset
24 """
7328744920de adding README file
k0s <k0scist@gmail.com>
parents:
diff changeset
25
7328744920de adding README file
k0s <k0scist@gmail.com>
parents:
diff changeset
26 smartopen reads text from standard input or command line arguments.
7328744920de adding README file
k0s <k0scist@gmail.com>
parents:
diff changeset
27 The handlers are then iterated through in a configurable order and, if
7328744920de adding README file
k0s <k0scist@gmail.com>
parents:
diff changeset
28 the handler can transform the text into a URL, the URL is then
7328744920de adding README file
k0s <k0scist@gmail.com>
parents:
diff changeset
29 processed. Unless otherwise specified by command line options
7328744920de adding README file
k0s <k0scist@gmail.com>
parents:
diff changeset
30 (e.g. --url, --all), the first matching URL is then opened in firefox.
7328744920de adding README file
k0s <k0scist@gmail.com>
parents:
diff changeset
31
7328744920de adding README file
k0s <k0scist@gmail.com>
parents:
diff changeset
32
7328744920de adding README file
k0s <k0scist@gmail.com>
parents:
diff changeset
33 Handlers
7328744920de adding README file
k0s <k0scist@gmail.com>
parents:
diff changeset
34 --------
7328744920de adding README file
k0s <k0scist@gmail.com>
parents:
diff changeset
35
7328744920de adding README file
k0s <k0scist@gmail.com>
parents:
diff changeset
36 smartopen has a pluggable system of configurable handlers. The
7328744920de adding README file
k0s <k0scist@gmail.com>
parents:
diff changeset
37 setuptools entry point ``[smartopen.locations]`` is an extension point
7328744920de adding README file
k0s <k0scist@gmail.com>
parents:
diff changeset
38 for the handlers. Several handlers come with smartopen, or you can
7328744920de adding README file
k0s <k0scist@gmail.com>
parents:
diff changeset
39 write your own.
7328744920de adding README file
k0s <k0scist@gmail.com>
parents:
diff changeset
40
7328744920de adding README file
k0s <k0scist@gmail.com>
parents:
diff changeset
41 URL: a resolvable URL
7328744920de adding README file
k0s <k0scist@gmail.com>
parents:
diff changeset
42 Google: a google search
7328744920de adding README file
k0s <k0scist@gmail.com>
parents:
diff changeset
43 Wikipedia: a Wikipedia article
7328744920de adding README file
k0s <k0scist@gmail.com>
parents:
diff changeset
44 GoogleMaps: an address in google maps
7328744920de adding README file
k0s <k0scist@gmail.com>
parents:
diff changeset
45
7328744920de adding README file
k0s <k0scist@gmail.com>
parents:
diff changeset
46
7328744920de adding README file
k0s <k0scist@gmail.com>
parents:
diff changeset
47 Configuration
7328744920de adding README file
k0s <k0scist@gmail.com>
parents:
diff changeset
48 -------------
7328744920de adding README file
k0s <k0scist@gmail.com>
parents:
diff changeset
49
7328744920de adding README file
k0s <k0scist@gmail.com>
parents:
diff changeset
50 smartopen uses a configuration file that defines the order of the
7328744920de adding README file
k0s <k0scist@gmail.com>
parents:
diff changeset
51 handlers and their behavior.
7328744920de adding README file
k0s <k0scist@gmail.com>
parents:
diff changeset
52
7328744920de adding README file
k0s <k0scist@gmail.com>
parents:
diff changeset
53
7328744920de adding README file
k0s <k0scist@gmail.com>
parents:
diff changeset
54 Interfacing With Your Environment
7328744920de adding README file
k0s <k0scist@gmail.com>
parents:
diff changeset
55 ---------------------------------
7328744920de adding README file
k0s <k0scist@gmail.com>
parents:
diff changeset
56
7328744920de adding README file
k0s <k0scist@gmail.com>
parents:
diff changeset
57 While smartopen is useful of its own right, its utility may be
7328744920de adding README file
k0s <k0scist@gmail.com>
parents:
diff changeset
58 enhanced by using as part of an environment. For instance, I run the
7328744920de adding README file
k0s <k0scist@gmail.com>
parents:
diff changeset
59 fluxbox window manager which allows the use of hotkeys. By binding
7328744920de adding README file
k0s <k0scist@gmail.com>
parents:
diff changeset
60 smartopen to Ctrl+Alt+s and using xclip, I can open a URL that is
7328744920de adding README file
k0s <k0scist@gmail.com>
parents:
diff changeset
61 mappable to a smartopen handler with a keyboard shortcut. The
7328744920de adding README file
k0s <k0scist@gmail.com>
parents:
diff changeset
62 relevant line from my ~/.fluxbox/keys file reads:
7328744920de adding README file
k0s <k0scist@gmail.com>
parents:
diff changeset
63
7328744920de adding README file
k0s <k0scist@gmail.com>
parents:
diff changeset
64 Control Mod1 s :ExecCommand /home/jhammel/python/smartopen.py "$(xclip -o)" # smartopen
7328744920de adding README file
k0s <k0scist@gmail.com>
parents:
diff changeset
65
7328744920de adding README file
k0s <k0scist@gmail.com>
parents:
diff changeset
66