-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
180 lines (120 loc) · 6.5 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
Overview:
urk is an IRC client written purely in python for linux/gnome. It has a powerful
built-in scripting system (also python), which is used to implement much of the
client.
Requirements/User installation:
urk requires the following packages (and should run on any os that can provide
them):
-python version 2.5 or greater (www.python.org)
-pygtk 2.6 or greater (www.pygtk.org)
Most Linux (or at least GNOME) users should have these things already or be able
to easily install them.
Because urk is pure python, no compilation of urk is required. Just extract the
source to somewhere and run 'python urk.py'.
Optional requirements:
urk can also make use of these packages if you have them:
-pygtksourceview, part of gnome-python-extras <=2.12 and gnome-python-desktop
>=2.14, for source highlighting and undo in the internal script editor
-python-dbus, for, well, not much (if dbus is available, urk only makes a single
instance per session, and commands can be executed remotely by calling urk.py)
Getting started:
Make sure you have all the requirements, go to the directory where you have
extracted the source, and type 'python urk.py'.
We don't have any preferences windows yet. You can change your nickname by
typing '/nick nickname' (replacing nickname with the nick you want to use)
or typing a new nick in the nick field on the lower right corner and pressing
enter.
To connect, type '/server irc.gamesurge.net' (replacing irc.gamesurge.net with
the server you want to connect to).
If you want to connect to another server (without disconnecting the current
one), use the -m switch as in '/server -m irc.gamesurge.net'.
To join a channel when you're connected to a server, type '/join #channelname',
replacing #channelname with the channel you want to join.
To automatically join a channel at startup, right click on its tab and check
"Autojoin". You can also edit the autojoin networks and channels by selecting
"urk>>Networks" from the menu.
Configuration:
Most configuration has to be done manually. If urk is running, you can configure
it using commands. The settings are stored in urk.conf on your profile
directory, which you can locate by typing '/pyeval urk.userpath' in urk.
To set a value in urk, type
/pyexec conf.conf['setting'] = value
To see the current value, type
/pyeval conf.conf['setting']
To unset a value (meaning urk will use the default), type
/pyexec del conf.conf['setting']
Settings changes made manually in this way will be saved on exit. To save them
immediately, type
/pyexec conf.save()
Setting: Description:
'nick' The nickname urk should use. The default is to try to get
it from the os. Changing your nickname using the gui or /nick without the -t
switch will set this.
Example: /pyexec conf.conf['nick'] = "fred"
'altnicks' A list of alternative nicknames to use if the default is
not available when connecting.
Example: /pyexec conf.conf['altnicks'] = ["nick2", "nick3"]
'quitmsg' The message people see when you quit. The default is to
advertise urk with your current version; we have to promote it somehow.
Example: /pyexec conf.conf['quitmsg'] = "Bye bye"
'autoreconnect' If True, urk will try to reconnect when you're
disconnected from a network. Defaults to True.
Example: /pyexec conf.conf['autoreconnect'] = False
'highlight_words' A list of words, in addition to your nick, that cause a
highlight event (normally the tab label turns blue and, if it's available,
the tray icon shows up).
Example: /pyexec conf.conf['highlight_words'] = ['python', 'whale', 'peanut butter']
'log_dir' The place where logs are written. The default is a
directory called "logs" on your profile directory.
Example: /pyexec conf.conf['log_dir'] = "/home/user/logs/urk"
'ui-gtk/tab-pos' The side of the window where the tabs will reside
2 for top
0 for left
1 for right
3 for bottom (default)
Example: /pyexec conf.conf['ui-gtk/tab-pos'] = 0
'ui-gtk/show-menubar' If True, the menubar is shown. The default is True.
Example: /pyexec conf.conf['ui-gtk/show-menubar'] = False
'command_prefix' The prefix used to signal a command. Defaults to '/'
Example: /pyexec conf.conf['command_prefix'] = ":"
'font' The font used for output.
Example: /pyexec conf.conf['font'] = "Sans 8"
'bg_color' The background color.
Example: /pyexec conf.conf['bg_color'] = "#000000"
'fg_color' The foreground color.
Example: /pyexec conf.conf['fg_color'] = "white"
'timestamp' A timestamp that will show up before messages. The
default is no timestamp. See the "time.strftime" section of
http://docs.python.org/lib/module-time.html for a key to format this string.
Example: /pyexec conf.conf['timestamp'] = "[%H:%M:%S] "
'start-console' If True, urk will start up with a special console window
that shows debugging output (normally sent to a terminal) and accepts
python expressions.
Example: /pyexec conf.conf['start-console'] = True
'status' If True, urk will be in status window mode. Each network
will ALWAYS have a status window. When not in status window mode, networks
only have a status window when there are no channel windows. Defaults to
False.
Example: /pyexec conf.conf['status'] = True
'open-file-command' The command used to open files and url's with your
preferred application. This is ignored on Windows, and you shouldn't
normally need to change it.
Example: /pyexec conf.conf['open-file-command'] = "gnome-open"
System-wide installation:
Not yet implemented.
About scripting:
urk scripts are python source files that contain definitions of functions with
certain "magic" names, like onText (for when someone sends a channel or private
message). See www.python.org for help on writing python code. The format for
onText is:
def onText(e):
code
e is an object used to pass on the various information relating to the event
that triggered the function. The name is a convention we use, much like self.
e.source is the nickname of the person who sent the message.
e.target is the nickname or channel that received the message.
e.text is the text of the message.
e.network is an object representing the network where the message was sent.
e.window is a window that seems to be related to the event for some unspecified
reason. It could be the status window, a channel window, a query, anything.
See the project wiki for more detailed information.