From Newsgroup: comp.os.linux.advocacy
On 3/19/2026 6:00 PM, Lameass Larry Piet (aka DL) wrote:
Button, button, who's got the button?
How many gui-fied Pan buttons did you click to create and send this
lameass message, lameass?
If you weren't a talentless, hypocrite lameass you would've written your
own command line newsreader years ago. Except for building your own
editor, it's not difficult at all. Maybe tcl or python even have an
editor object you can use.
Or you should be able to integrate an existing editor. When you hit
Reply on your homegrown reader, open the editor (Joe, nano, etc) and
have your code populate the editor screen with the essential info that
needs to accompany a post: headers and body separated by one blank line.
From: Lameass Larry Piet
Subject: (prefaced with 'Re: ')
Newsgroups: comp.os.linux.advocacy (you can add others, comma-separated) References: (list from the post you're replying to)
User-Agent: Larry's CLI Crud
In-Reply-To: (optional but would be the messageID you're replying to)
Date: Thu, 19 Mar 2026 19:20:21 -0400 (should use that exact format)
<blank line>
add an attribution line from the original post
"On <date> Crude Sausage wrote:"
then copy in the text of the post you're replying to
Enter/edit your reply
add "ha, ha, ha, ha, ha, ha, ha, ha, ha, ha " at the bottom
hit Send
When you hit Send, save the contents onscreen to an encoded file on your computer, then open it in read-binary mode and use the NNTP post command
to send the data to the Usenet server.
Easy peasy. I did it with a few lines of PyQt/nntplib code and a
QTextEdit widget on a PyQt form.
Your own CLI newsreader won't actually make you a 'REAL MAN', but at
least you'll be less of a GUI-hypocrite schmuck than you've been for the
last 10 years on cola.
#===============================================================
#generate headers and put orig post on screen for editing #===============================================================
def startReply(postType):
#validation - must have a post selected
if frm.tblPosts.currentRow() <0: return
#show reply form
frmP.show()
#get postid from main screen
currRow = frm.tblThread.currentRow()
postID = frm.tblThread.item(currRow,0).text()
#messageid of post being replied to
messageID = DLookup(db,"MESSAGEID", "MESSAGEID", "MSGID = " + str(DLookup(db,"MSGID", "POST", "POSTID = " + str(postID) + "")) + "")
# build required headers
headers = "From: DFS <
nospam@dfs.com>" + '\n'
subject = DLookup(db,"SUBJECT", "SUBJECT", "SUBJECTID = " + str(DLookup(db,"SUBJECTID", "POST", "POSTID = " + str(postID) + "")) + "")
if subject[0:3] != "Re:":
subject = "Re: " + subject
headers += "Subject: " + subject + '\n'
headers += "Newsgroups: " + frm.cboGroups.currentText() + '\n'
if DCount(db,"POSTID", "REFERENCE", "POSTID = " + str(postID) + "") > 0:
headers += "References: " + getReferences(postID) + messageID + '\n'
else:
headers += "References: " + messageID + '\n'
headers += "User-Agent: DFS-PyQt" + '\n'
headers += "In-Reply-To: " + messageID + '\n'
headers += "Date: " + dateformat(datetime.now(), "Usenet") + '\n'
headers += '\n' #blank line before body
# get attribution line
postDate = DLookup(db,"POSTDATE", "POSTDATE", "POSTID = " + str(postID)
+ "")
posterID = DLookup(db,"POSTERID", "POST", "POSTID = " + str(postID) + "")
poster = DLookup(db,"POSTER", "POSTER", "POSTERID = " + str(posterID)
+ "")
body = "On " + postDate + ", " + poster + " wrote:" + '\n'
# get original post
lines = frm.txtBody.toPlainText().split('\n')
for line in lines:
body += ">" + ("" if line[:1] == ">" else " ") + line + '\n'
#add headers and body to screen
frmP.txtReply.setText(headers + body)
#===============================================================
# submit reply to usenet server #===============================================================
def sendReply():
# write screen contents to file
postfile = "post_" + frm.cboGroups.currentText() + ".txt"
with open(postfile,'wb') as f:
f.write(frmP.txtReply.toPlainText().encode('utf-8'))
#connect to news server
news = nntplib.NNTP('usnews.blocknews.net',119,'<usr>','<pw>')
#post contents of file
f = open(postfile,'rb')
news.post(f)
f.close()
news.quit()
msgBox("Sent","Post was submitted","info")
--- Synchronet 3.21d-Linux NewsLink 1.2