Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
gerber-to-svg
Advanced tools
Gerber file to SVG converter for Node and the browser.
$ npm install -g gerber-to-svg
$ gerber2svg /path/to/gerber
(writes to stdout)$ gerber2svg /path/to/gerber > file.svg
will write to a fileFor Node and Browserify:
$ npm install --save(-dev) gerber-to-svg
var gerberToSvg = require(gerber-to-svg);
to your JavaScriptIf you'd rather not manage your packages:
<script src="path/to/gerber-to-svg.js"></script>
to your HTML before your applicationUse in your app with:
var svgString = gerberToSvg(gerberString);
Where gerberString
is the gerber file (e.g. from fs.readFile encoded with UTF-8 or FileReader.readAsText).
Not a whole lot, for now. This converter uses RS-274X and strives to be true to the latest format specification. Most all of the Gerber file features are there.
The returned SVG is going to be black, but you can specify color
either in the XML or with CSS to change it.
Step and repeat is very much a work in progress. If your Gerber file is only one polarity (i.e %LPC*% doesn't appear anywhere in your file), you should be fine. But otherwise, don't trust whatever it returns (if it doesn't throw).
Arcs should work, but they've tended to give me trouble. If you see something circular and weird, that could be why.
If it messes up, open up an issue and attach your Gerber, if you can. I appreciate files to test on.
$ git clone https://github.com/mcous/gerber-to-svg.git
$ npm install && gulp
Library files for Node and Browserify live in lib/, standalone library files live in dist/, and the command line utility lives in bin/.
This module uses mocha and shouldjs for unit testing. To run the tests once, run $ gulp test
. To run the tests in watch mode, run $ gulp testwatch
.
There's also a visual test suite. Run $ gulp testvisual
and point your browser to http://localhost.com:4242 to take a look.
FAQs
Render individual Gerber / NC drill files as SVGs
The npm package gerber-to-svg receives a total of 709 weekly downloads. As such, gerber-to-svg popularity was classified as not popular.
We found that gerber-to-svg demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.