Closed Miceuz closed 9 years ago
Repo in question - https://github.com/Miceuz/ultimate-temperature-controller
Kicad sch file is not XML, it starts like this:
EESchema Schematic File Version 2
@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.)
@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.
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.
@pchaigno I've got a few KiCad designs that you can use for training the classifier if it's helpful:
@Miceuz @mithat Do you know a Textmate bundle or Sublime Text package that could be used to highlight KiCad code?
@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.
This will be fixed in the next release of Linguist.
@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.
Now *.sch files are classified as Eagle files.