[ Date Index ] [ Thread Index ] [ <= Previous by date / thread ] [ Next by date / thread => ]
On Thu, Jan 20, 2011 at 8:04 PM, kevin <kevin.lucas@xxxxxxxxxxxxxxxxxx> wrote: > > On Thu, 2011-01-20 at 08:47 +0000, Roland Tarver wrote: >> On Tue, Jan 18, 2011 at 7:14 PM, kevin <kevin.lucas@xxxxxxxxxxxxxxxxxx> wrote: >> > Hi all, >> > >> > Does any one use Filters in evolution to do anything other than sorting >> > Mail? >> > >> > I have tinkered with doing a Mail filter where an EMail is printed as >> > soon as it arrives in the inbox ( this is for receiving orders form >> > customers). >> > >> > So far I have a filter working and using the pipe feature in Evolution I >> > can just pipe it to LPR >> > This gives me a printed sheet with all the rubbish you get (ie headers >> > etc) with an Email but the filter dose work very well. >> > >> > Does anyone already have a script to Start printing from the message >> > Body? so I can pipe it to that then LPR it at the end? or clean up the >> > Email before piping it to LPR? >> > >> > >> > >> > >> > Regards >> > >> > Kevin Lucas >> >> Hi Kevin, >> >> I dont have the script that you are asking for. But to loose the email >> headers could you just use grep, something like.... >> >> >> cat evolutionEmail | grep -i -A 100 '*subject*' | lpr -p >> >> >> Best wishes >> roly >> > Thanks Roly > > I have looked at each Mail and can see the message body starts after the > fist blank line so ... > > sed '1,/^$/ d' <Email | lpr > > removes the Header but if the Email is HTML it leaves another 1 or 2 > pages of rubbish after the Mail > > But we have Progress.. > > Regards > > Kevin Lucas How about html2text program? The description in the ubuntu repository says.... "Description: advanced HTML to text converter html2text is a converter from HTML to plain text. . html2text reads HTML documents supplied in the command line (or from standard input), converts each of them into a stream of plain text characters and writes output to the file or the terminal. It is able to produce ISO 8859-1 or ASCII text." or perhaps using sed to strip the html http://www.tech-recipes.com/rx/330/remove-html-tags-from-a-file/ Bit out of my depth now, so over to you/others lol Cheers roly :-) -- The Mailing List for the Devon & Cornwall LUG http://mailman.dclug.org.uk/listinfo/list FAQ: http://www.dcglug.org.uk/listfaq