Merge lp:~stefanor/ibid/manpages-510020 into lp:~ibid-core/ibid/old-trunk-1.6

Proposed by Stefano Rivera
Status: Merged
Approved by: Stefano Rivera
Approved revision: not available
Merged at revision: 852
Proposed branch: lp:~stefanor/ibid/manpages-510020
Merge into: lp:~ibid-core/ibid/old-trunk-1.6
Diff against target: 732 lines (+572/-10)
16 files modified
man/ibid-db.1 (+59/-0)
man/ibid-factpack.1 (+63/-0)
man/ibid-knab-import.1 (+44/-0)
man/ibid-memgraph.1 (+39/-0)
man/ibid-objgraph.1 (+50/-0)
man/ibid-pb-client.1 (+54/-0)
man/ibid-plugin.1 (+66/-0)
man/ibid-setup.1 (+33/-0)
man/ibid.1 (+32/-0)
man/ibid.ini.5 (+113/-0)
scripts/ibid (+0/-1)
scripts/ibid-db (+6/-2)
scripts/ibid-factpack (+3/-1)
scripts/ibid-knab-import (+4/-2)
scripts/ibid-pb-client (+4/-2)
setup.py (+2/-2)
To merge this branch: bzr merge lp:~stefanor/ibid/manpages-510020
Reviewer Review Type Date Requested Status
marcog (community) Approve
Max Rabkin Approve
Jonathan Hitchcock Approve
Review via email: mp+17928@code.launchpad.net
To post a comment you must log in.
lp:~stefanor/ibid/manpages-510020 updated
875. By Stefano Rivera

Rename ibid-pub-client in setup.py

Revision history for this message
Jonathan Hitchcock (vhata) wrote :

All seems good.

I would change the description to "multi-protocol, easily extensible bot written in python" and not use it so much in the actual manpages themselves (it becomes a $phrase that sounds silly).

Also, the knab import script should reference knab.

Otherwise, seems fine - we really just need to get this stuff in...

review: Approve
lp:~stefanor/ibid/manpages-510020 updated
876. By Stefano Rivera

See also Knab's URL for knab-import

877. By Stefano Rivera

Reword Ibid description

878. By Stefano Rivera

e.g., not i.e.

879. By Stefano Rivera

Typos, spotted by Max

Revision history for this message
Max Rabkin (max-rabkin) :
review: Approve
Revision history for this message
marcog (marco-gallotta) wrote :

Most comments here are pedantic, so ignore them if you feel like it. :)

> There should there be an existing ibid.ini in the current directory, or one should be
> provided on the command line.

Can ibid.ini not be located in /etc ?

> Note that you should use twistd(1) where possible instead of calling this directly,
> as certain classes of error (problems in twisted callbacks) will go unnoticed in this
> program. That has no harmful effects, but the developers may miss out on some good
> bug reports.

Should this really be under "BUGS"?

How about adding that this can be achieved by running "twistd -n ibid"?

> SEE ALSO
> ibid(1), ibid.ini(5), ibid-setup(1), http://ibid.omnia.za.net/

This is in ibid.1. Should it really be referencing what I believe is itself?

> A complete description of the contents of this file is out of the scope of this man‐
> page, for more details see the Ibid documentation.

Break up into 2 sentences.

> This file will be written to by the bot when configuration settings are altered
> online. It can also be edited manually and a running bot told to "reload config".

Maybe mention that when automatically written to, the bot will preserve manual edits.

Weren't there some bugs associated with "reload config" not fully working? Perhaps mention them under a BUGS section.

> Settings related to permissions and authentication. Permissions listed in auth.per‐
> missions are granted to all users unless revoked by source or account.

I don't like how tha man page splits auth.permissions over multiple lines. Is there a way to force it to keep it on a single line?

> Plugin configuration, each plugin is configured within a section named after the plu‐
> gin.

I don't like that comma. Maybe a colon? There are also other places where this occurs.

> SEE ALSO
> ibid(1), ibid-objgraph(1), http://ibid.omnia.za.net/

This is in ibid-objgraph.1. I guess that ibid-objgraph(1) should have been ibid-memgraph(1)

> This utility is passing events to a running Ibid bot, or executing RPC-exposed func‐
> tions remotely.

This utility is *for* passing

> ibid-plugin.1 BUGS

It also doesn't emulate accounts/identities.

> ibid-setup - Create a configuration file and Database for an Ibid bot

Create a *basic* configuration file and *d*atabase as a starting point for an Ibid bot

> This program installs a new Ibid bot.

Does it really *install* the bot? When I read install, I think it does more than what this script does. Maybe "configures"?

review: Needs Fixing
Revision history for this message
Stefano Rivera (stefanor) wrote :

> Can ibid.ini not be located in /etc ?

