dabbott     14/08/03 21:14:38

  Modified:             gwn_adds_removes.py
  Log:
  removed the -p option and the cmp dates, we don't need for monthly

Revision  Changes    Path
1.14                 src/gwn/gwn_adds_removes.py

file : 
http://sources.gentoo.org/viewvc.cgi/gentoo/src/gwn/gwn_adds_removes.py?rev=1.14&view=markup
plain: 
http://sources.gentoo.org/viewvc.cgi/gentoo/src/gwn/gwn_adds_removes.py?rev=1.14&content-type=text/plain
diff : 
http://sources.gentoo.org/viewvc.cgi/gentoo/src/gwn/gwn_adds_removes.py?r1=1.13&r2=1.14

Index: gwn_adds_removes.py
===================================================================
RCS file: /var/cvsroot/gentoo/src/gwn/gwn_adds_removes.py,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- gwn_adds_removes.py 5 Apr 2014 17:45:36 -0000       1.13
+++ gwn_adds_removes.py 3 Aug 2014 21:14:38 -0000       1.14
@@ -80,15 +80,11 @@
                                        ldata = (ATTIC_LINK % pkg[0], 
'/'.join(pkg[0]))
                                #who = (devs[pkg[1]].encode(OUTPUT_CHARSET), 
pkg[1])
                                who = devs[pkg[1]]
-                               # clean date format so we can compare it with
-                               # date_to/date_from
-                               when_cmp = pkg[2].strftime('%Y%m')
                                # date format suitable for GMN posts
                                when = pkg[2].strftime('%d %b %Y')
                                # You should copy this to the raw html code in 
the
                                # blog post
-                               if when_cmp >=date_from and when_cmp < date_to:
-                                       print '<a href="%s">%s</a>, %s, %s' % 
(ldata[0], ldata[1], who, when)
+                               print '<a href="%s">%s</a>, %s, %s' % 
(ldata[0], ldata[1], who, when)
                print "[/table]"
 
 if __name__ == '__main__':
@@ -96,25 +92,9 @@
                remove_profile_line(sys.argv[i+1])
        data = []
        if len(sys.argv) < 2:
-               print 'Usage: gwn_adds_removes.py -p <log-files>'
+               print 'Usage: gwn_adds_removes.py <log-files>'
        else:
-               if sys.argv[1] == "-p":
-                       # Results for previous month!
-                       starttime = time.gmtime(time.time() - (60 * 60 * 24 * 
31))
-                       endtime = time.gmtime(time.time() + (60 * 60 * 24 * 1))
-                       # Format the string to what we expect
-                       date_to = time.strftime("%Y%m", endtime)
-                       date_from = time.strftime("%Y%m", starttime)
-                       argrange = 1
-               else:
-                       starttime = time.gmtime(time.time() - (60 * 60 * 24 * 
1))
-                       endtime = time.gmtime(time.time() + (60 * 60 * 24 * 31))
-                       # Format the string to what we expect
-                       date_to = time.strftime("%Y%m", endtime)
-                       date_from = time.strftime("%Y%m", starttime)
-                       argrange = 0
-
-               devs = developers()
-               for i in range(argrange, len(sys.argv)-1):
+               devs = developers()
+               for i in range(0, len(sys.argv)-1):
                        data.append(parse(sys.argv[i+1]))
                write(data, devs)




Reply via email to