Text-Greeking-0.14/000755 000765 000024 00000000000 12405530763 014354 5ustar00neilbstaff000000 000000 Text-Greeking-0.14/Changes000644 000765 000024 00000002127 12405530763 015651 0ustar00neilbstaff000000 000000 Revision history for Perl module Text::Greeking 0.14 2014-09-15 NEILB - I hadn't noticed that t/01_compile.t was expecting min perl 5.0061, where I set it on the dist as 5.006; this resulted in at least one CPAN Testers failure. - Added SEE ALSO link to Acme::CorpusScrambler - Tidied up the SYNOPSIS - Added Text::Lorem, Text::Lorem::More, Lingua::ManagementSpeak, and Faker to SEE ALSO. 0.13 2014-09-13 NEILB - Fixed the pod errors which meant the doc wasn't appearing in MetaCPAN - Added links to similar / related modules in SEE ALSO - Added github repo to doc - Switched to Dist::Zilla - Reformatted this file as per CPAN::Changes::Spec - Deleted tests that aren't needed under Dist::Zilla 0.12 2009-08-27 TIMA - Applied patch to fix busted POD formatting. (Christine Spang) - Added proper standard units tests - Added lots of meta to Makefile.PL - Updated contact and copyright information - Ran perltidy of code 0.11 2005-03-13 TIMA - Fixed botched distribution. 0.1 2005-03-13 TIMA - Initial release into CPAN. Text-Greeking-0.14/dist.ini000644 000765 000024 00000000324 12405530763 016017 0ustar00neilbstaff000000 000000 name = Text-Greeking author = Timothy Appnel license = Artistic_1_0 copyright_holder = Timothy Appnel copyright_year = 2005 version = 0.14 [@Basic] [PkgVersion] [AutoPrereqs] [GithubMeta] Text-Greeking-0.14/lib/000755 000765 000024 00000000000 12405530763 015122 5ustar00neilbstaff000000 000000 Text-Greeking-0.14/LICENSE000644 000765 000024 00000011715 12405530763 015366 0ustar00neilbstaff000000 000000 This software is Copyright (c) 2005 by Timothy Appnel. This is free software, licensed under: The Artistic License 1.0 The Artistic License Preamble The intent of this document is to state the conditions under which a Package may be copied, such that the Copyright Holder maintains some semblance of artistic control over the development of the package, while giving the users of the package the right to use and distribute the Package in a more-or-less customary fashion, plus the right to make reasonable modifications. Definitions: - "Package" refers to the collection of files distributed by the Copyright Holder, and derivatives of that collection of files created through textual modification. - "Standard Version" refers to such a Package if it has not been modified, or has been modified in accordance with the wishes of the Copyright Holder. - "Copyright Holder" is whoever is named in the copyright or copyrights for the package. - "You" is you, if you're thinking about copying or distributing this Package. - "Reasonable copying fee" is whatever you can justify on the basis of media cost, duplication charges, time of people involved, and so on. (You will not be required to justify it to the Copyright Holder, but only to the computing community at large as a market that must bear the fee.) - "Freely Available" means that no fee is charged for the item itself, though there may be fees involved in handling the item. It also means that recipients of the item may redistribute it under the same conditions they received it. 1. You may make and give away verbatim copies of the source form of the Standard Version of this Package without restriction, provided that you duplicate all of the original copyright notices and associated disclaimers. 2. You may apply bug fixes, portability fixes and other modifications derived from the Public Domain or from the Copyright Holder. A Package modified in such a way shall still be considered the Standard Version. 3. You may otherwise modify your copy of this Package in any way, provided that you insert a prominent notice in each changed file stating how and when you changed that file, and provided that you do at least ONE of the following: a) place your modifications in the Public Domain or otherwise make them Freely Available, such as by posting said modifications to Usenet or an equivalent medium, or placing the modifications on a major archive site such as ftp.uu.net, or by allowing the Copyright Holder to include your modifications in the Standard Version of the Package. b) use the modified Package only within your corporation or organization. c) rename any non-standard executables so the names do not conflict with standard executables, which must also be provided, and provide a separate manual page for each non-standard executable that clearly documents how it differs from the Standard Version. d) make other distribution arrangements with the Copyright Holder. 4. You may distribute the programs of this Package in object code or executable form, provided that you do at least ONE of the following: a) distribute a Standard Version of the executables and library files, together with instructions (in the manual page or equivalent) on where to get the Standard Version. b) accompany the distribution with the machine-readable source of the Package with your modifications. c) accompany any non-standard executables with their corresponding Standard Version executables, giving the non-standard executables non-standard names, and clearly documenting the differences in manual pages (or equivalent), together with instructions on where to get the Standard Version. d) make other distribution arrangements with the Copyright Holder. 5. You may charge a reasonable copying fee for any distribution of this Package. You may charge any fee you choose for support of this Package. You may not charge a fee for this Package itself. However, you may distribute this Package in aggregate with other (possibly commercial) programs as part of a larger (possibly commercial) software distribution provided that you do not advertise this Package as a product of your own. 6. The scripts and library files supplied as input to or produced as output from the programs of this Package do not automatically fall under the copyright of this Package, but belong to whomever generated them, and may be sold commercially, and may be aggregated with this Package. 7. C or perl subroutines supplied by you and linked into this Package shall not be considered part of this Package. 8. The name of the Copyright Holder may not be used to endorse or promote products derived from this software without specific prior written permission. 9. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. The End Text-Greeking-0.14/Makefile.PL000644 000765 000024 00000002104 12405530763 016323 0ustar00neilbstaff000000 000000 # This file was automatically generated by Dist::Zilla::Plugin::MakeMaker v5.020. use strict; use warnings; use 5.006; use ExtUtils::MakeMaker ; my %WriteMakefileArgs = ( "ABSTRACT" => "generate meaningless text (eg to fill a page when designing)", "AUTHOR" => "Timothy Appnel ", "CONFIGURE_REQUIRES" => { "ExtUtils::MakeMaker" => 0 }, "DISTNAME" => "Text-Greeking", "EXE_FILES" => [], "LICENSE" => "artistic", "NAME" => "Text::Greeking", "PREREQ_PM" => { "strict" => 0, "warnings" => 0 }, "TEST_REQUIRES" => { "Test::More" => 0 }, "VERSION" => "0.14", "test" => { "TESTS" => "t/*.t" } ); my %FallbackPrereqs = ( "Test::More" => 0, "strict" => 0, "warnings" => 0 ); unless ( eval { ExtUtils::MakeMaker->VERSION(6.63_03) } ) { delete $WriteMakefileArgs{TEST_REQUIRES}; delete $WriteMakefileArgs{BUILD_REQUIRES}; $WriteMakefileArgs{PREREQ_PM} = \%FallbackPrereqs; } delete $WriteMakefileArgs{CONFIGURE_REQUIRES} unless eval { ExtUtils::MakeMaker->VERSION(6.52) }; WriteMakefile(%WriteMakefileArgs); Text-Greeking-0.14/MANIFEST000644 000765 000024 00000000331 12405530763 015502 0ustar00neilbstaff000000 000000 # This file was automatically generated by Dist::Zilla::Plugin::Manifest v5.020. Changes LICENSE MANIFEST META.yml Makefile.PL README dist.ini lib/Text/Greeking.pm t/01_compile.t t/98_pod_syntax.t t/99_pod_coverage.t Text-Greeking-0.14/META.yml000644 000765 000024 00000001171 12405530763 015625 0ustar00neilbstaff000000 000000 --- abstract: 'generate meaningless text (eg to fill a page when designing)' author: - 'Timothy Appnel ' build_requires: Test::More: '0' configure_requires: ExtUtils::MakeMaker: '0' dynamic_config: 0 generated_by: 'Dist::Zilla version 5.020, CPAN::Meta::Converter version 2.141170' license: artistic meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html version: '1.4' name: Text-Greeking requires: perl: '5.006' strict: '0' warnings: '0' resources: homepage: https://github.com/neilbowers/Text-Greeking repository: https://github.com/neilbowers/Text-Greeking.git version: '0.14' Text-Greeking-0.14/README000644 000765 000024 00000000513 12405530763 015233 0ustar00neilbstaff000000 000000 This archive contains the distribution Text-Greeking, version 0.14: generate meaningless text (eg to fill a page when designing) This software is Copyright (c) 2005 by Timothy Appnel. This is free software, licensed under: The Artistic License 1.0 This README file was generated by Dist::Zilla::Plugin::Readme v5.020. Text-Greeking-0.14/t/000755 000765 000024 00000000000 12405530763 014617 5ustar00neilbstaff000000 000000 Text-Greeking-0.14/t/01_compile.t000644 000765 000024 00000000267 12405530763 016741 0ustar00neilbstaff000000 000000 #!perl # Tests that the Text::Greeking package compiles use strict; use warnings; use Test::More tests => 2; ok($] >= 5.006, "Your perl is new enough"); use_ok('Text::Greeking'); Text-Greeking-0.14/t/98_pod_syntax.t000644 000765 000024 00000001027 12405530763 017514 0ustar00neilbstaff000000 000000 #!perl # Test all distribution POD are formatted correctly use strict; use warnings; use Test::More; my $MODULE = 'Test::Pod 1.00'; # Don't run tests for installs unless ($ENV{AUTOMATED_TESTING} or $ENV{RELEASE_TESTING}) { plan(skip_all => "Author tests not required for installation"); } # Load the testing module eval "use $MODULE"; if ($@) { $ENV{RELEASE_TESTING} ? die("Failed to load required release-testing module $MODULE") : plan(skip_all => "$MODULE not available for testing"); } all_pod_files_ok(); Text-Greeking-0.14/t/99_pod_coverage.t000644 000765 000024 00000001103 12405530763 017755 0ustar00neilbstaff000000 000000 #!perl use strict; use warnings; use Test::More; my $MODULE = 'Test::Pod::Coverage 1.00'; # Don't run tests for installs unless ($ENV{AUTOMATED_TESTING} or $ENV{RELEASE_TESTING}) { plan(skip_all => "Author tests not required for installation"); } # Load the testing module eval "use $MODULE"; if ($@) { $ENV{RELEASE_TESTING} ? die("Failed to load required release-testing module $MODULE") : plan(skip_all => "$MODULE not available for testing"); } my $trustparents = {coverage_class => 'Pod::Coverage::CountParents'}; all_pod_coverage_ok($trustparents); Text-Greeking-0.14/lib/Text/000755 000765 000024 00000000000 12405530763 016046 5ustar00neilbstaff000000 000000 Text-Greeking-0.14/lib/Text/Greeking.pm000644 000765 000024 00000017374 12405530763 020153 0ustar00neilbstaff000000 000000 package Text::Greeking; $Text::Greeking::VERSION = '0.14'; use 5.006; use strict; use warnings; # make controllable eventually. my @punc = split('', '..........??!'); my @inpunc = split('', ',,,,,,,,,,;;:'); push @inpunc, ' --'; sub new { my $class = shift; my $self = bless {}, $class; srand; $self->init; } sub init { $_[0]->sources([]); $_[0]->paragraphs(2, 8); $_[0]->sentences(2, 8); $_[0]->words(5, 15); $_[0]; } sub sources { $_[0]->{sources} = $_[1] if defined $_[1]; $_[0]->{sources}; } sub add_source { my ($self, $text) = @_; return unless $text; $text =~ s/[\n\r]/ /g; $text =~ s/[[:punct:]]//g; my @words = map { lc $_ } split /\s+/, $text; push @{$self->{sources}}, \@words; } sub generate { my $self = shift; my $out; $self->_load_default_source unless defined $self->{sources}->[0]; my @words = @{$self->{sources}->[int(rand(@{$self->{sources}}))]}; my ($paramin, $paramax) = @{$self->{paragraphs}}; my ($sentmin, $sentmax) = @{$self->{sentences}}; my ($phramin, $phramax) = @{$self->{words}}; my $pcount = int(rand($paramax - $paramin + 1) + $paramin); for (my $x = 0; $x < $pcount; $x++) { my $p; my $scount = int(rand($sentmax - $sentmin + 1) + $sentmin); for (my $y = 0; $y < $scount; $y++) { my $s; my $wcount = int(rand($phramax - $phramin + 1) + $phramin); for (my $w = 0; $w < $wcount; $w++) { my $word = $words[int(rand(@words))]; $s .= $s ? " $word" : ucfirst($word); $s .= (($w + 1 < $wcount) && !int(rand(10))) ? $inpunc[int(rand(@inpunc))] : ''; } $s .= $punc[int(rand(@punc))]; $p .= ' ' if $p; $p .= $s; } $out .= $p . "\n\n"; # assumes text. } $out; } sub paragraphs { $_[0]->{paragraphs} = [$_[1], $_[2]] } sub sentences { $_[0]->{sentences} = [$_[1], $_[2]] } sub words { $_[0]->{words} = [$_[1], $_[2]] } sub _load_default_source { my $text = <add_source($text); } 1; __END__ =head1 NAME Text::Greeking - generate meaningless text (eg to fill a page when designing) =head1 SYNOPSIS use Text::Greeking; my $g = Text::Greeking->new; $g->paragraphs(1,2) # min of 1 paragraph and a max of 2 $g->sentences(2,5) # min of 2 sentences per paragraph and a max of 5 $g->words(8,16) # min of 8 words per sentence and a max of 16 print $g->generate; # use default Lorem Ipsum source =head1 DESCRIPTION Greeking is the use of random letters or marks to show the overall appearance of a printed page without showing the actual text. Greeking is used to make it easy to judge the overall appearance of a document without being distracted by the meaning of the text. This is a module is for quickly generating varying meaningless text from any source to create this illusion of the content in systems. This module was created to quickly give developers simulated content to fill systems with simulated content. Instead of static Lorem Ipsum text, by using randomly generated text and optionally varying word sources, repetitive and monotonous patterns that do not represent real system usage is avoided. =head1 METHODS =over =item Text::Greeking->new Constructor method. Returns a new instance of the class. =item $g->init Initializes object with defaults. Called by the constructor. Broken out for easy overloading to enable customized defaults and other behaviour. =item $g->sources([\@ARRAY]) Gets/sets the table of source word collections current in memory as an ARRAY reference =item $g->add_source($text) The class takes a body of text passed as a SCALAR and processes it into a list of word tokens for use in generating random filler text later. =item $g->generate Returns a body of random text generated from a randomly selected source using the minimum and maximum values set by paragraphs, sentences, and words minimum and maximum values. If generate is called without any sources a standard Lorem Ipsum block is used added to the sources and then used for processing the random text. =item $g->paragraphs($min,$max) Sets the minimum and maximum number of paragraphs to generate. Default is a minimum of 2 and a maximum of 8. =item $g->sentences($min,$max) Sets the minimum and maximum number of sentences to generate per paragraph. Default is a minimum of 2 and a maximum of 8. =item $g->words($min,$max) Sets the minimum and maximum number of words to generate per sentence. Default is a minimum of 5 and a maximum of 15. =back =head1 SEE ALSO L - an interface to L. L - generate random latin-looking text. L - class that provides methods for generating various types of structured latin filler text, such as names, words, sentences, paragraphs, titles, hostnames, etc. L - generate Japanese filler text. L - generate Chinese filler text. L - another module for generating Chinese filler text. L - generates filler text based on text that you provide; falls back to the using the corpus for L. L - a template toolkit plugin for C. L - an extensible framework for generating fake data, including I style filler text. L - generates filler text in 'management speak'. L - pedant. The L. =head1 TO DO =over =item HTML output mode including random hyperlinked phrases. =item Configurable punctuation controls. =back =head1 REPOSITORY L =head1 LICENSE The software is released under the Artistic License. The terms of the Artistic License are described at L. =head1 AUTHOR & COPYRIGHT Except where otherwise noted, Text::Greeking is Copyright 2005-2009, Timothy Appnel, tima@cpan.org. All rights reserved. =cut