If you have a single machine-wide Ibid, yes it can. However that's more of a packaging question. At the moment, we aren't doing anything about that kind of thing.
See http://svn.debian.org/viewsvn/python-apps/packages/ibid/trunk/debian/README.Debian?view=markup

> Should this really be under "BUGS"?

Well, it is a bug that it misses those massages, yes. I could rephrase it to say that. r880

> How about adding that this can be achieved by running "twistd -n ibid"?

Yeah. r880

> > ibid(1), ibid.ini(5), ibid-setup(1), http://ibid.omnia.za.net/
> This is in ibid.1. Should it really be referencing what I believe is itself?

Correct. r881

> > A complete description of the contents of this file is out of the scope of
> > this man‐page, for more details see the Ibid documentation.
> Break up into 2 sentences.

Done. r882

> Maybe mention that when automatically written to, the bot will preserve manual
> edits.

r883

> Weren't there some bugs associated with "reload config" not fully working?
> Perhaps mention them under a BUGS section.

No, I think they were fixed.

> I don't like how tha man page splits auth.permissions over multiple lines. Is
> there a way to force it to keep it on a single line?

Yes, one can tell it not to hyphenate specific words. File a bug for 0.2, if you want ot do that to all of them :)

> > Plugin configuration, each plugin is configured within a section named after
> I don't like that comma. Maybe a colon? There are also other places where this
> occurs.

r884

> > SEE ALSO
> > ibid(1), ibid-objgraph(1), http://ibid.omnia.za.net/
> This is in ibid-objgraph.1. I guess that ibid-objgraph(1) should have been
> ibid-memgraph(1)

r885

> > This utility is passing events to a running Ibid bot, or executing RPC-
> exposed functions remotely.
> This utility is *for* passing

r886

> > ibid-plugin.1 BUGS
> It also doesn't emulate accounts/identities.

Well spotted. r887

> > ibid-setup - Create a configuration file and Database for an Ibid bot
> Create a *basic* configuration file and *d*atabase as a starting point for an
> Ibid bot

Not mad about "starting point". r888

> > This program installs a new Ibid bot.
> Does it really *install* the bot? When I read install, I think it does more
> than what this script does. Maybe "configures"?

r889

lp:~stefanor/ibid/manpages-510020 updated
880. By Stefano Rivera

Rework the BUGS in ibid.1

881. By Stefano Rivera

ibid.1 refers to itself, it should rather refer to ibid-setup.1

882. By Stefano Rivera

Break up first section of ibid.ini.5 and link to Ibid documentation

883. By Stefano Rivera

Explain config file writing in relation to comments

884. By Stefano Rivera

s/,/./

885. By Stefano Rivera

Refer to ibid-memgraph from ibid-objgraph, not itself

886. By Stefano Rivera

Missing 'for' in ibid-pb-client.1

887. By Stefano Rivera

ibid-plugin grants user all permissions

888. By Stefano Rivera

Clarify one-liner for ibid-setup

889. By Stefano Rivera

Don't say ibid-setup installs

Revision history for this message
marcog (marco-gallotta) wrote :

