NAME
Convert::AcrossLite - Convert binary AcrossLite puzzle files to text.
SYNOPSIS
use Convert::AcrossLite;
my $ac = Convert::AcrossLite->new();
$ac->in_file('/home/doug/puzzles/Easy.puz');
$ac->out_file('/home/doug/puzzles/Easy.txt');
$ac->puz2text;
or
use Convert::AcrossLite;
my $ac = Convert::AcrossLite->new();
$ac->in_file('/home/doug/puzzles/Easy.puz');
my $text = $ac->puz2text;
or
use Convert::AcrossLite;
my $ac = Convert::AcrossLite->new();
$ac->in_file('/home/doug/puzzles/Easy.puz');
my $ac->parse_file;
my $title = $ac->get_title;
my $author = $ac->get_author;
my $copyright = $ac->get_copyright;
my @solution = $ac->get_solution;
my @diagram = $ac->get_diagram;
my $across_clues = $ac->get_across_clues;
my $down_clues = $ac->get_down_clues;
DESCRIPTION
Convert::AcrossLite is used to convert binary AcrossLite puzzle files to text.
Convert::AcrossLite is loosely based on the C program written by Bob Newell (http://www.gtoal.com/wordgames/gene/AcrossLite).
CONSTRUCTOR
new
This is the contructor. You can pass the full path to the puzzle input file.
my $ac = Convert::AcrossLite->new(in_file => '/home/doug/puzzles/Easy.puz');
The default value is 'Default.puz'.
METHODS
in_file
This method returns the current puzzle input path/filename.
my $in_filename = $ac->in_file;
You may also set the puzzle input file by passing the path/filename.
$ac->in_file('/home/doug/puzzles/Easy.puz');
out_file
This method returns the current puzzle output path/filename.
my $out_filename = $ac->out_file;
You may also set the puzzle output file by passing the path/filename.
$ac->out_file('/home/doug/puzzles/Easy.txt');
puz2text
This method will produce a basic text file in the same format as the easy.txt file provided with AcrossLite. This method will read the input file set by in_file and write to the file set by out_file.
$ac->puz2text;
If out_file is not set, then the text is returned.
print $ac->puz2text;
or
my $text = $ac->puz2text;
parse_file
This method will parse the puzzle file by calling _parse_file.
_parse_file
This helper method does the actual parsing of the puz file.
is_parsed
This method returns file parse status: 0 if input file has not been parsed, 1 if input file has been parsed.
get_rows
This method returns the number of rows in puzzle.
my $rows = $ac->get_rows;
get_columns
This method returns the number of columns in puzzle.
my $columns = $ac->get_columns;
get_solution
This method returns the puzzle solution.
my @solution = $ac->get_solution;
get_diagram
This method returns the puzzle solution diagram.
my @solution = $ac->get_diagram;
get_title
This method returns the puzzle title.
my $title = $ac->get_title;
get_author
This method returns the puzzle author.
my $author = $ac->get_author;
get_copyright
This method returns the puzzle copyright.
my $copyright = $ac->get_copyright;
get_across_clues
This method returns the puzzle across clues.
my $across_clues = $ac->get_across_clues;
get_down_clues
This method returns the puzzle down clues.
my $down_clues = $ac->get_down_clues;
AUTHOR
Doug Sparling <doug@dougsparling.com>
COPYRIGHT
Copyright (c) 2002 Douglas Sparling. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.