5b9844ef9efc1f6187ab24138aab7940c9f10724
[claws.git] / tools / README
1
2 --------------------------------------------------------------------------------
3 Contents of the tools directory:
4 --------------------------------------------------------------------------------
5
6 Action scripts:
7   gpg-sign-syl                  Clear-sign current selection
8   google_msgid.pl               Lookup selected message-id in google
9   uudec                         Decode and display uuencoded images
10
11 Addressbook conversion:
12   eud2gc.py                     Convert Eudora address book to Gnomecard
13   kmail2sylpheed.pl             Import a Kmail address book (KDE2)
14   kmail2sylpheed_v2.pl          Import a Kmail address book (KDE3)
15   outlook2sylpheed.pl           Import an Outlook generated contact list
16   tb2sylpheed                   Import The Bat! address books
17
18 Mailbox conversion:
19   calypso_convert.pl            Import mbox files with attachments from Calypso
20
21 Other tools:
22   filter_conv.pl                Convert old-style filters to new filtering
23   newscache_clean.pl            Clean up news directory
24   OOo2sylpheed.pl               Send documents from OpenOffice.org
25   sylpheed-switcher             Run either sylpheed or claws (separate configs)
26   sylprint.pl                   Printing engine, explained in README.sylprint
27   update-po                     Update the .po files named on the command line.
28
29 Extra tools:
30   gif2xface.pl                  Convert a 48x48 GIF file to an X-Face header
31   launch_phoenix                Open URLs in Phoenix
32
33 --------------------------------------------------------------------------------
34 Detailed Descriptions:
35 --------------------------------------------------------------------------------
36
37 Action scripts
38 --------------
39
40 * gpg-sign-syl
41   WORKS ON: selection, whole message
42   COMMAND: |gpg-sign-syl|
43   Clear-sign current selection using gpg.
44
45 * google_msgid.pl
46   WORKS ON: selection
47   COMMAND: |google_msgid.pl
48   Lookup selected message-id in google using mozilla. Edit the script to use
49   different browsers.
50
51 * uudec
52   WORKS ON: current message (or part of multipart message)
53   COMMAND: uudec %f&
54   Decode and display uuencoded images using uudecode.
55
56 * More action examples can be found at
57   http://melvin.hadasht.free.fr/home/sylpheed/actions/
58
59 --------------------------------------------------------------------------------
60
61 Address book conversion
62 -----------------------
63
64 * eud2gc.py
65
66   WHAT IT DOES
67         This python-script is a quick hack to convert an Eudora (v.3?)
68         addressbook to vCard (GnomeCard) format.
69
70   HOW TO USE IT
71         You may do whatever you want with it! (Also regarding copying)
72         However, the script is intended to use like this:
73
74                 eud2gc.py <Eudora-addressbook-file> <Gnomecard-file>
75
76         Be careful not to overwrite your original GnomeCard.gcrd!
77         (But of course you might want to add the converted stuff to it)
78
79   Contact: Jeroen Versteeg <j.m.versteeg@student.utwente.nl>
80
81 * kmail2sylpheed.pl
82
83   WHAT IT DOES
84         This perl script will convert an exported Kmail addressbook into a
85         Sylpheed addressbook. If your version of Kmail is 1.37 or greater
86         and/or your version of KAddressBook is 3.1beta1 or greater, or
87         this script mixes up your definitions and their related data, use
88         'kmail2sylpheed_v2.pl' instead.
89
90   HOW TO USE IT
91         (You must run sylpheed at least once before running this script.)
92
93         In Kmail's Address book choose '/File/Export List'. This will export
94         your Kmail address book data to a *.csv file.
95
96         If Sylpheed is running, close it.
97
98         From the command line, execute the following:
99  
100                 perl kmail2sylpheed.pl --kmailfile=/path/to/addressbook.csv
101
102         Your Kmail address book data will now be contained in Sylpheed's
103         address book, under the name 'Kmail Address Book'.
104
105   Contact: Paul Mangan <claws@thewildbeast.co.uk>
106     
107
108 * kmail2sylpheed_v2.pl
109
110   This script has been tested with Kmail 1.4.7 and KAddressBook 3.1beta1
111
112   WHAT IT DOES
113         This perl script will convert a Kmail address book that has been
114         exported in csv format into a Sylpheed address book.
115
116   HOW TO USE IT
117         (You must run sylpheed at least once before running this script.)
118   
119         Open Kmail's Addressbook, /File/Address Book
120         In Kmail's Addressbook choose '/File/Export/Export List...'. This 
121         will allow you to export your Kmail addressbook data to a *.csv file.
122
123         If Sylpheed is running, close it.
124
125         From the command line, execute the following:
126  
127                 perl kmail2sylpheed_v2.pl --kmailfile=/path/to/addressbook.csv
128         
129         You can also use --help to see usage instructions.
130
131         Your Kmail addressbook data will now be contained in Sylpheed's
132         addressbook, under the name 'Kmail address book'.
133
134   Contact: Paul Mangan <claws@thewildbeast.co.uk>  
135
136
137 * outlook2sylpheed.pl
138
139   WHAT IT DOES
140         This perl script converts an Outlook generated contact list into a 
141         Sylpheed XML address book.
142
143   HOW TO USE IT
144         You must export Outlook Express contact list as TXT file, choosing
145         only "Name" and "Address" fields to export.
146
147         You must exit Sylpheed before converting the contact list.
148
149         From the command line, execute the following:
150
151                 outlook2sylpheed.pl fullpathname
152
153   LIMITATIONS
154         Only works with fields described above. If you have more complex
155         examples send them to me, and I'll try to enhance the script.
156
157   Contact: Ricardo Mones Lastra <mones@aic.uniovi.es>
158
159
160 * tb2sylpheed
161
162   WHAT IT DOES
163         This perl script will convert an address book exported from The Bat! 
164         into a Sylpheed address book.
165
166   HOW TO USE IT
167         (You must run sylpheed at least once before running this script.)
168
169         If Sylpheed is running, close it.
170
171         Export The Bat! Address Book to CSV file format with all fields 
172         selected to YES and then start:
173
174                 tb2sylpheed --tbfile=/full/path/to/thebat/addressbook.csv
175  
176         The Bat! addressbook data will now be contained in Sylpheed's
177         addressbook, under the name 'The Bat! Address Book'.
178
179   Contact: Urke MMI <urke@gmx.net>  
180
181 --------------------------------------------------------------------------------
182
183 Mailbox conversion
184 ------------------
185
186 * calypso_convert.pl
187
188   WHAT IT DOES
189         This perl script imports mbox files that are exported by Calypso.
190         It recreates the folder structure by scanning the "X-CalypsoFolder"
191         header and reincludes the attachments referenced in the
192         "X-CalypsoHtmlBody" "X-CalypsoAccount" "X-Attachment" headers.
193   
194   HOW TO USE IT
195         Export the Calypso mailbox by selecting "Save to archive" and check
196         the "Save attachments" box.
197         
198         Edit the script to set following variables (at the top of the file):
199            $mboxdir  : path to the exported mbox, e.g. 'Archive' or '.'
200            $mboxfile : name of exported mbox, e.g. 'mail.txt'
201            $outdir   : name of the MH folder to create, e.g. 'Calypso'
202            
203          Run the script using
204          
205                 perl calypso_convert.pl
206                 
207         Finally, import that folder by either selecting "New mailbox" or
208         moving it into your existing directory and recreate the folder
209         structure manually (contentmenu from folderview).
210
211   Contact: Thorsten Maerz <torte@netztorte.de>
212
213 --------------------------------------------------------------------------------
214
215 Other tools
216 -----------
217
218 * filter_conv.pl
219
220   WHAT IT DOES
221         This perl script provides easy conversion of your filtering rules
222         form sylpheed's old filter system to the new filtering system used
223         in sylpheed-claws. It reads '~/.sylpheed/filterrc' and outputs 
224         '~/.sylpheed/matcherrc'.
225   
226   HOW TO USE IT
227         Issue the following command from the 'tools' directory:
228
229         perl filter_conv.pl
230
231         That's it, the new filtering system is now implemented with your
232         previous rules applied.
233
234   Contact: Paul Mangan <claws@thewildbeast.co.uk>
235   
236
237 * newscache_clean.pl
238
239   WHAT IT DOES AND WHY IT DOES IT
240         This perl script cleans up in '$HOME/.sylpheed/newscache'. Currently
241         the newscache becomes littered with old directories and files - when
242         you subscribe to a newsgroup a sub-directory gets created for it in
243         ~/.sylpheed/newscache/[nntpserver], should you unsubscribe from the 
244         group the sub-directory does not get deleted. Until this is done 
245         internally this script will take care of some tidying up.
246   
247         This script removes directory trees of nntp servers that you no longer
248         have an account for. Where an account exists it removes directories
249         and files of those groups to which you are no longer subscribed.
250
251   HOW TO USE IT
252         Issue the following command from the 'tools' directory:
253   
254                 perl newscache_clean.pl
255         
256         This script uses the File::Path module, if you don't already have it
257         installed, you can find it at the CPAN search site 
258         <http://search.cpan.org>
259
260   Contact: Paul Mangan <claws@thewildbeast.co.uk>
261
262
263 * OOo2sylpheed.pl
264
265   WHAT IT DOES
266         This perl script enables OpenOffice.org to send documents to sylpheed
267         as attachments.
268
269   HOW TO USE IT
270         Start up OpenOffice.org.
271         Go to 'Tools/Options/OpenOffice.org/External Programs'
272         Enter the path to OOo2sylpheed.pl in the 'Program' box
273         or select it by clicking on the '...' button.
274
275         You can then use 'File/Send/Document as email' to launch sylpheed
276         (if not already launched) and open a new compose window with the
277         document attached.
278
279         Tested with OpenOffice.org version 1.0
280   
281   Contact: Paul Mangan <claws@thewildbeast.co.uk>
282
283
284 * sylpheed-switcher
285
286   WHAT IT DOES
287         This perl script is for users who like to move between the main
288         sylpheed branch and the claws branch. Because of some differences
289         between the stored options it is better IMO to use two separate
290         '.sylpheed' directory trees. Doing that manually could prove to
291         be tiresome, and so I've written this script to automate the task.
292
293         The first time you run this script you enter the full paths,
294         including the executable itself, to both the main version of
295         sylpheed and the claws version. This information is then stored
296         in a file in your $HOME directory called '.sylpheed-switcher'
297
298         During this initial set-up, your '~/.sylpheed' directory
299         is copied to '~/.sylpheed-main' and '~/.sylpheed-claws'.
300   
301         When you run sylpheed via this script, your '~/.sylpheed' directory
302         is deleted and replaced with a symbolic link to either 
303         ~/.sylpheed-main' or '~/sylpheed-claws', depending on the option you 
304         choose. (On subsequent usage the symbolic link is deleted and replaced 
305         with a new symbolic link).
306
307   HOW TO USE IT
308         Initial set-up
309         Enter the full paths to the executable, including the executable itself,
310         example:
311   
312                 ./sylpheed-switcher --claws-path=/usr/local/bin/sylpheed 
313                 --main-path=/usr/bin/sylpheed
314         
315         After the initial set-up, use the following:
316   
317                 ./sylpheed-switcher --claws     (to run sylpheed-claws)
318                 ./sylpheed-switcher --main      (to run sylpheed main)
319         
320         Additionally you can append --debug to run in debug mode.
321         Use --help for more info.       
322  
323         This script uses the File::Path and Getopt::Long modules, if you don't
324         already have them installed, you can find them at the CPAN search site 
325         <http://search.cpan.org>
326
327   Contact: Paul Mangan <claws@thewildbeast.co.uk>
328
329
330 * update-po
331
332   WHAT IT DOES
333         This script is a message catalog translator's tool, it updates the .po 
334         files named on the command line.
335
336   HOW TO USE IT
337         This script needs to be copied to and run from the 'po' directory.
338   
339                 ./update-po lang.po lang2.po ...
340
341         to update one or more <yourlang>.po files from the sourcecode files
342          named in POTFILES.in. The old .po file is save in a .po.old file.
343
344         For example, when you want to update fr.po, run ./update-po fr.po, 
345         then edit fr.po to update your translation.
346
347   Contact: Wilbert Berendsen <wilbert@oswf.org>
348
349 --------------------------------------------------------------------------------
350
351 Extra tools
352 -----------
353
354 * gif2xface.pl
355
356   WHAT IT DOES
357         This perl script converts a monochrome (1 bit) 48x48 pixels GIF file
358         into an X-Face graphic suitable for inclusion into custom headers of
359         Sylpheed. An X-Face allows to quickly identify (or be identified as)
360         the sender of a mail message in a xface-capable MUA (like sylpheed).
361
362   HOW TO USE IT
363         After obtaining the desired image for your X-Face you should:
364           * scale it to 48x48 pixels (Image->Scale image on Gimp)
365           * down color depth to b/w (Image->Mode->Indexed selecting "Use
366             Black/White palette" and the desired dithering options (prior to
367             indexing doing Image->Colors->Threshold allows you to select the
368             b/w level if you don't want a dithered (dotty) image))
369           * save file as non-interlaced GIF
370         Then do:
371
372                 ./gif2xface < filename.gif > filename.xface
373
374         In filename.xface will be the X-Face header ready to use.
375         You can add a custom header in Sylpheed through Configuration->
376         Preferences per account, "Send" tab, check "Add user-defined header"
377         then "Edit..." if you want to add it via Sylpheed interface, or do
378
379                 echo "0:" `cat filename.xface` > ~/.sylpheed/customheaderrc
380
381         if you want to create the custom headers file yourself (Warning: this
382         method is valid only if you don't have any other custom header set or
383         they will be lost!).
384
385   Contact: Ricardo Mones Lastra <mones@aic.uniovi.es>
386
387
388 * launch_phoenix
389
390   WHAT IT DOES
391         Check for a running phoenix process and and open a new tab with a 
392         given URL, or execute phoenix with that URL
393   
394   HOW TO USE IT  
395         In Common Preferences move to the 'Other' tab and enter the
396         following in the 'Web browser' box
397   
398         launch_phoenix '%s'
399   
400   Contact: Mohammed Sameer <Uniball@linux-egypt.org>
401
402
403 --------------------------------------------------------------------------------