Exporting Data

Bless features an advanced and customizable export system. It can currently export data to text or html files.

Export Patterns

The exporting is based on an export pattern. The pattern consists of string literals and special command strings. The literals are printed in the output file as they are whereas the command strings tell the exporter to do something. Commands strings are enclosed in '%'s and specify the command and its parameters. The command is specified by an uppercase letter and the parameters by lowercase letters. Each letter (whether it corresponds to a command or a parameter) may be followed by an argument enclosed in double quotes '"'.

CommandDescriptionParameters [default]
Export (E)Writes actual data.

E: the number of bytes to export ["1"]

p: the prefix to write before each byte [""]

s: the suffix to write after each byte [""]

x: the separator to use between bytes [""]

e: the string to use for not printed bytes (due to alignment) [" "]

t: the type to export the byte(s) to (see below) ["H"]

Ignore (I)Ignores data.

I: the number of bytes to ignore ["1"]

Offset (O)Writes the current offset.

O: the number of digits to use for writing the offset ["8"]

t: the type to write the offset in (see below) ["H"]

Export TypeDescription
HHexadecimal with uppercase characters
hHexadecimal with lowercase characters
DDecimal
OOctal
BBinary
AAscii

Command strings can be grouped together with square brackets '[',']'. After such a group of commands is executed the pointer which keeps track of the next byte to export is reset to the position it had just before the group was executed.

Some sample patterns and their output will make things much clearer:

%O"4"%: %E"4"p"0x"x" "% - %E"4"p"0x"x" "%\n

0000: 0x00 0x01 0x02 0x03 - 0x04 0x05 0x06 0x07
0008: 0x08 0x09 0x0a 0x0b - 0x0c 0x0d 0x0e 0x0f
0010: 0x10 0x11 0x12 0x13 - 0x14 0x15 0x16 0x17
0018: 0x18 0x19 0x10 0x1a - 0x1b 0x1c 0x1d 0x1e
0020: 0x1f                -                    

[%E"2"% %I"2"% %E"2"% %I"2"%] %I"2"% %E"2"% %I"2"% %E"2"%\n

0001  0405   0203  0607
0809  0c0d   0a0b  0e0f
1011  1415   1213  1617
1819  1b1c   101a  1d1e
1f

Export Dialog

Figure 4.9. Export Dialog

Export Dialog

Export Dialog

Export to file

The name of the file to export the data to.

Export type

The type of file to export to. New types can be added with plugins.

Export pattern

The pattern to use when exporting the file (see the section called “Export Patterns”). Use the save and delete buttons next to the pattern entry to manage the saved patterns.

Range

The range of data to export.