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