LibEagle is a library for Cadsoft Eagle PCB Design Software. Eagle uses xml based files. This library implements Eagle xml files and converts it to Objects and reverse.
- Eagle PCB Design Software > 6.0 (only)
$ gem install libeagle
The usage is really simple first you include gem in your file:
Parsing eagle files (schematic, board or library) or block of eagle elements (packages, devices, symbols and etc.) you have two options parse from file or string:
eagle = LibEagle::Parser.parseFile(file_name) => #<LibEagle::Eagle:0x007fd5ca956738>
eagle = LibEagle::Parser.parseXML("…") => #<LibEagle::Eagle:0x007fd5ca956738>
To Create eagle files with hands or dynamically. Just use as simple objects:
eagle = LibEagle::Eagle.new # Create a drawing object eagle.object_drawing = LibEagle::Drawing.new
eagle.attribute_version = "6.0"
eagle.object_drawing = LibEagle::Drawing.new
After creating, parsing, editing if you want to save file use
.saveXML will generate xml code of that object:
eagle = LibEagle::Eagle.new eagle.attribute_version = "6.0" eagle.saveXML => "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!DOCTYPE eagle SYSTEM \"eagle.dtd\">\n<eagle version=\"6.0\">\n</eagle>\n"
- Create API DOcs
- Optimize source code
- Martin DeMello (for pointing out how to optimize code)
- Fork it
- Create your feature branch (
git checkout -b my-new-feature)
- Commit your changes (
git commit -am 'Added some feature')
- Push to the branch (
git push origin my-new-feature)
- Create new Pull Request
Copyright (c) 2012 Aurimas Niekis Dual licensed under the MIT license and GPL license.