Chatbot::Alpha::Sort - Alphabetic sorting for Chatbot::Alpha documents.


Chatbot-Alpha documentation  | view source Contained in the Chatbot-Alpha distribution.

Index


NAME

Top

Chatbot::Alpha::Sort - Alphabetic sorting for Chatbot::Alpha documents.

SYNOPSIS

Top

  use Chatbot::Alpha::Sort;

  # Create a new sorter.
  my $sort = new Chatbot::Alpha::Sort();

  # Sort your files.
  $sort->start (
     dir => './before',
     out => './after',
     ext => 'cba',
  );

DESCRIPTION

Top

Chatbot::Alpha::Sort can take your numerous unsorted Alpha documents, and create nicely formatted documents from A.cba to Z.cba with triggers sorted alphabetically within each document.

METHODS

Top

new (ARGUMENTS)

Creates a new Chatbot::Alpha::Sort object. You should only need one object, since each sort request creates its own Chatbot::Alpha, unless you intend to run multiple sorts at the same time.

Returns a Chatbot::Alpha::Sort instance.

version

Returns the version number of the module.

start (ARGUMENTS)

Starts the sorting process. ARGUMENTS is a hash that you must pass in to tell the module how to do things. The arguments are as follows:

  dir => DIRECTORY
     The directory at which your original Alpha documents
     can be found. Defaults to CWD.
  out => DIRECTORY
     Another directory for which your newly formatted Alpha
     documents will be written to. Defaults to CWD.
  ext => EXTENSION
     The file extension of your Alpha documents. Defaults
     to cba
  files => SORT_TYPE
     The sorting method for which your new files will be sorted.
     See below for the sort types.

SORT TYPES (FILES)

Top

alpha Sorts the files alphabetically. Will create files "A.cba" through "Z.cba", as well as "star.cba" and "other.cba", and a "topics.cba" to keep all topics together. Triggers within each file are sorted alphabetically.

intact Keeps your original filename structure intact; only sorts triggers alphabetically within each file (topics go to the top of the file's contents).

single Takes ALL your Alpha documents and merges them into one single file. Will write the finished file to "sorted.cba" in the OUT directory. Topics are written first.

CHANGES

Top

  Version 0.2
  - Added sorting with "keep filenames intact" as well as "single filename"

  Version 0.1
  - Initial release.

SEE ALSO

Chatbot::Alpha

KNOWN BUGS

Top

No bugs have been discovered at this time.

AUTHOR

Top

Casey Kirsle, http://www.cuvou.com/

COPYRIGHT AND LICENSE

Top


Chatbot-Alpha documentation  | view source Contained in the Chatbot-Alpha distribution.