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