Export Customization
Export Customization
Export Customization
June 2009
Export customization
The SpaceSniffer export module is capable of producing textual reports. The export engine
is customizable and lets you to have many export configurations, one for each specific
need.
To do so, you need to click the small wrench icon next the configuration drop down list.
Then, the “design time” mode is engaged. If you press again the wrench icon you switch
back to run time mode.
Page 1 of 4
SpaceSniffer Export Customization 26. June 2009
Import configuration
Delete configuration
Export
Export configuration
Store configuration
In order:
• Export: starts the export. A file save dialog opens asking you where you want to
save the report.
• Store configuration: stores the current configuration in SpaceSniffer
configuration file. You are prompted for a configuration name. If the name already
exists you receive an overwrite warning. The first time you save a configuration,
also all the built-in configurations are stored, so you can modify them.
• Delete configuration: removed the selected configuration from the SpaceSniffer
configuration file, after a confirmation request. If the last configuration is removed,
then the built-in configurations reappear.
• Import configuration: you can import a single configuration from file. This lets
you share a configuration between many SpaceSniffer configuration files. If you
think that you produced a good configuration file, you can send it to
[email protected] and, after a quality evaluation, it will be shared on the web site
with your name.
• Export configuration: this command lets you export the current selected
configuration to file.
Page 2 of 4
SpaceSniffer Export Customization 26. June 2009
The only difference between the three panels is that for header and footer panels only the
information of the root container is available (consider the root as the currently zoomed
element in the active view). Let's consider the detail panel, for example.
There is a small text editor where you can type the text that will be exported to file. If you
type simple text, this will be exported as-is, without modifications. Even tabs and newlines
are considered for the export. When you type something, the preview panel reflects your
changes.
This is not so interesting. What we need is to export file and folder data. Here we
introduce the two main elements of the scripting engine:
• Tags: a tag is a keyword surrounded by <% and %>. For example, <%path%>.
When you type a tag into a script, it is expanded with the corresponding value of
the folder or file. There is a lot of tags, just explore all of them by right clicking the
mouse over the script editor.
• Commands: while tags contain textual information about the exported element,
command are used to adapt the output to your needs. Commands are always
enclosed in {…} chars. There are commands for formatting, for testing and so on.
You can find all available commands by right clicking the mouse on the script
editor.
Page 3 of 4
SpaceSniffer Export Customization 26. June 2009
You may notice that everything you type is exported. So you cannot indent your code
because the indentation will be exported. This mode is suited for very simple scripts but
when you need to indent your code you need to switch to the “script” mode, by inserting
the {script} command at the start of the script. This command will disable the
exporting of tabs and newlines. At this point, if you really need to export a tab or a
newline, you must use the {&tab} and {&br} commands. These commands work also in
simple mode, they just mix with normal tabs and newlines.
This is a really short introduction to the scripting engine. Hope this is useful to introduce
you to the export customization. Now, let's experiment!
Page 4 of 4