On 18-Mar-2008, at 08:35, Charlie Garrison wrote:
bbedit -t "NNTP POSTING" --new-window '%s' ; osascript 'tell app
"BBEdit" to hard wrap text 1 of text document 1 limit character
width width 72 indentation none with paragraph fill and relative'
That AppleScript came from a script recording, so adjust to taste.
If that doesn't work due to script not running until after window is
closed, then try the fmt command, eg:
bbedit -t "NNTP POSTING" --new-window '%s' ; fmt -w 72 '%s' > '%s'
Both of these options will, I think, mangle the headers of the
message. However, if there was a way to tell the script to wrap the
text from the first blank line to the end of the document, that might
work.
news posts are like emails, the headers end on the first blank line.
Everything after that is considered the body of the post.
BTW, I'm assuming that %s is the temp file name.
yes.
I wonder if there is a cli text formater I could pipe the message
through? I am already doing several things to that poor file
my actual command is
post_editor_command "FILE='%s';bbedit --new-window $FILE;/opt/local/
bin/fortune ~/mysigs >> $FILE"
(th -t option didn't seem to work)
Ah... wait a minute, I think your fmt might do it, it has a -m option
that talks about mail headers....
Ah, potential, but alas it munges the signature delimiter and doesn't
quite do the right thing with the headers.
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.
--
"Real stupidity beats artificial intelligence every time."
--
------------------------------------------------------------------
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]>