for row in rows:
# adjust row (add same spaces as header width)
r = []
- for (value, col_len) in zip(row.values(), cols.values()):
- value = value.replace("_", "\_") # latex, duh
- n_spaces = col_len - len(value)
- r.append(value + " " * n_spaces)
+ for key in row.keys():
+ col_len, value = cols[key], row[key]
+ if key == 'page':
+ prefix = 'https://libre-soc.org/openpower/'
+ v = value.replace("_", "\_") # latex, duh
+ url = '[%s](%s%s)' % (value, prefix, v)
+ r.append(url)
+ elif key == 'rfc' and value.startswith('ls'):
+ prefix = 'https://libre-soc.org/openpower/sv/rfc/'
+ url = '[%s](%s%s)' % (value, prefix, value)
+ r.append(url)
+ else:
+ value = value.replace("_", "\_") # latex, duh
+ n_spaces = col_len - len(value)
+ r.append(value + " " * n_spaces)
# write row
write_mdwn_row(f, r)
f.write("\n\n")