Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Gerber files #3744

Merged
merged 4 commits into from Aug 2, 2017
Merged

Add support for Gerber files #3744

merged 4 commits into from Aug 2, 2017

Conversation

Alhadis
Copy link
Collaborator

@Alhadis Alhadis commented Jul 28, 2017

This is it. This is the moment that nobody's been waiting for. The anxiously awaited addition of GERBER support for GitHub!

What's Gerber, you ask? Well, if you haven't figured out from the name that it's the de facto standard for PCB imaging formats, then I don't know what else to tell you. In all seriousness, the format has been standardised since at least 1998, and with more file extension schizophrenia than Markdown AND Roff together.

I wouldn't have expected such a format to have a widespread presence on GitHub, and... well, I was wrong:

You see now why I already hate this format.

Despite the ridiculous number of extensions, there's thankfully very little conflict with existing file formats. Most of the clashes are with binary files, which Linguist would skip anyway. You can see the sorted result of each filetype search in the aforementioned sample links.

Origin of samples

I was lucky to find samples released under a license, let alone a permissive one. Most repos I encountered were unlicensed altogether, so I'm glad I found these:

@Alhadis
Copy link
Collaborator Author

Alhadis commented Jul 28, 2017

/cc @pchaigno This marks the third and final chapter in my trilogy of distraction, having started with looking up misclassified PostScript repositories, then noticing our definition of KiCad was off, and then discovering a plain-text format that was not only unhighlighted, but also entirely unacknowledged by Linguist.

Going to sleep now, I think Nah, fuck that.

Copy link
Contributor

@pchaigno pchaigno left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Going to sleep now, I think Nah, fuck that.

Don't you live in Australia? Aren't people waking up right now?

Gerber Image:
type: data
aliases:
- rs-274x
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seriously? Who are the crazy people who made this?

Copy link
Collaborator Author

@Alhadis Alhadis Jul 28, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah? Try reading the actual format spec. It doubles as both a drug-trip and a lesson in how not to typeset a document. Page 40 pretty much king-punched the designer in me.

I think page 46 sums up the format's insanity best, though...

@carlosgonzalez Pilla esto. Número de pagina 46 == "jajajaja"; Also, I lost your e-mail address, else I would've e-mailed you this confusing crap at some fucked-up hour of the morning like I usually do.

- ".gts"
interpreters:
- ".gerbv"
- ".gerbview"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are the dots here on purpose or is that a mistake?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whoops. Hang on, will fix this and that thing below me.

@@ -0,0 +1,1775 @@
G04 #@! TF.FileFunction,Copper,L2,Bot,Signal*
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we reduce the size of these files? It looks like it's mostly the same pattern over and over, but samples.json is still gonna have one entry per token...

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done! =) And yep, it's almost 7am. Who cares, sleep is for people with jobs. :p

@Alhadis Alhadis mentioned this pull request Jul 29, 2017
6 tasks
@Alhadis Alhadis merged commit f75c570 into master Aug 2, 2017
@Alhadis Alhadis deleted the gerber branch August 2, 2017 12:00
@lildude lildude mentioned this pull request Aug 9, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants