Export Customization

Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

SpaceSniffer Export Customization 26.

June 2009

SpaceSniffer Find lost space on your


disks the easy way.
Copyright © 2007-2009 Uderzo Umberto – www.uderzo.it

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.

When the export module is first shown in a


SpaceSniffer work session, it is in “run time”
mode. This means that it's hiding all its
complexity and tries to appear as simple as
possible to the user.

This is the default use behavior and all users


except who wants to customize the export
configuration should use this mode.

But, this is the “Export Customization”


guide, so this means that you want to
The "runtime" export module customize the export configuration. Click this

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.

The design time mode shows more icons on the


upper tool bar and a new design section in the
middle of the window. This section is splitted in
many parts, each one reachable by its own tab.

This is where you customize your configuration.


The first tab contains global informations about
the export configuration. The following tabs
contain the export configuration itself. There is
a tab for the header, a tab for the detail and a
tab for the footer.

The "designtime" export module

Page 1 of 4
SpaceSniffer Export Customization 26. June 2009

The tool bar


Let's first have a look at the tool bar icons:

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 global information panel


This panel contains global information
about the current configuration. You can
specify the preferred file name and
extension (there is a syntax to correctly
define the file extension, please have a look
The global parameters panel directly at the example in the panel).

You can also specify the primary and secondary sorting:


• Block sorting: is the primary sorting, where you specify if, for each folder, you
want listed first all sub folders, first all contained files or if you don't care.
• Fine sorting: is the secondary sorting, where you specify how to sort folders and
files. If you don't care, you can specify here. The descending check box is used to
invert the sorting.

The header, detail, footer panels


All these three panels work the
same. The header is used to define
a report header, the footer to
define a report footer and the detail
is used for each folder or file to be
exported.
The script editor

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.

Note: Consider that commands can be nested to reach your target.

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!

Copyright © 2007-2009 Uderzo Umberto, please read the Disclaimer

Page 4 of 4

You might also like