aboutsummaryrefslogtreecommitdiffstats
path: root/pygm2n
diff options
context:
space:
mode:
authorMatěj Cepl <mcepl@cepl.eu>2014-12-24 14:24:24 +0100
committerMatěj Cepl <mcepl@cepl.eu>2014-12-24 14:32:23 +0100
commit8af6ecfe31a7767f1d76f36581b01ddd26fb3220 (patch)
treea5cf60c5de6a34843fceb23895473cbb25c80fa2 /pygm2n
parent45552a9cb1ac5433fd2010d1736b41a3393b9b6b (diff)
downloadpygn-8af6ecfe31a7767f1d76f36581b01ddd26fb3220.tar.gz
Mighty cleanup
* Use more of the standard methods for OrderedDicts * remove pyginfo module (with SSOT being mail2news module) * remove TODO, INSTALL, and changelog.Debian * all FIXMEs and TODOs are filed as bugs in the issue tracker
Diffstat (limited to 'pygm2n')
-rwxr-xr-xpygm2n9
1 files changed, 4 insertions, 5 deletions
diff --git a/pygm2n b/pygm2n
index 51869b3..2dcd21e 100755
--- a/pygm2n
+++ b/pygm2n
@@ -15,22 +15,20 @@ Gets news article and sends it via SMTP.
"""
from __future__ import print_function
-import logging
import sys
+
import argparse
import mail2news
-import pyginfo
sys.path.append('/usr/lib/pyg')
def parse_cmdline():
- i = pyginfo.pygsinfo()
parser = argparse.ArgumentParser(
description='%s version %s - Copyright 2000 Cosimo Alfarano\n%s' %
- (i.PROGNAME, i.VERSION, i.__doc__))
+ ('pyg', mail2news.VERSION, mail2news.DESC))
parser.add_argument('-s', '--newsserver', default='')
parser.add_argument('-a', '--approver', default='',
@@ -97,7 +95,8 @@ try:
m2n.mergeheads() # make unique dict from NNTP and SMTP dicts
- m2n.addheads() # add some important heads
+ m2n.heads_dict['X-Gateway'] = 'pyg {0} {1}'.format(
+ mail2news.VERSION, mail2news.DESC)
m2n.renameheads() # rename useless heads
m2n.removeheads() # remove other heads