Looks good

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added directory 'man'
2=== added file 'man/ibid-db.1'
3--- man/ibid-db.1 1970-01-01 00:00:00 +0000
4+++ man/ibid-db.1 2010-01-24 14:59:10 +0000
5@@ -0,0 +1,59 @@
6+.\" Copyright (c) 2010, Stefano Rivera
7+.\" Released under terms of the MIT/X/Expat Licence. See COPYING for details.
8+.TH IBID-DB "1" "January 2010" "Ibid 0.0" "Ibid - Multi-protocol Bot"
9+.SH NAME
10+ibid-db \- Database management utility for Ibid
11+.SH SYNOPSIS
12+.B ibid-db command
13+.RI [ options ...]
14+.SH DESCRIPTION
15+This utility is for offline management of your Ibid bot's database.
16+Used for import, export, and upgrades.
17+.P
18+The export format is DBMS-agnostic and can be used to migrate between different
19+databases.
20+.SH COMMANDS
21+.TP
22+\fB\-e\fR \fIFILE\fR, \fB\-\-export\fR=\fIFILE\fR
23+Export DB contents to \fIFILE\fR.
24+Export format is JSON.
25+.IP
26+FILE can be \fB\-\fR for stdin/stdout or can end in \fB.gz\fR for automatic
27+gzip compression.
28+.TP
29+\fB\-i\fR \fIFILE\fR, \fB\-\-import\fR=\fIFILE\fR
30+Import DB contents from \fIFILE\fR as exported by this utility.
31+.IP
32+FILE can be \fB\-\fR for stdin/stdout or can end in \fB.gz\fR for automatic
33+gzip compression.
34+.IP
35+.B Note:
36+The DB must be empty first.
37+.TP
38+\fB\-u\fR, \fB\-\-upgrade\fR
39+Upgrade DB schema to the latest version.
40+You need to run this after upgrading your bot.
41+.IP
42+.B Note:
43+You should backup first.
44+.SH OPTIONS
45+.TP
46+\fB\-\-version\fR
47+Show the program's version and exit.
48+.TP
49+\fB\-h\fR, \fB\-\-help\fR
50+Show a help message and exit.
51+.TP
52+\fB\-v\fR, \fB\-\-verbose\fR
53+Turn on debugging output to stderr.
54+.SH FILES
55+.TP
56+.I ibid.ini
57+Locates the database to act upon by looking for the \fB[databases].ibid\fR value
58+in the bot configuration file in the current directory.
59+.SH SEE ALSO
60+.BR ibid (1),
61+.BR ibid.ini (5),
62+.BR ibid-setup (1),
63+.UR http://ibid.omnia.za.net/
64+.BR http://ibid.omnia.za.net/
65
66=== added file 'man/ibid-factpack.1'
67--- man/ibid-factpack.1 1970-01-01 00:00:00 +0000
68+++ man/ibid-factpack.1 2010-01-24 14:59:10 +0000
69@@ -0,0 +1,63 @@
70+.\" Copyright (c) 2010, Stefano Rivera
71+.\" Released under terms of the MIT/X/Expat Licence. See COPYING for details.
72+.TH IBID-FACTPACK "1" "January 2010" "Ibid 0.0" "Ibid - Multi-protocol Bot"
73+.SH NAME
74+ibid-factpack \- Factoid-package management utility for Ibid
75+.SH SYNOPSIS
76+.B ibid-factpack
77+.RB [ -s ]
78+.I factpack-file
79+.br
80+.B ibid-factpack -r
81+.RB [ -f ]
82+.I factpack-name
83+.br
84+.B ibid-factpack -h
85+.SH DESCRIPTION
86+This utility is for adding and removing sets of packaged factoids, known as
87+factpacks, from your Ibid's factoid database.
88+.P
89+The default mode is factpack loading.
90+The \fIfactpack-file\fR specified is loaded into the bot's database.
91+Should the pack contain any facts with the same name as an existing fact in the
92+bot's database, loading will be aborted, unless the \fB-s\fR option is
93+supplied.
94+.P
95+When invoked with the \fB-r\fR option, the named factpack (original import
96+filename minus the extension) will be removed from the bot.
97+If any of the facts contained in that pack were modified while loaded in the
98+bot, unloading will be aborted, unless the \fB-f\fR option is supplied.
99+.SH OPTIONS
100+.TP
101+\fB\-r\fR, \fB\-\-remove\fR
102+Remove the named factpack, rather than importing.
103+.TP
104+\fB\-f\fR, \fB\-\-force\fR
105+Force removal, if facts in the factpack were modified by users.
106+.TP
107+\fB\-s\fR, \fB\-\-skip\fR
108+Skip facts that clash with existing factoids, during import.
109+.TP
110+\fB\-h\fR, \fB\-\-help\fR
111+Show a help message and exit.
112+.SH FACTPACKS
113+Factpacks are JSON-encoded text files containing a list of facts.
114+Each fact is a tuple of two lists: fact-names, fact-values.
115+The same substitutions are available as in normal online Factoids.
116+.SS Example:
117+.nf
118+[
119+ [["Hello", "Hi"], ["<reply> Hi There", "<action> waves"]],
120+ [["Bye"], ["<reply> kbye $who", "<reply> Cheers"]]
121+]
122+.fi
123+.SH FILES
124+.TP
125+.I ibid.ini
126+Locates the database to act upon by looking for the \fB[databases].ibid\fR value
127+in the bot configuration file in the current directory.
128+.SH SEE ALSO
129+.BR ibid (1),
130+.BR ibid.ini (5),
131+.UR http://ibid.omnia.za.net/
132+.BR http://ibid.omnia.za.net/
133
134=== added file 'man/ibid-knab-import.1'
135--- man/ibid-knab-import.1 1970-01-01 00:00:00 +0000
136+++ man/ibid-knab-import.1 2010-01-24 14:59:10 +0000
137@@ -0,0 +1,44 @@
138+.\" Copyright (c) 2010, Stefano Rivera
139+.\" Released under terms of the MIT/X/Expat Licence. See COPYING for details.
140+.TH IBID-DB "1" "January 2010" "Ibid 0.0" "Ibid - Multi-protocol Bot"
141+.SH NAME
142+ibid-knab-import \- Knab->Ibid Import utility
143+.SH SYNOPSIS
144+.B ibid-knab-import
145+.I knab-sa-url
146+.I source
147+.RI [ config-file ]
148+.SH DESCRIPTION
149+This utility imports users, last seen information, factoids, and URLs
150+from a Knab bot's database into an Ibid.
151+.P
152+For best results, import directly into a brand new, clean Ibid install.
153+.P
154+On import, strings are converted to Unicode, guessing UTF-8 and falling back to
155+detection.
156+.SH OPTIONS
157+.TP
158+.I knab-sa-url
159+The SQLAlchemy URI for the Knab's database.
160+The format is
161+.BI mysql:// user : pass @ hostname / dbname
162+.TP
163+.I source
164+The name in the Ibid bot for the source that the Knab was previously connected to.
165+.TP
166+.I config-file
167+If supplied, this is configuration file is used for locating the Ibid's
168+database rather than \fBibid.ini\fR.
169+.SH FILES
170+.TP
171+.I ibid.ini
172+Locates the database to act upon by looking for the \fB[databases].ibid\fR value
173+in the bot configuration file in the current directory.
174+.SH SEE ALSO
175+.BR ibid (1),
176+.BR ibid.ini (5),
177+.BR ibid-setup (1),
178+.UR http://ibid.omnia.za.net/
179+.BR http://ibid.omnia.za.net/ ,
180+.UR http://knab.omnia.za.net/
181+.BR http://knab.omnia.za.net/
182
183=== added file 'man/ibid-memgraph.1'
184--- man/ibid-memgraph.1 1970-01-01 00:00:00 +0000
185+++ man/ibid-memgraph.1 2010-01-24 14:59:10 +0000
186@@ -0,0 +1,39 @@
187+.\" Copyright (c) 2010, Stefano Rivera
188+.\" Released under terms of the MIT/X/Expat Licence. See COPYING for details.
189+.TH IBID-MEMGRAPH "1" "January 2010" "Ibid 0.0" "Ibid - Multi-protocol Bot"
190+.SH NAME
191+ibid-memgraph \- Memory usage graph generation utility for Ibid
192+.SH SYNOPSIS
193+.B ibid-memgraph
194+.RB [ options ...]
195+.I logfile
196+.br
197+.B ibid-memgraph -h
198+.SH DESCRIPTION
199+This utility is for graphing memory usage from an Ibid bot configured to
200+log such usage.
201+.P
202+Matplotlib is required for graphing.
203+.SH OPTIONS
204+.TP
205+\fB\-o\fR \fIFILE\fR, \fB\-\-output\fR=\fIFILE\fR
206+Output to \fIFILE\fR instead of displaying interactive graph GUI.
207+\fIFILE\fR can be any format supported by Matplotlib, detected by the file
208+extension.
209+.TP
210+\fB\-d\fR \fIDPI\fR, \fB\-\-dpi\fR=\fIDPI\fR
211+When outputting in raster formats, use \fIDPI\fR output DPI.
212+.TP
213+\fB\-h\fR, \fB\-\-help\fR
214+Show a help message and exit.
215+.SH FILES
216+.TP
217+.I logfile
218+A log file generated by loading the \fBmemory\fR plugin into Ibid, which will
219+periodically log memory usage.
220+It can be gzip compressed, if the filename ends in \fB.gz\fR.
221+.SH SEE ALSO
222+.BR ibid (1),
223+.BR ibid-objgraph (1),
224+.UR http://ibid.omnia.za.net/
225+.BR http://ibid.omnia.za.net/
226
227=== added file 'man/ibid-objgraph.1'
228--- man/ibid-objgraph.1 1970-01-01 00:00:00 +0000
229+++ man/ibid-objgraph.1 2010-01-24 14:59:10 +0000
230@@ -0,0 +1,50 @@
231+.\" Copyright (c) 2010, Stefano Rivera
232+.\" Released under terms of the MIT/X/Expat Licence. See COPYING for details.
233+.TH IBID-OBJGRAPH "1" "January 2010" "Ibid 0.0" "Ibid - Multi-protocol Bot"
234+.SH NAME
235+ibid-objgraph \- Memory usage graph generation utility for Ibid
236+.SH SYNOPSIS
237+.B ibid-objgraph
238+.RB [ options ...]
239+.IR "logfile type" ...
240+.br
241+.B ibid-objgraph
242+.BI "-e " TIME
243+.RB [ options ...]
244+.I logfile
245+.br
246+.B ibid-objgraph -h
247+.SH DESCRIPTION
248+This utility is for graphing object-type usage from an Ibid bot
249+configured to log such usage.
250+.P
251+Matplotlib is required for graphing.
252+.SH OPTIONS
253+.TP
254+\fB\-e\fR \fITIME\fR, \fB\-\-examine\fR=\fITIME\fR
255+Examine the object usage at time \fITIME\fR, and print a sorted list of type
256+statistics at that time.
257+This function can be useful in determining which types to graph, when chasing
258+down a detected leak.
259+.TP
260+\fB\-o\fR \fIFILE\fR, \fB\-\-output\fR=\fIFILE\fR
261+Output to \fIFILE\fR instead of displaying interactive graph GUI.
262+\fIFILE\fR can be any format supported by Matplotlib, detected by the file
263+extension.
264+.TP
265+\fB\-d\fR \fIDPI\fR, \fB\-\-dpi\fR=\fIDPI\fR
266+When outputting in raster formats, use \fIDPI\fR output DPI.
267+.TP
268+\fB\-h\fR, \fB\-\-help\fR
269+Show a help message and exit.
270+.SH FILES
271+.TP
272+.I logfile
273+A log file generated by loading the \fBmemory\fR plugin into Ibid, which will
274+periodically log object usage.
275+It can be gzip compressed, if the filename ends in \fB.gz\fR.
276+.SH SEE ALSO
277+.BR ibid (1),
278+.BR ibid-memgraph (1),
279+.UR http://ibid.omnia.za.net/
280+.BR http://ibid.omnia.za.net/
281
282=== added file 'man/ibid-pb-client.1'
283--- man/ibid-pb-client.1 1970-01-01 00:00:00 +0000
284+++ man/ibid-pb-client.1 2010-01-24 14:59:10 +0000
285@@ -0,0 +1,54 @@
286+.\" Copyright (c) 2010, Stefano Rivera
287+.\" Released under terms of the MIT/X/Expat Licence. See COPYING for details.
288+.TH IBID-PB-CLIENT "1" "January 2010" "Ibid 0.0" "Ibid - Multi-protocol Bot"
289+.SH NAME
290+ibid-pb-client \- RPC Client for Ibid
291+.SH SYNOPSIS
292+.B ibid-pb-client
293+.RI [ options ...]
294+.BI message " message"
295+.br
296+.B ibid-pb-client
297+.RI [ options ...]
298+.BI plugin " feature method"
299+.RI [ parameter ...]
300+.br
301+.B ibid-pb-client -h
302+.SH DESCRIPTION
303+This utility is for passing events to a running Ibid bot, or executing
304+RPC-exposed functions remotely.
305+.P
306+It communicates with the \fBpb\fR source on the Ibid.
307+.P
308+.I message
309+is a text message as could be sent to the bot by an IM source.
310+The message is processed normally by the bot.
311+.P
312+.I feature
313+is the name of the feature to invoke exposed method \fImethod\fR on,
314+directly.
315+.IR parameter s
316+are passed directly to the method.
317+They can be specified positionally or by key, using the same syntax as
318+Python:
319+.IR key = value .
320+They may be encoded in JSON, if not valid JSON they will be treated as
321+strings.
322+.P
323+The output is a JSON-encoded response.
324+.SH OPTIONS
325+.TP
326+\fB\-s\fR \fIHOSTNAME\fR, \fB\-\-server\fR=\fISERVER\fR
327+Connect to the Ibid running on \fISERVER\fR, by default it connects to
328+\fIlocalhost\fR.
329+.TP
330+\fB\-p\fR \fIFILE\fR, \fB\-\-port\fR=\fIPORT\fR
331+Connect to the \fBpb\fR source running on port \fIPORT\fR, by default
332+8789.
333+.TP
334+\fB\-h\fR, \fB\-\-help\fR
335+Show a help message and exit.
336+.SH SEE ALSO
337+.BR ibid (1),
338+.UR http://ibid.omnia.za.net/
339+.BR http://ibid.omnia.za.net/
340
341=== added file 'man/ibid-plugin.1'
342--- man/ibid-plugin.1 1970-01-01 00:00:00 +0000
343+++ man/ibid-plugin.1 2010-01-24 14:59:10 +0000
344@@ -0,0 +1,66 @@
345+.\" Copyright (c) 2010, Stefano Rivera
346+.\" Released under terms of the MIT/X/Expat Licence. See COPYING for details.
347+.TH IBID-PLUGIN "1" "January 2010" "Ibid 0.0" "Ibid - Multi-protocol Bot"
348+.SH NAME
349+ibid-plugin \- Plugin testing developer environment for Ibid
350+.SH SYNOPSIS
351+.B ibid-plugin
352+.RI [ options ...]
353+.RI [ plugin\fR[\fB- ]| plugin\fB.\fIProcessor [\fB-\fR]...]
354+.SH DESCRIPTION
355+This utility is for testing Ibid plugins without the full bot
356+environment.
357+This means testing can be performed offline and without loading all the
358+available plugins.
359+.P
360+This should be run in a configured Ibid bot directory.
361+.P
362+All the listed plugins and Processors will be loaded on start-up.
363+Naming a plugin loads the complete plugin.
364+Suffixing a \fB-\fR to the name, ignores that plugin or Processor
365+instead of loading it.
366+.SH OPTIONS
367+.TP
368+\fB\-c\fR, \fB\-\-configured\fR
369+Load all configured plugins, instead of only the core and requested
370+plugins.
371+.TP
372+\fB\-o\fR, \fB\-\-only\fR
373+Don't load the Ibid core plugins, only the plugins requested.
374+Note that without the \fBcore\fR plugin to pre- and post-process events,
375+most other plugins won't function correctly.
376+.TP
377+\fB\-p\fR, \fB\-\-public\fR
378+By default, \fBibid-plugin\fR emulates a private conversation with the
379+bot.
380+With this option, the conversation is considered to be public.
381+.TP
382+\fB\-h\fR, \fB\-\-help\fR
383+Show a help message and exit.
384+.SH FILES
385+.TP
386+.I ibid.ini
387+Locates the database to act upon by looking for the \fB[databases].ibid\fR value
388+in the bot configuration file in the current directory.
389+.SH BUGS
390+\fBibid-plugin\fR doesn't emulate a complete Ibid environment, and will
391+ignore all of the following:
392+.TP
393+*
394+Delayed and periodically executed functions.
395+.TP
396+*
397+Messages to alternate sources.
398+.TP
399+*
400+Messages directly dispatched, rather than added to responses.
401+.TP
402+*
403+Permissions.
404+All permissions are granted to the user.
405+.SH SEE ALSO
406+.BR ibid (1),
407+.BR ibid.ini (5),
408+.BR ibid-setup (1),
409+.UR http://ibid.omnia.za.net/
410+.BR http://ibid.omnia.za.net/
411
412=== added file 'man/ibid-setup.1'
413--- man/ibid-setup.1 1970-01-01 00:00:00 +0000
414+++ man/ibid-setup.1 2010-01-24 14:59:10 +0000
415@@ -0,0 +1,33 @@
416+.\" Copyright (c) 2010, Stefano Rivera
417+.\" Released under terms of the MIT/X/Expat Licence. See COPYING for details.
418+.TH IBID-SETUP "1" "January 2010" "Ibid 0.0" "Ibid - Multi-protocol Bot"
419+.SH NAME
420+ibid-setup \- Create a basic configuration file and database for an Ibid
421+bot
422+.SH SYNOPSIS
423+.B ibid-setup
424+.SH DESCRIPTION
425+This program sets up everything that a new Ibid bot needs before it can
426+run.
427+It asks a series of questions about the new bot, and writes out a basic
428+configuration file -
429+.BR ibid.ini (5)
430+- to the current directory.
431+It also creates a database for the bot, by default a SQLite database in
432+the current directory.
433+.P
434+This should be run in the directory which will become the new Ibid bot's
435+base.
436+.P
437+Should there be an existing \fBibid.ini\fR in the current directory, it
438+will be used, and the only questions asked will be for adding an
439+administrative user. These can safely be skipped with a \fB^C\fR.
440+.SH FILES
441+.TP
442+.I ibid.ini
443+The Ibid bot's configuration file, will be created if it doesn't exist.
444+.SH SEE ALSO
445+.BR ibid (1),
446+.BR ibid.ini (5),
447+.UR http://ibid.omnia.za.net/
448+.BR http://ibid.omnia.za.net/
449
450=== added file 'man/ibid.1'
451--- man/ibid.1 1970-01-01 00:00:00 +0000
452+++ man/ibid.1 2010-01-24 14:59:10 +0000
453@@ -0,0 +1,32 @@
454+.\" Copyright (c) 2010, Stefano Rivera
455+.\" Released under terms of the MIT/X/Expat Licence. See COPYING for details.
456+.TH IBID "1" "January 2010" "Ibid 0.0" "Ibid - Multi-protocol Bot"
457+.SH NAME
458+ibid \- Run an Ibid bot
459+.SH SYNOPSIS
460+.B ibid
461+.RI [ config-file ]
462+.SH DESCRIPTION
463+This runs an Ibid bot in the foreground.
464+.P
465+There should there be an existing \fBibid.ini\fR (created by
466+.BR ibid-setup (1))
467+in the current directory or one should be provided on the command line.
468+.P
469+Where possible, you should run \fBtwistd -n ibid\fR instead of this
470+program, as otherwise some classes of errors go unreported.
471+.RB "See " BUGS .
472+.SH BUGS
473+Exceptions in twisted callbacks can go unnoticed in this program.
474+That has no harmful effects, but the developers may miss out on some
475+good bug reports.
476+.SH FILES
477+.TP
478+.I ibid.ini
479+The Ibid bot's configuration file, will be created if it doesn't exist.
480+.SH SEE ALSO
481+.BR ibid.ini (5),
482+.BR ibid-setup (1),
483+.BR twistd (1),
484+.UR http://ibid.omnia.za.net/
485+.BR http://ibid.omnia.za.net/
486
487=== added file 'man/ibid.ini.5'
488--- man/ibid.ini.5 1970-01-01 00:00:00 +0000
489+++ man/ibid.ini.5 2010-01-24 14:59:10 +0000
490@@ -0,0 +1,113 @@
491+.\" Copyright (c) 2010, Stefano Rivera
492+.\" Released under terms of the MIT/X/Expat Licence. See COPYING for details.
493+.TH IBID.INI "5" "January 2010" "Ibid 0.0" "Ibid - Multi-protocol Bot"
494+.SH NAME
495+ibid.ini \- Configuration file for Ibid
496+.SH DESCRIPTION
497+ibid.ini contains all the configuration for an Ibid bot.
498+.P
499+A complete description of the contents of this file is out of the scope of this
500+manpage.
501+For more details see the Ibid documentation:
502+.UR http://ibid.omnia.za.net/docs/
503+.BR http://ibid.omnia.za.net/docs/
504+.P
505+Lines beginning with \fB#\fR are considered to be comments and ignored.
506+To use a \fB#\fR symbol in an option (e.g. an IRC channel name), quote the
507+option with double-quotes, e.g.
508+.BR channels = """#ibid"","
509+.P
510+This file will be written to by the bot when configuration settings are
511+altered online.
512+It can also be edited manually and a running bot told to
513+\fB"reload config"\fR.
514+Manual edits and comments will be preserved when the bot modifies its
515+own configuration, provided that they have not been edited since bot
516+start-up or the last config reload.
517+.SH SECTIONS
518+.SS auth
519+Settings related to permissions and authentication.
520+Permissions listed in \fBauth.permissions\fR are granted to all users unless
521+revoked by source or account.
522+.SS sources
523+Sources are Ibid connections to an IM service.
524+They range from IRC networks to the bot's built-in HTTP server.
525+.P
526+Each source is configured in a section named after the source.
527+The source name will define the driver that the source should use, unless a
528+\fBtype\fR option is provided.
529+.P
530+Sources can be disabled by setting
531+.BR disabled = True .
532+.SS plugins
533+Plugin configuration.
534+Each plugin is configured within a section named after the plugin.
535+.P
536+.TP
537+.B cachedir
538+The directory that temporary files (such as downloaded data), useful to be the
539+bot but expendable, is stored in.
540+.TP
541+.B core.autoload
542+If \fBTrue\fR, all plugins not explicitly ignored will be loaded.
543+(Note that some plugins mark themselves as non-auto-loadable).
544+Defaults to \fBTrue\fR.
545+.TP
546+.B core.load
547+The list of plugins (or \fBplugin\fR.\fBProcessor\fRs) to load.
548+.TP
549+.B core.noload
550+The list of plugins (or \fBplugin\fR.\fBProcessor\fRs) to ignore and not load.
551+.TP
552+.B core.names
553+The names that the bot should respond to.
554+.TP
555+.B core.ignore
556+Nicks that the bot should completely ignore (e.g. other bots).
557+.SH EXAMPLE
558+.nf
559+botname = joebot
560+logging = logging.ini
561+
562+[auth]
563+ methods = password,
564+ timeout = 300
565+ permissions = +factoid, +karma, +sendmemo, +recvmemo, +feeds, +publicresponse
566+
567+[sources]
568+ [[telnet]]
569+ [[timer]]
570+ [[http]]
571+ url = http://joebot.example.com
572+ [[smtp]]
573+ [[pb]]
574+ [[atrum]]
575+ channels = "#ibid",
576+ nick = $botname
577+ type = irc
578+ auth = hostmask, nickserv
579+ server = irc.atrum.org
580+
581+[plugins]
582+ cachedir = /tmp/ibid
583+ [[core]]
584+ names = $botname, bot, ant
585+ ignore = ,
586+
587+[databases]
588+ ibid = sqlite:///ibid.db
589+.fi
590+.SH FILES
591+.TP
592+.I logging.ini
593+A standard Python \fBlogging.config\fR configuration file describing
594+loggers, handlers, and formatters for log messages.
595+See
596+.UR http://docs.python.org/library/logging.html
597+.BR http://docs.python.org/library/logging.html
598+.SH SEE ALSO
599+.BR ibid (1),
600+.BR ibid.ini (5),
601+.BR twistd (1),
602+.UR http://ibid.omnia.za.net/
603+.BR http://ibid.omnia.za.net/
604
605=== modified file 'scripts/ibid'
606--- scripts/ibid 2010-01-17 20:08:12 +0000
607+++ scripts/ibid 2010-01-24 14:59:10 +0000
608@@ -8,7 +8,6 @@
609 import ibid
610
611 parser = OptionParser(usage='%prog [options] <config filename>')
612-parser.add_option('-d', '--debug', dest='debug', action='store_true', help='Output debug messages')
613 options, args = parser.parse_args(values={})
614
615 options['config'] = len(args) > 0 and args[0] or 'ibid.ini'
616
617=== modified file 'scripts/ibid-db'
618--- scripts/ibid-db 2010-01-17 20:08:12 +0000
619+++ scripts/ibid-db 2010-01-24 14:59:10 +0000
620@@ -22,10 +22,14 @@
621 from ibid.db.types import IbidUnicode, IbidUnicodeText
622 from ibid.utils import ibid_version
623
624+version = ibid_version() or "bzr"
625+
626 parser = OptionParser(usage='%prog [options...]', description=
627 """Ibid Database management tool. Used for import, export, and upgrades.
628 Export format is JSON. FILE can be - for stdin/stdout or can end
629-in .gz for automatic Gzip compression.""")
630+in .gz for automatic Gzip compression.""",
631+version=("%prog " + version))
632+
633 commands = OptionGroup(parser, 'Modes')
634 commands.add_option('-e', '--export', dest='export', metavar='FILE',
635 help='Export DB contents to FILE.')
636@@ -102,7 +106,7 @@
637
638 output.write(('# Ibid %(version)s Database dump for %(botname)s '
639 'made on %(date)s\n') % {
640- 'version': ibid_version() or 'bzr',
641+ 'version': version,
642 'botname': ibid.config['botname'],
643 'date': datetime.utcnow().strftime('%Y-%m-%dT%H:%M:%SZ'),
644 })
645
646=== modified file 'scripts/ibid-factpack'
647--- scripts/ibid-factpack 2010-01-17 20:08:12 +0000
648+++ scripts/ibid-factpack 2010-01-24 14:59:10 +0000
649@@ -2,10 +2,12 @@
650 # Copyright (c) 2009-2010, Michael Gorven, Stefano Rivera
651 # Released under terms of the MIT/X/Expat Licence. See COPYING for details.
652
653-from sys import exit, stderr
654+from sys import exit, stderr, path
655 from os.path import basename, exists
656 from optparse import OptionParser
657
658+path.insert(0, '.')
659+
660 import ibid
661 from ibid.compat import json
662 from ibid.config import FileConfig
663
664=== renamed file 'scripts/ibid_import' => 'scripts/ibid-knab-import'
665--- scripts/ibid_import 2010-01-18 22:13:23 +0000
666+++ scripts/ibid-knab-import 2010-01-24 14:59:10 +0000
667@@ -2,7 +2,7 @@
668 # Copyright (c) 2009-2010, Michael Gorven, Stefano Rivera
669 # Released under terms of the MIT/X/Expat Licence. See COPYING for details.
670
671-from sys import argv, exit, stderr, stdout
672+from sys import argv, path, exit, stderr, stdout
673
674 from chardet import detect
675 from dateutil.tz import tzlocal, tzutc
676@@ -10,6 +10,8 @@
677 from sqlalchemy.ext.declarative import declarative_base
678 from sqlalchemy.orm import sessionmaker
679
680+path.insert(0, '.')
681+
682 from ibid.config import FileConfig
683 from ibid.db.models import Identity
684 from ibid.plugins.seen import Sighting
685@@ -270,7 +272,7 @@
686
687 if __name__ == '__main__':
688 if len(argv) < 3:
689- print u'Usage: %s <knab database> <source> [<ibid config>]' % argv[:1]
690+ print u'Usage: %s <knab database> <source> [<ibid config>]' % argv[0]
691 exit(1)
692
693 knabengine = create_engine(argv[1])
694
695=== renamed file 'scripts/ibid_pb' => 'scripts/ibid-pb-client'
696--- scripts/ibid_pb 2010-01-17 20:08:12 +0000
697+++ scripts/ibid-pb-client 2010-01-24 14:59:10 +0000
698@@ -2,16 +2,18 @@
699 # Copyright (c) 2009, Michael Gorven
700 # Released under terms of the MIT/X/Expat Licence. See COPYING for details.
701
702-from sys import argv, exit
703+from sys import argv, exit, path
704 from optparse import OptionParser, OptionGroup
705
706 from twisted.spread import pb
707 from twisted.internet import reactor
708 from twisted.python import util
709
710+path.insert(0, '.')
711+
712 from ibid.compat import json
713
714-parser = OptionParser(usage='%prog [options] message <message> | plugin <plugin> <class> <method> <parameters>')
715+parser = OptionParser(usage='%prog [options] message <message> | plugin <feature> <method> <parameters>')
716 parser.add_option('-s', '--server', help='Hostname of Ibid instance')
717 parser.add_option('-p', '--port', help='Port number of Ibid instance')
718
719
720=== modified file 'setup.py'
721--- setup.py 2010-01-18 22:13:23 +0000
722+++ setup.py 2010-01-24 14:59:10 +0000
723@@ -58,8 +58,8 @@
724 'scripts/ibid-plugin',
725 'scripts/ibid-setup',
726 'scripts/ibid-factpack',
727- 'scripts/ibid_pb',
728- 'scripts/ibid_import',
729+ 'scripts/ibid-pb-client',
730+ 'scripts/ibid-knab-import',
731 'scripts/ibid.tac',
732 ],
733

Subscribers

People subscribed via source and target branches