Changeset 66445
- Timestamp:
- Oct 9, 2015, 6:38:35 AM (9 years ago)
- File:
-
- 1 edited
-
grass-addons/tools/addons/update_manual.py (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
grass-addons/tools/addons/update_manual.py
r65891 r66445 8 8 import re 9 9 10 10 11 def get_addons(path): 11 12 return os.walk(path).next()[1] 13 12 14 13 15 def main(htmlfile, prefix): … … 26 28 addons = get_addons(os.sep.join(htmlfile.split(os.sep)[:4])) 27 29 for match in re.finditer(pattern, shtml): 28 if match.group(1)[:7] == 'http://': 30 # most common URLs 31 if match.group(1).startswith('http://'): 29 32 continue 33 if match.group(1).startswith('https://'): 34 continue 35 # protocol-relative URL 36 if match.group(1).startswith('//'): 37 continue 38 # TODO: perhaps we could match any *:// 39 # link to other addon 30 40 if match.group(1).replace('.html', '') in addons: 31 41 continue … … 33 43 34 44 if not pos: 35 return # no match45 return # no match 36 46 37 47 # replace file URIs … … 50 60 f.close() 51 61 62 52 63 if __name__ == "__main__": 53 64 if len(sys.argv) != 3:
Note:
See TracChangeset
for help on using the changeset viewer.
