Skip to content

zengargoyle/Text-Fortune

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
bin
 
 
 
 
 
 
t
 
 
xt
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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.

About

A Perl6 module for working with fortune(6) files

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Other 100.0%