[Python-checkins] CVS: python/nondist/peps pep2html.py,1.18,1.19
Barry Warsaw
bwarsaw@users.sourceforge.net
Tue, 20 Mar 2001 07:07:23 -0800
Update of /cvsroot/python/python/nondist/peps
In directory usw-pr-cvs1:/tmp/cvs-serv3405
Modified Files:
pep2html.py
Log Message:
push_html() -> push_pep()
push_pep(), main(): Arrange for the .txt source file to also be scp
uploaded to SF when the -i/--install flag is given.
Index: pep2html.py
===================================================================
RCS file: /cvsroot/python/python/nondist/peps/pep2html.py,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -r1.18 -r1.19
*** pep2html.py 2001/03/20 15:00:13 1.18
--- pep2html.py 2001/03/20 15:07:21 1.19
***************
*** 15,22 ****
-i/--install
! After generating the HTML, install it SourceForge. In that case the
! user's name is used in the scp and ssh commands, unless sf_username is
! given (in which case, it is used instead). Without -i, sf_username is
! ignored.
-q/--quiet
--- 15,22 ----
-i/--install
! After generating the HTML, install it and the plain text source file
! (.txt) SourceForge. In that case the user's name is used in the scp
! and ssh commands, unless sf_username is given (in which case, it is
! used instead). Without -i, sf_username is ignored.
-q/--quiet
***************
*** 171,175 ****
return newfile
! def push_html(files, username, verbose):
if verbose:
quiet = ""
--- 171,176 ----
return newfile
! SPACE = ' '
! def push_pep(htmlfiles, txtfiles, username, verbose):
if verbose:
quiet = ""
***************
*** 179,184 ****
username = username + "@"
target = username + HOST + ":" + HDIR
files.append("style.css")
! filelist = " ".join(files)
rc = os.system("scp %s %s %s" % (quiet, filelist, target))
if rc:
--- 180,187 ----
username = username + "@"
target = username + HOST + ":" + HDIR
+ files = htmlfiles[:]
+ files.extend(txtfiles)
files.append("style.css")
! filelist = SPACE.join(files)
rc = os.system("scp %s %s %s" % (quiet, filelist, target))
if rc:
***************
*** 212,227 ****
if args:
html = []
for pep in args:
file = find_pep(pep)
newfile = make_html(file, verbose=verbose)
html.append(newfile)
else:
# do them all
for file in glob.glob("pep-*.txt"):
make_html(file, verbose=verbose)
html = ["pep-*.html"]
if update:
! push_html(html, username, verbose)
--- 215,234 ----
if args:
+ peptxt = []
html = []
for pep in args:
file = find_pep(pep)
+ peptxt.append(file)
newfile = make_html(file, verbose=verbose)
html.append(newfile)
else:
# do them all
+ peptxt = []
for file in glob.glob("pep-*.txt"):
+ peptxt.append(file)
make_html(file, verbose=verbose)
html = ["pep-*.html"]
if update:
! push_pep(html, peptxt, username, verbose)