Short: Remove text in [] from subjects (YAM) Uploader: Stephan Huebner (StephanHuebner@swol.de) Author: Stephan Huebner (StephanHuebner@swol.de) Type: comm/mail Requires: YAM 2.0 Version: 5.0 ******************** * SnipSubject V5.0 * ******************** Introduction ------------ This little arexx-proggie is for YAM and snips out [everything] within those brackets which the users wants it to (usefull for mailinglists). So if you have a subject like "RE: [YAM] Anything", the resulting subject will be "RE: Anything". It's emailware, so I'd like to get an email of you, maybe commenting the programm or talking about everything you want. Although I tested it on different folders it might do some strange things to your mails, who knows... So maybe you should try it the first times with some unimportant mails. Features: --------- - Cuts out one or more strings for certain folders (selectable by the user) - Replaces "Re: Re: " with "Re: " (only in combination with the normal cut-out) - Upper or Lower typing doesn't matter. So "yam" is the same as "YAM" - It reformats the subject a bit, as I needed it for working correct. What it does is that it also cuts out appearances of more than one space and replacing it with just one space. So if you have something like "Re: [YAM] XXX" you will have "Re: XXX" afterwards - The prefsfile will be written automatically if it doesn't exist Installation: ------------- just copy it to "YAM:rexx/" or wherever you have your YAM-arexx-scripts installed. Place it in the arexx-menu-configuration and disable the "wait until termination"-checkbutton. Usage: ------ Just select a folder where you have some ML-mails and run the script. If no prefsfile can be found, one will be created in your env:/envarc:-drawers. Now, if the actual folder isn't found in the prefsfile, the search for a []- string will begin. If an unknown string is found, you will be asked if you want to cut it out once, always or not. once: only for the actual mail always: this string will be saved to the prefsfile, so next time you run the script it will cut out those strings automatically no: leave the string in the mail If a string is found and there is already a []-string for the actual folder saved in the prefsfile you will be asked if you want to add the found string to the prefsfile or replace the existing entry. This way the script is able to recognize if the []-string for a folder has changed. Normally, the script would check all the mails in one folder. But you can avoid that by selecting more than one mail. If you do so, only the selected mails will be checked. Might save you a whole lot of time. (But it still takes a whole lot of time to update the folderindex, but that's a YAM-job and I don't think I can make this faster) The prefsfile (Just for the curious ones... ;-) ): The prefsfile is used for folders and the sniptext. Let's say you have a folder named "prog" were you have mails of the mailinglist called "amiprog". If you let the proggie work on that folder for the first time it asks you if it should save this combination "prog|amiprog" to the prefsfile. That way, the next time you let the proggie work on that folder you wont have to enter anything, it will start automagically to snip out the right text. What still doesn't work: ------------------------ Who knows... :-) Important: ---------- The prefs-file uses "|" as a separator, so if you use this sign within your folder names you'll very likely have a problem :-) The same goes for "\" (also known as "Backslash"). This one is used in the new version to separate the different entries for one folder. Although you don't need to make any changes to the prefsfile by hand. Anything should be handled correctly by the script itself! Future ------ Depends on what reactions I get. My eMail is: StephanHuebner@swol.de So any comments are very welcome. If you have problems please mail me. If there are Mailing lists were the script doesn't work, it would be good to tell me, how I can subscribe to that list cause this way I can compare the original and the changed mails. Thanks. Possible improvements (suggested or from my own): - A wildcard-option. But the problem I see with that is that it might not work as "intuitive" anymore as it does now (if it does anyway...) :-) - Make it work with xpk-packed folders, but I have absolutely no clue how to do that... :-/ - Look for obsolete (deleted) folders and remove them from the prefsfile automatically History (as far as I remember it): ================================== V5.0 ---- - Rewrote much of the script to be able to cut out more than one string in one folder V4.2 ---- - Implemented a function to remove a Part of "Re: Re:" (done by Lorens Johanson) - New Behavior (test if one or more mails are selected, see above) - One or two internal changes V4.1Beta - New Yp7-Requesters built in (by Lorens Johanson (and cosmetically improved (???) by me. Therefore nothing else (like external libs) are needed anymore - Some small fixes for "user-friendlyness" by Lorens Johanson and me - Updated the readme (V4.0 was accidentally given out as V3.6 and Lorens Lastname was misspelled by me!!! :) ) V4.0Beta (last Yp6-working version!!!!!) -------- - Made the Prefs external - Setting the mailstatus works now, although I don't know exactly why. Probably some weird mistake I accidentally removed while improving the script - Many small improvements (since 3.1) partly done by me but probably more done by Lorens Johansson who did a great job with this. Thanks. V3.5Beta -------- - If the user typed in nothing, I assume he doesn't want to snip something out, so the program terminates now - The folder is only updated if anything was changed - A nicer library-opener (suggested by Lorens Johansson) - built in Prefs with some standard Foldernames and -strings (suggested by Lorens Johansson - Several other small changes - Fixed a bug which made the script not working on mails with a subject like [Anything] Anything ... (reported and fixed by John Nelson) V3.2Beta -------- I: Removed a small bug (reported by John Nelson within a very early state of the programm, but I somehow forgot to include it into the rewrite). Nothing serious (at least nothing the normal user will ever see ;) V3.1Beta -------- - Released on Aminet (if that works, I've never done that before) - found and removed a silly bug reported by Lorens Johansson (caused by the rewrite :-) ), which made it not working - Wrote a small documentation at last (this file) :-) V3.0Beta -------- - A good amount of the script was rewritten, so the code now looks much cleaner, is smaller and faster - Implemented to cut out more than one apperances in one subject at last - Included an idea of Lau W. Nielsen (shown to me in an earlier version) regarding a speed-up of the programm, so it now changes the mail directly without writing or copying something else around V2.5Beta -------- - found and removed a bug reported by Jim Boydston (and John Pullicino at version 1.0) regarding some MLs which formatted the header-lines so nothing was cut out V2.0beta Included function to let the user choose what to snip -------- - Works on a whole folder now - Lets' the user type in what to snip out V1.0beta Somehow my proggie but changed a lot by Lau W. Nielsen :-) -------- V0.1beta Initial (internal) version -------- - Cut out everything within [] - Worked only on one selected mail - Put the mail into ram:T, worked on it and copied it back (c) 1999 Stephan Huebner