My cut-ups, now done using version 1 of a simple but working bit of perl code.
Shelley's Ozymandias comes out all strange and yet familiar ... but what if Shelley and Shakespeare wrestled? The result is unexpected:
course untrimm'd: But thy not fade Nor lose possession desert....Near them, on the sand, Half time thou growest: So long Of that colossal a Summer's day? Thou winds do shake the darling buds Kings, Look on my Works, shall Death brag thou wanderest in these words appear: My beside remains. Round the decay short a date: Sometime too hot the eye of eternal Summer shall command, Tell that its sculptor well from fair sometime hath all too sneer of cold those passions read as men can breathe, So long lives this, and this compare thee to an antique land, Wreck, boundless and bare art more lovely and heaven shines, And oft' is his of that fair thou owest; Nor gold complexion dimm'd; And every fair stone Stand in the declines, By chance or nature's changing or eyes can see, his shade, When and trunkless legs of hand that mocked Which yet survive, them, and the heart that name is Ozymandias, King of stamped on these lifeless things, The And wrinkled lip, and gives life to visage lies, whose frown, of May, And Summer's lease sunk a shattered ye Mighty, and despair! Nothing The lone and level sands stretch far away." Shall I I met a traveller from more temperate: Rough fed; And on the pedestal, Who said--"Two vast in eternal lines to
#!/usr/bin/perl -w
my ($index, $cut, $count, $phrasecut) = 0;
my (@allfields, @allcuts) = {};
srand (time ^ $$ ^ unpack "%L*", `ps axww | gzip`);
while (<>) {
chomp();
@fields = split(/ /,$_);
foreach(@fields) {
$allfields[$index] = $_;
$index++;
}
}
$index = 0;
$cut = int(rand(4)) + 3;
foreach(@allfields) {
$allcuts[$index] .= $_." ";
$count++;
if($count == $cut) {
$index++;
$cut = int(rand(4)) + 3;
$count = 0;
}
}
while($index > 0) {
$phrasecut = int(rand($index));
print $allcuts[$phrasecut];
splice (@allcuts,$phrasecut,1);
$index--;
}
exit 0;
This code is covered by the GPL
No comments:
Post a Comment