Skip to content

Commit

Permalink
[BoM][Fixed] LCSC links
Browse files Browse the repository at this point in the history
- Missing .html
  • Loading branch information
set-soft committed Sep 12, 2023
1 parent e88df7f commit 9ce2321
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion kibot/bom/html_writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -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>'
Expand Down
2 changes: 1 addition & 1 deletion kibot/bom/xlsx_writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 9ce2321

Please sign in to comment.