Python: module skeinforge_application.skeinforge_plugins.craft_plugins.export

skeinforge_application.skeinforge_plugins.craft_plugins.export ($Date: 2008/21/04 $) | index /home/enrique/Desktop/backup/babbleold/script/reprap/fabmetheus/skeinforge_application/skeinforge_plugins/craft_plugins/export.py

Previous / Next / Contents

`
Export is a script to pick an export plugin and optionally print the output to a file.
The export manual page is at:
http://www.bitsfrombytes.com/wiki/index.php?title=Skeinforge_Export
Operation
Settings
Also Send Output To
Delete Comments
Export Operations
File Extension
Save Penultimate Gcode
Alterations
replace.csv
Examples
`

## Operation

The default 'Activate Export' checkbox is on. When it is on, the functions described below will work, when it is off, the functions will not be called.

## Settings

### Also Send Output To

Default is empty.
Defines the output name for sending to a file or pipe. A common choice is sys.stdout to print the output in the shell screen. Another common choice is sys.stderr. With the empty default, nothing will be done.

### Delete Comments

Default is on.
When selected, export will delete the comments. The comments are not necessary to run a fabricator.

### Export Operations

Export presents the user with a choice of the export plugins in the export_plugins folder. The chosen plugin will then modify the gcode or translate it into another format. There is also the "Do Not Change Output" choice, which will not change the output. An export plugin is a script in the export_plugins folder which has the getOutput function, the globalIsReplaceable variable and if it's output is not replaceable, the writeOutput function.

### File Extension

Default is gcode.
Defines the file extension added to the name of the output file.

### Save Penultimate Gcode

Default is off.
When selected, export will save the gcode with the suffix '_penultimate.gcode' just before it is exported. This is useful because the code after it is exported could be in a form which the viewers can not display.

## Alterations

Export looks for alteration files in the alterations folder in the .skeinforge folder in the home directory. Export does not care if the text file names are capitalized, but some file systems do not handle file name cases properly, so to be on the safe side you should give them lower case names. If it doesn't find the file it then looks in the alterations folder in the skeinforge_plugins folder. If it doesn't find anything there it looks in the skeinforge_plugins folder.

### replace.csv

When export is exporting the code, if there is a tab separated file replace.csv, it will replace the string in the first column by its replacement in the second column. There is an example file replace_example.csv to demonstrate the tab separated format, which can be edited in a text editor or a spreadsheet.

## Examples

The following examples export the file Screw Holder Bottom.stl. The examples are run in a terminal in the folder which contains Screw Holder Bottom.stl and export.py.
> python export.py
This brings up the export dialog.
> python export.py Screw Holder Bottom.stl
The export tool is parsing the file:
Screw Holder Bottom.stl
..
The export tool has created the file:
.. Screw Holder Bottom_export.gcode
> python
Python 2.5.1 (r251:54863, Sep 22 2007, 01:43:31)
[GCC 4.2.1 (SUSE Linux)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import export
>>> export.main()
This brings up the export dialog.
>>> export.writeOutput('Screw Holder Bottom.stl')
The export tool is parsing the file:
Screw Holder Bottom.stl
..
The export tool has created the file:
.. Screw Holder Bottom_export.gcode

Previous / Next / Contents

Modules
`` |  |
__init__ fabmetheus_utilities.archive cStringIO fabmetheus_utilities.euclidean | fabmetheus_utilities.fabmetheus_tools.fabmetheus_interpret fabmetheus_utilities.gcodec fabmetheus_utilities.intercircle os | fabmetheus_utilities.settings skeinforge_application.skeinforge_utilities.skeinforge_analyze skeinforge_application.skeinforge_utilities.skeinforge_craft skeinforge_application.skeinforge_utilities.skeinforge_polyfile | skeinforge_application.skeinforge_utilities.skeinforge_profile sys time

Classes
`` |  | ExportRepository ExportSkein
class ExportRepository
`` | `A class to handle the export settings.`
| Methods defined here: __init__(self) `Set the default settings, execute title & settings fileName.` execute(self) `Export button has been clicked.`
class ExportSkein
`` | `A class to export a skein of extrusions.`
| Methods defined here: __init__(self) addLine(self, line) `Add a line of text and a newline to the output.` getCraftedGcode(self, exportRepository, gcodeText) `Parse gcode text and store the export gcode.` getLineWithTruncatedNumber(self, character, line, splitLine) `Get a line with the number after the character truncated.` parseLine(self, exportRepository, line) `Parse a gcode line.`

Functions
`` |  | getCraftedTextFromText(gcodeText, exportRepository=None) `Export a gcode linear move text.` getDistanceGcode(exportText) `Get gcode lines with distance variable added.` getNewRepository() `Get the repository constructor.` getReplaced(exportText) `Get text with strings replaced according to replace.csv file.` getSelectedPluginModule(plugins) `Get the selected plugin module.` main() `Display the export dialog.` writeOutput(fileName='') `Export a gcode linear move file.`

Data
`` |  | __author__ = 'Enrique Perez (perez_enrique@yahoo.com)' __date__ = '$Date: 2008/21/04 $' __license__ = 'GPL 3.0' absolute_import = _Feature((2, 5, 0, 'alpha', 1), (2, 7, 0, 'alpha', 0), 16384)

Author
`` |  | Enrique Perez (perez_enrique@yahoo.com)