🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: alt.privacy.anon-server
Article #198007

Re: Shell Script Question

#198007
From: Nomen Nescio
Date: Mon, 05 Dec 2005 14:50
156 lines
4196 bytes
On Sun, 04 Dec 2005 19:13:23 +0000, TwistyCreek wrote:

> retired hobbyist wrote:
> 
>>  I am trying to run mixmaster via a little shell script, which asks me
>>  for the file name of the file that I want mixmaster to mail.
>>  
>>  If I run the command in the konsole, it works, but if I run it with the
>>  shell, the shell doesn't seem to be interpreting the asterisk wildcard.
> 
> Something makes Mixmaster choke on Pan's file names when run outside the
> console (from a script). Ran across the same problem myself. It might have
> something to do with the @ character, but I'm not sure. Here's how I got
> around it. Note, this is from memory I'm not near the box where I set this
> up. Not cut and paste, so run at your own risk. ;)
> 
> #################################################### ## Begin script to
> deal with Pan file names and send ## Mix messages from Pan's sendlater
> directory #################################################### #!/bin/bash
> cd ~/.pan/messages/folders/pan.sendlater for a in `ls *.msg`
>   do
>     pynoner $a
>     mv $a tmp.msg
>     ~/Mix/mixmaster tmp.msg
>     rm tmp.msg
> done;
> exit 0
> 
> ########################################### # End script
> ###########################################
> 
> The 'pynoner' command is a Python script I use to sanitize messages saved
> with Pan's 'Send Later' option so I don't have to mess with different
> posting profiles, remembering to remove signatures, stuff like that. I
> just hit the "later" button and let cron check the folder from time to
> time for messages. ;)
> 
> Here's a python script that should work. Again, from memory and untested
> as it appears here.
> 
> ##################################################### # Begin pynoner -
> Python script to scrub normal posts
> #####################################################
> 
> #! /usr/bin/python
> 
> import string
> import os
> import sys
> lines = 0
> 
> infile = open(sys.argv[1], 'r')
> message = infile.readlines()
> infile.close()
> outfile = open("tempfile.txt", 'w')
> outfile.write('To: mail2news@dizum.com\n') while (message[lines].strip()):
> 	if message[lines].startswith('Subject: '):
> 		outfile.write(message[lines])
> 	if message[lines].startswith('Newsgroups: '):
> 		outfile.write(message[lines])
> 	if message[lines].startswith('References: '):
> 		outfile.write(message[lines])
> 	if message[lines].startswith('Followup-To: '):
> 		outfile.write(message[lines])
> 	lines+=1
> for x in range(len(message[lines:])):
> 	if message[lines].startswith('-- '):
> 		outfile.close()
> 		break
> 	outfile.write(message[lines])
> 	x += 1
> 	lines += 1
> outfile.close()
> os.remove(sys.argv[1])
> os.rename('tempfile.txt', sys.argv[1])
> 
> ##################################################### # End pynoner
> #####################################################
> 
> Hope this helps! Hope it works too. ;)

Could something like this be used with windows?









































































Technical Details
Message-ID: <a593c5176c0f13a86b4d263f1202e390@dizum.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-alt.privacy.anon-server.20141023.mbox.gz!number1.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!t-online.de!news.karotte.org!news2.arglkargh.de!news.dizum.com!sewer-output!mail2news
References: <20051204174726.71683.qmail@web36405.mail.mud.yahoo.com>

Show Full Headers
Complete Article Headers
Message-ID: <a593c5176c0f13a86b4d263f1202e390@dizum.com>
Subject: Re: Shell Script Question
Date: Mon, 05 Dec 2005 14:50:08 +0000
From: Nomen Nescio <nobody@dizum.com>
References: <20051204174726.71683.qmail@web36405.mail.mud.yahoo.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-alt.privacy.anon-server.20141023.mbox.gz!number1.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!t-online.de!news.karotte.org!news2.arglkargh.de!news.dizum.com!sewer-output!mail2news
Comments: This message did not originate from the Sender address above.
 It was remailed automatically by anonymizing remailer software.
 Please report problems or inappropriate use to the
 remailer administrator at <abuse@dizum.com>.
Newsgroups: alt.privacy.anon-server
Mail-To-News-Contact: abuse@dizum.com
Organization: mail2news@dizum.com
Lines: 156