Writing gEDA schematic/symbol files. More...
Functions | |
| def | file_format_header |
| Return the gEDA file header string. More... | |
| def | write_file |
| Write a symbol or schematic to a file in libgeda format. More... | |
| def | format_line |
| Format a line style to a string. More... | |
| def | format_fill |
| Format a fill style to a string. More... | |
| def | bus_ripper_direction |
| Return the libgeda ripper direction of a bus object. More... | |
| def | write_object |
| Write an object to a file in libgeda format. More... | |
Variables | |
| int | RELEASE_VERSION = 20121203 |
Current gEDA PACKAGE_DATE_VERSION. More... | |
| int | FILEFORMAT_VERSION = 2 |
| Current schematic/symbol file format version. More... | |
Writing gEDA schematic/symbol files.
| def xorn.geda.plainwrite.bus_ripper_direction | ( | bus_ob | ) |
Return the libgeda ripper direction of a bus object.
Search the schematic for ripper components connecting to the bus. If rippers are found and are oriented in the same direction, return -1 or 1 depending on the orientation, otherwise return 0.
Definition at line 85 of file plainwrite.py.
| def xorn.geda.plainwrite.file_format_header | ( | ) |
Return the gEDA file header string.
This function simply returns the DATE_VERSION and FILEFORMAT_VERSION formatted as a gEDA file header.
Definition at line 43 of file plainwrite.py.
| def xorn.geda.plainwrite.format_fill | ( | data | ) |
Format a fill style to a string.
Definition at line 71 of file plainwrite.py.
| def xorn.geda.plainwrite.format_line | ( | data | ) |
Format a line style to a string.
Definition at line 62 of file plainwrite.py.
| def xorn.geda.plainwrite.write_file | ( | f, | |
| rev | |||
| ) |
Write a symbol or schematic to a file in libgeda format.
| [in] | f | A file-like object to which to write |
| [in] | rev | The symbol or schematic which should be written |
None | ValueError | if an object with an unknown type is encountered |
Definition at line 55 of file plainwrite.py.
| def xorn.geda.plainwrite.write_object | ( | f, | |
| ob, | |||
| offset_x, | |||
| offset_y | |||
| ) |
Write an object to a file in libgeda format.
It follows the post-20000704 release file format that handles the line type and fill options.
| [in] | f | A file-like object to which to write. |
| [in] | ob | The object which should be written. |
| [in] | offset_x,offset_y | Coordinate offset for embedded symbols. |
None.| ValueError | if an object with an unknown type is encountered |
Definition at line 150 of file plainwrite.py.
| int xorn.geda.plainwrite.FILEFORMAT_VERSION = 2 |
Current schematic/symbol file format version.
Definition at line 36 of file plainwrite.py.
| int xorn.geda.plainwrite.RELEASE_VERSION = 20121203 |
Current gEDA PACKAGE_DATE_VERSION.
Definition at line 32 of file plainwrite.py.
1.8.8