2005-11-08 [colin] 1.9.100cvs3
[claws.git] / tools / README
1
2 --------------------------------------------------------------------------------
3 Contents of the tools directory:
4 --------------------------------------------------------------------------------
5
6 Action scripts:
7   freshmeat_search.pl           Search freshmeat.net for selected text
8   google_msgid.pl               Search groups.google.com for selected message-id
9   google_search.pl              Search google.com for selected text
10   multiwebsearch.pl             Search any search engine for the selected text
11   textviewer.sh                 Attempt to view an attachment as plain text
12   uudec                         Decode and display uuencoded images
13
14 Addressbook conversion:
15   eud2gc.py                     Convert Eudora address book to Gnomecard
16   kmail2sylpheed.pl             Import a Kmail address book (KDE2)
17   kmail2sylpheed_v2.pl          Import a Kmail address book (KDE3)
18   outlook2sylpheed.pl           Import an Outlook generated contact list
19   tb2sylpheed                   Import The Bat! address books
20   vcard2xml.py                  Import an Evolution vCard
21
22 Mailbox conversion:
23   calypso_convert.pl            Import mbox files with attachments from Calypso
24   convert_mbox.pl               Import mbox files
25   maildir2sylpheed.pl           Convert a maildir mailbox to MH format
26
27 Other tools:
28   acroread2sylpheed.pl          Send PDFs from Adobe Reader 7
29   filter_conv.pl                Convert old-style filters to new filtering
30   nautilus2sylpheed.sh          Send files from Nautilus
31   OOo2sylpheed.pl               Send documents from OpenOffice.org
32   sylprint.pl                   Printing engine, explained in README.sylprint
33   update-po                     Update the .po files named on the command line.
34
35 Extra tools:
36   gif2xface.pl                  Convert a 48x48 GIF file to an X-Face header
37
38 --------------------------------------------------------------------------------
39 Detailed Descriptions:
40 --------------------------------------------------------------------------------
41
42 Action scripts
43 --------------
44
45 * freshmeat_search.pl
46   WORKS ON: selection
47   COMMAND: |freshmeat_search.pl
48   Search freshmeat.net for selected text using the default Sylpheed-Claws browser
49
50 * google_msgid.pl
51   WORKS ON: selection
52   COMMAND: |google_msgid.pl
53   Lookup selected message-id in google using mozilla. Edit the script to use
54   different browsers.
55
56 * google_search.pl
57   WORKS ON: selection
58   COMMAND: |google_search.pl
59   Search google.com for selected text using the default Sylpheed-Claws browser
60
61 * multiwebsearch.pl
62   WORKS ON: selection
63   see further down for details
64
65 * uudec
66   WORKS ON: current message (or part of multipart message)
67   COMMAND: uudec %f&
68   Decode and display uuencoded images using uudecode.
69
70 * textviewer.sh
71   WORKS ON: current message part
72   COMMAND: textviewer.sh %p |
73   Attempt to view an attachment as plain text
74
75 * More action examples can be found at
76   http://melvin.hadasht.free.fr/home/sylpheed/actions/
77
78 ** multiwebsearch.pl **
79
80   WHAT IT DOES
81         This is an Actions script that allows you to search
82         websites for the selected text. It uses the default
83         Sylpheed-Claws browser as configured through Sylpheed
84         -Claws' GUI and specified in ~/.sylpheed-claws/sylpheedrc,
85         and a configuration file called multiwebsearch.conf.
86         
87   CONFIGURATION
88         The configuration file takes the following format:
89         
90         ALIAS|URL PART|URL PART
91         
92         ALIAS is a user-defined name; the first URL PART is the
93         url before the search term; the second URL PART is
94         optional and contains the remaining part of the url which
95         comes after the search term. A sample configuration file
96         is included.
97         
98   HOW TO USE IT
99         Copy 'multiwebsearch.conf' to ~/.sylpheed-claws/
100         
101         Configure an Action:
102         a) pre-configured website 
103            Command: multiwebsearch.pl --where="google" --what="%s"
104         b) dynamic
105            Command: multiwebsearch.pl --where="%u" --what="%s"
106            
107         In type a) "google" refers to one of the configured aliases,
108         this Action will always search the website referred to by
109         the alias "google".
110         
111         In type b) you will be presented with a dialog box into
112         which you type one of your configured aliases
113
114   
115   Contact: Paul Mangan <claws@thewildbeast.co.uk>
116 --------------------------------------------------------------------------------
117
118 Address book conversion
119 -----------------------
120
121 * eud2gc.py
122
123   WHAT IT DOES
124         This python-script is a quick hack to convert an Eudora (v.3?)
125         addressbook to vCard (GnomeCard) format.
126
127   HOW TO USE IT
128         You may do whatever you want with it! (Also regarding copying)
129         However, the script is intended to use like this:
130
131                 eud2gc.py <Eudora-addressbook-file> <Gnomecard-file>
132
133         Be careful not to overwrite your original GnomeCard.gcrd!
134         (But of course you might want to add the converted stuff to it)
135
136   Contact: Jeroen Versteeg <j.m.versteeg@student.utwente.nl>
137
138 * kmail2sylpheed.pl
139
140   WHAT IT DOES
141         This perl script will convert an exported Kmail addressbook into a
142         Sylpheed-Claws addressbook. If your version of Kmail is 1.37 or
143         greater and/or your version of KAddressBook is 3.1beta1 or greater,
144         or this script mixes up your definitions and their related data, use
145         'kmail2sylpheed_v2.pl' instead.
146
147   HOW TO USE IT
148         (You must run sylpheed-claws at least once before running this script.)
149
150         In Kmail's Address book choose '/File/Export List'. This will export
151         your Kmail address book data to a *.csv file.
152
153         If Sylpheed-Claws is running, close it.
154
155         From the command line, execute the following:
156  
157                 perl kmail2sylpheed.pl --kmailfile=/path/to/addressbook.csv
158
159         Your Kmail address book data will now be contained in Sylpheed-Claws'
160         address book, under the name 'Kmail Address Book'.
161
162   Contact: Paul Mangan <claws@thewildbeast.co.uk>
163     
164
165 * kmail2sylpheed_v2.pl
166
167   This script has been tested with Kmail 1.4.7 and KAddressBook 3.1beta1
168
169   WHAT IT DOES
170         This perl script will convert a Kmail address book that has been
171         exported in csv format into a Sylpheed-Claws address book.
172
173   HOW TO USE IT
174         (You must run sylpheed-claws at least once before running this script.)
175   
176         Open Kmail's Addressbook, /File/Address Book
177         In Kmail's Addressbook choose '/File/Export/Export List...'. This 
178         will allow you to export your Kmail addressbook data to a *.csv file.
179
180         If Sylpheed-Claws is running, close it.
181
182         From the command line, execute the following:
183  
184                 perl kmail2sylpheed_v2.pl --kmailfile=/path/to/addressbook.csv
185         
186         You can also use --help to see usage instructions.
187
188         Your Kmail addressbook data will now be contained in Sylpheed-Claws'
189         addressbook, under the name 'Kmail address book'.
190
191   Contact: Paul Mangan <claws@thewildbeast.co.uk>  
192
193
194 * outlook2sylpheed.pl
195
196   WHAT IT DOES
197         This perl script converts an Outlook generated contact list into a 
198         Sylpheed-Claws XML address book.
199
200   HOW TO USE IT
201         For text files:
202         --------------
203         You must export Outlook Express contact list as TXT file, choosing
204         only "Name" and "Address" fields to export.
205
206         You must exit Sylpheed-Claws before converting the contact list.
207
208         From the command line, execute the following:
209
210                 outlook2sylpheed.pl fullpathname
211
212         For csv files:
213         -------------
214         You must export Outlook contact list as CSV file, choosing ALL the
215         fields available for exporting.
216
217         You must exit Sylpheed-Claws before converting the contact list.
218
219         From the command line, execute the following:
220
221                 outlook2sylpheed.pl --csv fullpathname
222
223   LIMITATIONS
224         For text files only works with fields described above. If you have 
225         more complex examples send them to me, and I'll try to enhance the 
226         script.
227
228         For csv files you must export all fields (but only non empty fields
229         are added to the created Sylpheed-Claws address book) and the number
230         of fields expected is harcoded. Look for the $nboffields variable in
231         the script and change its value if you are sure you exported all
232         fields and script gives the 'unknown csv file format' error.
233
234   Contact: Ricardo Mones Lastra <mones@aic.uniovi.es>
235
236
237 * tb2sylpheed
238
239   WHAT IT DOES
240         This perl script will convert an address book exported from The Bat! 
241         into a Sylpheed-Claws address book.
242
243   HOW TO USE IT
244         (You must run sylpheed-claws at least once before running this script.)
245
246         If Sylpheed-Claws is running, close it.
247
248         Export The Bat! Address Book to CSV file format with all fields 
249         selected to YES and then start:
250
251                 tb2sylpheed --tbfile=/full/path/to/thebat/addressbook.csv
252  
253         The Bat! addressbook data will now be contained in Sylpheed-Claws'
254         addressbook, under the name 'The Bat! Address Book'.
255
256   Contact: Urke MMI <urke@gmx.net>  
257
258
259 * vcard2xml.py
260
261   WHAT IT DOES
262         This python script will convert an Evolution vCard into a Sylpheed-Claws
263         address book.
264
265   HOW TO USE IT
266         (You must run sylpheed-claws at least once before running this script.)
267
268         If Sylpheed-Claws is running, close it.
269         From the command line, execute the following:
270
271                 vcard2xml.py source_file [destination_file]
272  
273         When only <source_file> is specified it will overwrite (and
274         create a backup of) the existing addressbook. 
275         When both arguments are suplied it will create a new additional 
276         addressbook named as <destination_file>.
277         If the script encounters an error it will attempt to roll back
278         the changes and restore the original files.
279
280   Contact: Bogdan Sumanariu <bsumanariu@one5.ro> 
281
282 --------------------------------------------------------------------------------
283
284 Mailbox conversion
285 ------------------
286
287 * calypso_convert.pl
288
289   WHAT IT DOES
290         This perl script imports mbox files that are exported by Calypso.
291         It recreates the folder structure by scanning the "X-CalypsoFolder"
292         header and reincludes the attachments referenced in the
293         "X-CalypsoHtmlBody" "X-CalypsoAccount" "X-Attachment" headers.
294   
295   HOW TO USE IT
296         Export the Calypso mailbox by selecting "Save to archive" and check
297         the "Save attachments" box.
298         
299         Edit the script to set following variables (at the top of the file):
300            $mboxdir  : path to the exported mbox, e.g. 'Archive' or '.'
301            $mboxfile : name of exported mbox, e.g. 'mail.txt'
302            $outdir   : name of the MH folder to create, e.g. 'Calypso'
303            
304          Run the script using
305          
306                 perl calypso_convert.pl
307                 
308         Finally, import that folder by either selecting "New mailbox" or
309         moving it into your existing directory and recreate the folder
310         structure manually (contentmenu from folderview).
311
312   Contact: Thorsten Maerz <torte@netztorte.de>
313
314 * convert_mbox.pl
315
316   WHAT IT DOES
317         This perl script converts an mbox directory's contents into 
318         Sylpheed-Claws' MH format.
319   
320   HOW TO USE IT
321   
322         Run the script using:
323          
324                 perl convert_mbox.pl MBOX MH_DIR
325                 
326         Move the outputted MH_DIR and its contents into your Sylpheed-Claws
327         Mail folder; in Sylpheed-Claws right-click the top-level folder and
328         choose 'Rebuild folder tree' from the popup menu.
329
330   Contact: Fred Marton <Fred.Marton@uni-bayreuth.de>
331
332 * maildir2sylpheed.pl
333
334   WHAT IT DOES
335         This perl script converts a mailbox in maildir format into
336         Sylpheed-Claws' MH format.
337   
338   HOW TO USE IT
339   
340         Exit Sylpheed-Claws if running.
341         
342         Run the script using:
343          
344                 perl maildir2sylpheed.pl --kmaildir=mail_folder_name
345                 
346         Start Sylpheed-Claws and right-click the toplevel mailbox, i.e
347         "Mailbox (MH)", and select 'Rebuild folder tree'.
348         You may also need to run '/File/Folder/Check for new messages
349         in all folders'
350         Your maildir directory will be backed-up.
351         
352         Additional options:
353                 --debug         debug mode
354                 --dry-run       test mode, nothing is actually written
355                 --help          brief usage info
356         
357   Contact: Paul Mangan <claws@thewildbeast.co.uk>
358 --------------------------------------------------------------------------------
359
360 Other tools
361 -----------
362
363 * acroread2sylpheed.pl
364
365   WHAT IT DOES
366         This perl script enables Adobe Reader 7 to send documents to
367         Sylpheed-Claws as attachments.
368
369   HOW TO USE IT
370         Make sure that the script is executable (chmod +x acroread2sylpheed.pl)
371         Start up Adobe Reader 7 (acroread)
372         Go to /Edit/Preferences/SendMail
373         Select any email client except 'System Mail (mail)'
374         Enter the path to this script in the alternate location box  
375
376         You can then use 'File/Email' or the Email toolbar button to launch
377         sylpheed-claws (if not already launched) and open a new compose window
378         with the PDF attached.
379   
380   Contact: Paul Mangan <claws@thewildbeast.co.uk>
381
382
383 * filter_conv.pl
384
385   WHAT IT DOES
386         This perl script provides easy conversion of your filtering rules
387         form sylpheed's old filter system (pre version 0.9.99) to the new
388         filtering system used in sylpheed-claws.
389         It reads '~/.sylpheed/filterrc' and outputs '~/.sylpheed-claws/matcherrc'.
390   
391   HOW TO USE IT
392         Issue the following command from the 'tools' directory:
393
394         perl filter_conv.pl
395
396         That's it, the new filtering system is now implemented with your
397         previous rules applied.
398
399   Contact: Paul Mangan <claws@thewildbeast.co.uk>
400   
401
402 * nautilus2sylpheed.sh
403
404   WHAT IT DOES
405         This script will recursively attach a number of selected 
406         files/directories from Nautilus to a new blank e-mail.
407
408   HOW TO USE IT
409         Copy the script to $HOME/.gnome2/nautilus-scripts, chmod u+x, 
410         and restart nautilus (killall -9 nautilus). You will now have 
411         a right-click menu item: '/Scripts/nautilus2sylpheed.sh'
412         
413   Contact: Reza Pakdel <hrpakdel@cpsc.ucalgary.ca>
414
415
416 * OOo2sylpheed.pl
417
418   WHAT IT DOES
419         This perl script enables OpenOffice.org to send documents to
420         Sylpheed-Claws as attachments.
421
422   HOW TO USE IT
423     OpenOffice.org Version 1.0
424     --------------------------
425         Start up OpenOffice.org.
426         Go to 'Tools/Options/OpenOffice.org/External Programs'
427         Enter the path to OOo2sylpheed.pl in the 'Program' box
428         or select it by clicking on the '...' button.
429
430     OpenOffice.org Version 1.1.0
431     ----------------------------
432         Start up OpenOffice.org.
433         Go to 'Tools/Options/OpenOffice.org/External Programs'
434         Select either ''Mozilla 1.x (Option 1)', or 
435         'Netscape 6.x - 7.0 (Option 1)' from the 'Program' selection
436         Enter the path to OOo2sylpheed.pl in the 'Path' box
437         or select it by clicking on the '...' button.
438     
439         You can then use 'File/Send/Document as email' to launch
440         sylpheed-claws (if not already launched) and open a new compose
441         window with the document attached.
442
443         Tested with OpenOffice.org versions 1.0, 1.1.0
444   
445   Contact: Paul Mangan <claws@thewildbeast.co.uk>
446
447
448 * update-po
449
450   WHAT IT DOES
451         This script is a message catalog translator's tool, it updates the .po 
452         files named on the command line.
453
454   HOW TO USE IT
455         This script needs to be copied to and run from the 'po' directory.
456   
457                 ./update-po lang.po lang2.po ...
458
459         to update one or more <yourlang>.po files from the sourcecode files
460          named in POTFILES.in. The old .po file is save in a .po.old file.
461
462         For example, when you want to update fr.po, run ./update-po fr.po, 
463         then edit fr.po to update your translation.
464
465   Contact: Wilbert Berendsen <wilbert@oswf.org>
466
467 --------------------------------------------------------------------------------
468
469 Extra tools
470 -----------
471
472 * gif2xface.pl
473
474   WHAT IT DOES
475         This perl script converts a monochrome (1 bit) 48x48 pixels GIF file
476         into an X-Face graphic suitable for inclusion into custom headers of
477         Sylpheed-Claws. An X-Face allows to quickly identify (or be identified
478         as) the sender of a mail message in a xface-capable MUA (like sylpheed
479         -claws).
480
481   HOW TO USE IT
482         After obtaining the desired image for your X-Face you should:
483           * scale it to 48x48 pixels (Image->Scale image on Gimp)
484           * down color depth to b/w (Image->Mode->Indexed selecting "Use
485             Black/White palette" and the desired dithering options (prior to
486             indexing doing Image->Colors->Threshold allows you to select the
487             b/w level if you don't want a dithered (dotty) image))
488           * save file as non-interlaced GIF
489         Then do:
490
491                 ./gif2xface < filename.gif > filename.xface
492
493         In filename.xface will be the X-Face header ready to use.
494         You can add a custom header in Sylpheed-Claws through Configuration->
495         Preferences per account, "Send" tab, check "Add user-defined header"
496         then "Edit..." if you want to add it via Sylpheed -Claws interface, or do
497
498                 echo "0:" `cat filename.xface` > ~/.sylpheed-claws/customheaderrc
499
500         if you want to create the custom headers file yourself (Warning: this
501         method is valid only if you don't have any other custom header set or
502         they will be lost!).
503
504   Contact: Ricardo Mones Lastra <mones@aic.uniovi.es>
505
506 --------------------------------------------------------------------------------