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