Brian Cassidy

NAME

Image::TextMode::SAUCE - Create, manipulate and save SAUCE metadata

DESCRIPTION

This module reads and writes SAUCE metadata. SAUCE metadata is a 128-byte record stored after an EOF char at the end of a given file.

ACCESSORS

  • sauce_id - identified at the start of the record (default: SAUCE)

  • version - sauce version (default: 00)

  • title - title of the work

  • author - author name

  • group - group affiliation

  • date - YYYYMMDD date (default: today's date)

  • filesize - the size of the file, less sauce info

  • datatype_id - numeric identifier for the data type

  • filetype_id - numeric identifier for the file sub-type

  • tinfo1 - first slot of filetype-specific info

  • tinfo2 - second slot of filetype-specific info

  • tinfo3 - third slot of filetype-specific info

  • tinfo4 - fourth slot of filetype-specific info

  • comment_count - number of comments stored before the sauce record

  • flags_id - datatype specific flags

  • filler - 22 spaces to fill in the remaining bytes

  • comment_id - identifier for comments section (default: COMNT)

  • comments - array ref of comment lines

  • has_sauce - undef before read; after read: true if file has sauce record

METHODS

new( %args )

Creates a new SAUCE metadata instance.

read( $fh )

Read the sauce record from $fh.

write( $fh )

Write the sauce record to $fh.

record_size( )

Return the size of the SAUCE record in bytes.

datatype( )

The string name of the data represented in datatype_id.

filetype( )

The string name of the data represented in filetype_id.

flags( )

The string name of the data represented in flags_id.

tinfo1_name( )

The string name of the data represented in tinfo1.

tinfo2_name( )

The string name of the data represented in tinfo2.

tinfo3_name( )

The string name of the data represented in tinfo3.

tinfo4_name( )

The string name of the data represented in tinfo4.

tinfos( )

An alias for filler() to match the SAUCE 00.5 specification. The value may be a font name for ASCII, ANSI, ANSiMation, and BinaryText files.

parse_ansiflags( )

For filetypes that support it, extract the metadata embeded in the flags. Currently, those fields are:

  • blink_mode

  • 9th_bit

  • dos_aspect

SEE ALSO

  • http://www.acid.org/info/sauce/sauce.htm

AUTHOR

Brian Cassidy <bricas@cpan.org>

COPYRIGHT AND LICENSE

Copyright 2008-2015 by Brian Cassidy

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.