A Perl6 module for working with fortune(6) files
Perl6
Latest commit 14e4a2d Jan 12, 2016 @zengargoyle travis tweak
Permalink
Failed to load latest commit information.
bin add fortune.pl and strfile.pl implementations Jul 3, 2014
lib/Text post xmas Jan 12, 2016
logotype add logotype Nov 8, 2015
t Test function name changes, documentation started Oct 8, 2015
.gitignore post xmas Jan 12, 2016
.travis.yml travis tweak Jan 12, 2016
LICENSE Test function name changes, documentation started Oct 8, 2015
META.info
META6.json Test function name changes, documentation started Oct 8, 2015
README.md add travis build status Oct 8, 2015
TODO post xmas Jan 12, 2016

README.md

Build Status

NAME

Text::Fortune - print a random adage, fortune(6), strfile(1)

SYNOPSIS

use Text::Fortune;

# Random fortune from 'fortunefile' & 'fortunefile.dat' -- fortune(6)
my $fortune = Text::Fortune::File.new( path => $fortunefile );
say $fortune.random;

# Generate 'fortunefile.dat' from 'fortunefile' -- strfile(1)
my $datfile = $fortunefile ~ '.dat';
$datafile.IO.open(:w).write(
  Text::Fortune::Index.new.load-fortune( $fortunefile.IO.path )
);

DESCRIPTION

Text::Fortune is a minimal implementation for implementing the fortune(6) and strfile(1) progams, with functions for generating a 'fortunes.dat' file from a 'fortunes' file (strfile(1)) and for retrieving a random fortune (fortune(6)).

COPYRIGHT AND LICENSE

Copyright 2015 zengargoyle zengargoyle@gmail.com

This library is free software; you can redistribute it and/or modify it under the Artistic License 2.0.