On 19-Mar-2008, at 08:16, Chris Janton wrote:
From: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
Hmm.. this is more complicated than I first thought. the commands after the first do not wait until BBEdit finishes writing to run. So, I can try and throw something through fmt, then attach the signatures, but they all execute too soon.


"man bbedit" is your friend.

      -w, --wait

Yeah, I did find that. Oddly, it's not necessary unless I am doing something else to the file also, because slrn waits until you confirm to actually send the file. By that time, BBedit has written it so the right file gets sent.

I was using just bbedit '%s' before, and hat worked just fine, as long as I was happy with a static signature and manually wrapping the posts each time.

You could make a simple script (bash) that might look like this

        bbedit -t "NNTP POSTING" --new-window -w $1
        fmt -w 72 -m $1 > $1.tmp
        cat $1.tmp `/opt/local/bin/fortune ~/mysigs` >$1
        rm $1.tmp

Right, that's essentially what I ended up with, before seeing that fmt simply mangled the headers of the posting.

set post_editor_command "FILE='%s';cp $FILE ${FILE}.new;bbedit -w -- new-window +%d ${FILE}.new;fmt -m -72 ${FILE}.new > $FILE;/opt/local/ bin/fortune ~/mysigs >> $FILE"

 $ cat .article.new
Newsgroups: misc.test
From: Lewis <[EMAIL PROTECTED]>
Subject: test
Reply-To:
Followup-To:
Keywords:
Summary:
X-Face: )^b5"R:T7U>9~:PEn3YkzMfW*[b1qKeU.fP9C8~8HpU9}lA&6`bH1z

This si a test post with a very long line. This si a test post with a very long line. This si a test post with a very long line. This si a test post with a very long line. This si a test post with a very long line. This si a test post with a very long line. This si a test post with a very long line. This si a test post with a very long line. This si a test post with a very long line. This si a test post with a very long line. This si a test post with a very long line.

 $ fmt -m 72 .article.new
Newsgroups: misc.test
From: Lewis <[EMAIL PROTECTED]>
Subject: test
Reply-To: Followup-To: Keywords: Summary: X-Face:
)^b5"R:T7U>9~:PEn3YkzMfW*[b1qKeU.fP9C8~8HpU9}lA&6`bH1z

This si a test post with a very long line. This si a test post with a very long line. This si a test post with a very long line. This si a test post with a very long line. This si a test post with a very long line. This si
a test post with a very long line. This si a test post with a very long
line. This si a test post with a very long line. This si a test post with
a very long line. This si a test post with a very long line. This si a
test post with a very long line.

===

The body gets wrapped, but the headers are completely hosed.

I thought vim/nvi has a 'rewrap' command... wonder if there is some way to pipe the file through vim... I may have to pull out my perl book. Horrors!

--
I draw the line at 7 unreturned phone calls.


--
------------------------------------------------------------------
Have a feature request? Not sure the software's working correctly?
If so, please send mail to <[EMAIL PROTECTED]>, not to the list.
List FAQ: <http://www.barebones.com/support/lists/bbedit_talk.shtml>
List archives: <http://www.listsearch.com/BBEditTalk.lasso>
To unsubscribe, send mail to:  <[EMAIL PROTECTED]>

Reply via email to