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