README 20 KB

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