Is anyone working on documentation for LibrePCB’s file formats? If not then I have some time and can work on it. If you have anything then send it to me and I will include it.
John Eaton
Is anyone working on documentation for LibrePCB’s file formats? If not then I have some time and can work on it. If you have anything then send it to me and I will include it.
John Eaton
Hi,
The directory structure of workspaces, libraries and projects is documented at https://developers.librepcb.org/. But the content of *.lp files is not documented and probably nobody is working on this
How would you document it? Would be nice to have it hosted on https://developers.librepcb.org/ too.
Hi Urban,
The main thing that I am looking for is when I see a file like symbol.lp I want a document that describes each field including the allowed character sets and formats. I can guess my tools will break if I get it wrong.
John Eaton
Yeah, it would be nice to have a “schema” for the file format. Something like https://json-schema.org/ but for S-Expressions.
But I guess there’s no such thing, so “regular” documentation will probably have to suffice.
@ouabache maybe https://github.com/LibrePCB/librepcb-parts-generator/tree/master/entities can be useful to you, even though it’s not complete yet. Package entities are being worked on here: https://github.com/LibrePCB/librepcb-parts-generator/pull/55
My main concern is that we will eventually have to support hierarchy and {{NAME}} will go from a simple string to a hierarchical path with a path separator character like “/”. It would be real nice if we told everyone that they couldn’t use that character when picking a value for {{NAME}}.
I created a proposal for how I would document file format and have made a pull request for LibrePCB.
Let me know what you think.
John Eaton