A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-checkins/2002-November/030708.html below:

[Python-checkins] python/nondist/peps pep2html.py,1.47,1.48

[Python-checkins] python/nondist/peps pep2html.py,1.47,1.48goodger@users.sourceforge.net goodger@users.sourceforge.net
Mon, 11 Nov 2002 16:56:29 -0800
Update of /cvsroot/python/python/nondist/peps
In directory usw-pr-cvs1:/tmp/cvs-serv11640

Modified Files:
	pep2html.py 
Log Message:
Added --local/-l option to make my life easier on creosote.  Removed bogus <body> attributes.

Index: pep2html.py
===================================================================
RCS file: /cvsroot/python/python/nondist/peps/pep2html.py,v
retrieving revision 1.47
retrieving revision 1.48
diff -C2 -d -r1.47 -r1.48
*** pep2html.py	8 Nov 2002 03:43:48 -0000	1.47
--- pep2html.py	12 Nov 2002 00:56:27 -0000	1.48
***************
*** 22,25 ****
--- 22,29 ----
          used instead).  Without -i, -u is ignored.
  
+     -l/--local
+         Same as -i/--install, except run on the local machine.  Use this when
+         logged in to the python.org machine (creosote).
+ 
      -q/--quiet
          Turn off verbose messages.
***************
*** 106,110 ****
          link = RFCURL % rfcnum
      if link:
!         return '<a href="%s">%s</a>' % (link, cgi.escape(text))
      return cgi.escape(match.group(0)) # really slow, but it works...
  
--- 110,114 ----
          link = RFCURL % rfcnum
      if link:
!         return '<a href="%s">%s</a>' % (cgi.escape(link), cgi.escape(text))
      return cgi.escape(match.group(0)) # really slow, but it works...
  
***************
*** 171,177 ****
      r = random.choice(range(64))
      print >> outfile, (
!         '  <link rel="STYLESHEET" href="style.css" type="text/css">\n'
          '</head>\n'
!         '<body bgcolor="white" marginwidth="0" marginheight="0">\n'
          '<table class="navigation" cellpadding="0" cellspacing="0"\n'
          '       width="100%%" border="0">\n'
--- 175,181 ----
      r = random.choice(range(64))
      print >> outfile, (
!         '  <link rel="STYLESHEET" href="style.css" type="text/css" />\n'
          '</head>\n'
!         '<body bgcolor="white">\n'
          '<table class="navigation" cellpadding="0" cellspacing="0"\n'
          '       width="100%%" border="0">\n'
***************
*** 368,379 ****
      return outpath
  
! def push_pep(htmlfiles, txtfiles, username, verbose):
!     if verbose:
!         quiet = ""
      else:
!         quiet = "-q"
!     if username:
!         username = username + "@"
!     target = username + HOST + ":" + HDIR
      files = htmlfiles[:]
      files.extend(txtfiles)
--- 372,391 ----
      return outpath
  
! def push_pep(htmlfiles, txtfiles, username, verbose, local=0):
!     quiet = ""
!     if local:
!         if verbose:
!             quiet = "-v"
!         target = HDIR
!         copy_cmd = "cp"
!         chmod_cmd = "chmod"
      else:
!         if not verbose:
!             quiet = "-q"
!         if username:
!             username = username + "@"
!         target = username + HOST + ":" + HDIR
!         copy_cmd = "scp"
!         chmod_cmd = "ssh %s%s chmod" % (username, HOST)
      files = htmlfiles[:]
      files.extend(txtfiles)
***************
*** 381,388 ****
      files.append("pep.css")
      filelist = SPACE.join(files)
!     rc = os.system("scp %s %s %s" % (quiet, filelist, target))
      if rc:
          sys.exit(rc)
!     rc = os.system("ssh %s%s chmod 664 %s/*" % (username, HOST, HDIR))
      if rc:
          sys.exit(rc)
--- 393,400 ----
      files.append("pep.css")
      filelist = SPACE.join(files)
!     rc = os.system("%s %s %s %s" % (copy_cmd, quiet, filelist, target))
      if rc:
          sys.exit(rc)
!     rc = os.system("%s 664 %s/*" % (chmod_cmd, HDIR))
      if rc:
          sys.exit(rc)
***************
*** 446,449 ****
--- 458,462 ----
      # defaults
      update = 0
+     local = 0
      username = ''
      verbose = 1
***************
*** 457,462 ****
      try:
          opts, args = getopt.getopt(
!             argv, 'bihqu:',
!             ['browse', 'install', 'help', 'quiet', 'user='])
      except getopt.error, msg:
          usage(1, msg)
--- 470,475 ----
      try:
          opts, args = getopt.getopt(
!             argv, 'bilhqu:',
!             ['browse', 'install', 'local', 'help', 'quiet', 'user='])
      except getopt.error, msg:
          usage(1, msg)
***************
*** 467,470 ****
--- 480,486 ----
          elif opt in ('-i', '--install'):
              update = 1
+         elif opt in ('-l', '--local'):
+             update = 1
+             local = 1
          elif opt in ('-u', '--user'):
              username = arg
***************
*** 500,504 ****
  
      if update:
!         push_pep(html, peptxt, username, verbose)
          if browse:
              if args:
--- 516,520 ----
  
      if update:
!         push_pep(html, peptxt, username, verbose, local=local)
          if browse:
              if args:





RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4