Compare commits

..

No commits in common. "8b65a52035a2c51c14b45308bbf1bc492dee09a6" and "c08017bd5914830cc0c682d1ced50790e1dcdb6c" have entirely different histories.

11 changed files with 13 additions and 11 deletions

View File

@ -1,13 +1,7 @@
# bom2table
Generate a nicely formatted table from an EAGLE BOM
## Usage
Run `npm install` and `npm build`
Upload a BOM exported in csv format from EAGLE (untick 'List attributes') to get a table and the corresponding HTML.
## Credits
Favicon by [Round Icons](https://unsplash.com/illustrations/a-computer-chip-with-a-red-yellow-and-green-color-scheme-otzESK2sBG4?utm_content=creditCopyText&utm_medium=referral&utm_source=unsplash) via Unsplash

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 675 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

View File

@ -4,10 +4,6 @@
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="style.css" />
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png" />
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png" />
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png" />
<link rel="manifest" href="/site.webmanifest" />
<title>Read CSV File</title>
</head>
<body>

View File

@ -1 +0,0 @@
{"name":"","short_name":"","icons":[{"src":"/android-chrome-192x192.png","sizes":"192x192","type":"image/png"},{"src":"/android-chrome-512x512.png","sizes":"512x512","type":"image/png"}],"theme_color":"#ffffff","background_color":"#ffffff","display":"standalone"}

View File

@ -58,6 +58,13 @@ async function createTable() {
input.addEventListener('change', handleUpload);
/* TODO
// Format the HTML nicely and output to a pre code block
function displayMarkup() {
const tableCode = document.querySelector('table')!.outerHTML;
const markup = document.getElementById('markup') as HTMLElement;
markup.innerText = beautify(tableCode);
}
// Create a JSON object for Contentful
function makeJSON(csvString: string) {
csv({

View File

@ -8,6 +8,12 @@ export async function printHTMLtable(
codeBlock.innerText = prettify(table.outerHTML);
}
// no longer needed
// export function isJunk(element: Part): boolean {
// // Returns true if element is in the rejected list
// return rejectedParts.includes(element.Part);
// }
// TODO
/*