Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Small cleanups to the REP scripts. #396

Merged
merged 1 commit into from
Feb 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ xsdvalid:
$(PYTHON) xsdValid.py

clean:
-rm *.html
-rm rep-0000.rst
-rm -f *.html
-rm -f rep-0000.rst

upload: all
rsync -r README.txt *.html mermaid.js css rep-0000.rst $(SUBDIRS) [email protected]:/var/www/www.ros.org/reps
1 change: 0 additions & 1 deletion genrepindex.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/usr/bin/env python2.5
"""Auto-generate REP 0 (REP index).

Generating the REP index is a multi-step process. To begin, you must first
Expand Down
10 changes: 5 additions & 5 deletions rep2html.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@
' "http://www.w3.org/TR/REC-html40/loose.dtd">')

fixpat = re.compile(
"((https?|ftp):[-_a-zA-Z0-9/.+~:?#$=&,]+)|(rep-\d+(.rst)?)|"
"(RFC[- ]?(?P<rfcnum>\d+))|"
"(REP\s+(?P<repnum>\d+))|"
r"((https?|ftp):[-_a-zA-Z0-9/.+~:?#$=&,]+)|(rep-\d+(.rst)?)|"
r"(RFC[- ]?(?P<rfcnum>\d+))|"
r"(REP\s+(?P<repnum>\d+))|"
".")

EMPTYSTRING = ''
Expand Down Expand Up @@ -220,7 +220,7 @@ def fixfile(inpath, input_lines, outfile):
for k, v in header:
if k.lower() in ('author', 'discussions-to'):
mailtos = []
for part in re.split(',\s*', v):
for part in re.split(r',\s*', v):
if '@' in part:
realname, addr = parseaddr(part)
if k.lower() == 'discussions-to':
Expand All @@ -236,7 +236,7 @@ def fixfile(inpath, input_lines, outfile):
v = COMMASPACE.join(mailtos)
elif k.lower() in ('replaces', 'replaced-by', 'requires'):
otherreps = ''
for otherrep in re.split(',?\s+', v):
for otherrep in re.split(r',?\s+', v):
otherrep = int(otherrep)
otherreps += '<a href="rep-%04d.html">%i</a> ' % (otherrep,
otherrep)
Expand Down
2 changes: 0 additions & 2 deletions xsdValid.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/python

import xmlschema

format1 = xmlschema.XMLSchema('xsd/package_format1.xsd')
Expand Down
Loading