[BoM][Fixed] LCSC links

- Missing .html
This commit is contained in:
Salvador E. Tropea 2023-09-12 13:44:00 -03:00
parent e88df7f595
commit 9ce2321890
2 changed files with 2 additions and 2 deletions

View File

@ -250,7 +250,7 @@ def content_table(html, groups, headings, head_names, cfg, link_datasheet, link_
if link_mouser and headings[n] in link_mouser:
r = '<a href="https://www.mouser.com/ProductDetail/' + r + '">' + r + '</a>'
if link_lcsc and headings[n] in link_lcsc:
r = '<a href="https://www.lcsc.com/product-detail/' + r + '">' + r + '</a>'
r = '<a href="https://www.lcsc.com/product-detail/' + r + '.html">' + r + '</a>'
# Link this column to the datasheet?
if link_datasheet == n and datasheet.startswith('http'):
r = '<a href="' + datasheet + '">' + r + '</a>'

View File

@ -816,7 +816,7 @@ def write_xlsx(filename, groups, col_fields, head_names, cfg):
worksheet.write_url(row_count, i, url, fmt, cell)
# A link to LCSC?
elif link_lcsc and col_fields[i] in link_lcsc:
url = 'https://www.lcsc.com/product-detail/' + cell
url = 'https://www.lcsc.com/product-detail/' + cell + '.html'
worksheet.write_url(row_count, i, url, fmt, cell)
else:
worksheet.write_string(row_count, i, cell, fmt)