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

*.sch is both Eagle and KiCad schematics file #2187

Closed
Miceuz opened this issue Mar 2, 2015 · 11 comments
Closed

*.sch is both Eagle and KiCad schematics file #2187

Miceuz opened this issue Mar 2, 2015 · 11 comments

Comments

@Miceuz
Copy link

Miceuz commented Mar 2, 2015

Now *.sch files are classified as Eagle files.

@Miceuz
Copy link
Author

Miceuz commented Mar 2, 2015

@Miceuz
Copy link
Author

Miceuz commented Mar 2, 2015

Kicad sch file is not XML, it starts like this:

EESchema Schematic File Version 2

@pchaigno
Copy link
Contributor

pchaigno commented Mar 2, 2015

@Miceuz I see that both your files have a lot of lines starting with LIBS. Is that common in the KiCad format or is it just in your files? (I'm trying to see if we could use your files to train the classifier to recognize .sch files as KiCad.)

@Miceuz
Copy link
Author

Miceuz commented Mar 2, 2015

@pchaigno In fact it depends on how much libs are used int particular project, might be a single library containing a resistor. But the file has a unique header - EESchema Schematic File Version 2 on another hand $Comp and $EndComp is a unique feature.

@pchaigno
Copy link
Contributor

pchaigno commented Mar 2, 2015

Okay, thanks for the clarification! I'll see what I can do.
The header could surely be used for a heuristic rule but we try to only use those if the Bayesian classifier can't do the job.

@mithat
Copy link

mithat commented Apr 4, 2015

@pchaigno I've got a few KiCad designs that you can use for training the classifier if it's helpful:

@pchaigno
Copy link
Contributor

pchaigno commented Apr 5, 2015

@Miceuz @mithat Do you know a Textmate bundle or Sublime Text package that could be used to highlight KiCad code?

@mithat
Copy link

mithat commented Apr 5, 2015

@pchaigno I don't know of such a bundle. But I found file format documentation for KiCad at http://bazaar.launchpad.net/~kicad-developers/kicad/doc/files/head:/doc/help/file_formats/docs_src/ if that's helpful.

Also, I remembered that the *.sch extension is used by another FLOSS EDA suite, the gEDA project. Its file format documentation is at http://wiki.geda-project.org/geda:file_format_spec.

@pchaigno
Copy link
Contributor

pchaigno commented Apr 5, 2015

#2309 should fix this ;)

@arfon
Copy link
Contributor

arfon commented Apr 6, 2015

This will be fixed in the next release of Linguist.

@arfon arfon closed this as completed Apr 6, 2015
@Alhadis
Copy link
Collaborator

Alhadis commented Jul 28, 2017

@Miceuz @mithat Do you know a Textmate bundle or Sublime Text package that could be used to highlight KiCad code?

I wrote one for all three languages:

What the actual hell am I doing with my life.

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

No branches or pull requests

5 participants