Export Customization.pdf

(242 KB) Pobierz
734919890 UNPDF
SpaceSniffer Export Customization
26. June 2009
Space Sniffer
Copyright © 2007-2009 Uderzo Umberto – www.uderzo.it
Find lost space on your
disks the easy way.
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.
The "runtime" export module
But, this is the “Export Customization”
guide, so this means that you want to
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
734919890.007.png 734919890.008.png 734919890.009.png 734919890.010.png
SpaceSniffer Export Customization
26. June 2009
The tool bar
Let's first have a look at the tool bar icons:
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
info@uderzo.it 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
734919890.001.png 734919890.002.png
SpaceSniffer Export Customization
26. June 2009
The global information panel
The global parameters 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
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
734919890.003.png 734919890.004.png 734919890.005.png
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
734919890.006.png
Zgłoś jeśli naruszono regulamin