Skip to content

Instantly share code, notes, and snippets.

@lukaswhite
Created January 23, 2014 20:07
Show Gist options
  • Save lukaswhite/8585880 to your computer and use it in GitHub Desktop.
Save lukaswhite/8585880 to your computer and use it in GitHub Desktop.
T'Ipsum - a Yorkshire Lorum Ipsum alternative, inspired by http://tlipsum.appspot.com/ by @tonyblundell
/**
* T'ipsum, a dead simple class for generating Yorkshire t'ipsum.
*
* Based on http://tlipsum.appspot.com/ by @tonyblundell.
*/
class Tipsum {
/**
* The actual text
*/
static $paragraphs = array(
"Dahn t'coil oil sup wi' 'im chuffin' nora. Eeh what's that when it's at ooam god's own county. By 'eck how much soft lad a pint 'o mild wacken thi sen up sup wi' 'im. Shu' thi gob th'art nesh thee chuffin' nora. Sup wi' 'im face like a slapped arse breadcake wacken thi sen up bobbar. Ah'll learn thi tha daft apeth how much is that thine be reet mardy bum. Tintintin how much ey up that's champion where's tha bin cack-handed. Tintintin tintintin. By 'eck tell thi summat for nowt. Gerritetten soft southern pansy ah'll box thi ears dahn t'coil oil. Nah then nay lad face like a slapped arse where's tha bin. Be reet tha knows nah then michael palin michael palin. Aye a pint 'o mild ah'll learn thi. Gi' o'er cack-handed.",
"Ne'ermind dahn t'coil oil ah'll gi' thi summat to rooer abaht mardy bum. Where's tha bin sup wi' 'im god's own county aye. Ee by gum ah'll learn thi mardy bum what's that when it's at ooam. Face like a slapped arse nay lad michael palin wacken thi sen up. Ee by gum soft southern pansy. Ah'll gi' thee a thick ear mardy bum be reet appens as maybe shurrup sup wi' 'im. Gi' o'er appens as maybe how much will 'e 'eckerslike face like a slapped arse. Sup wi' 'im tha knows ah'll gi' thi summat to rooer abaht ey up tha what. T'foot o' our stairs be reet nobbut a lad. Breadcake cack-handed bobbar shurrup a pint 'o mild. Ah'll gi' thi summat to rooer abaht soft southern pansy ah'll learn thi ah'll box thi ears.",
"Is that thine tell thi summat for nowt shu' thi gob. How much ah'll gi' thi summat to rooer abaht gerritetten tell thi summat for nowt ah'll learn thi. Dahn t'coil oil. God's own county big girl's blouse. Big girl's blouse what's that when it's at ooam. Nay lad ee by gum nah then by 'eck nay lad. Bloomin' 'eck will 'e 'eckerslike tha what t'foot o' our stairs. Be reet tell thi summat for nowt where there's muck there's brass bloomin' 'eck big girl's blouse. By 'eck shurrup. Ah'll gi' thi summat to rooer abaht shu' thi gob a pint 'o mild aye. Gerritetten cack-handed ah'll box thi ears. God's own county. Where there's muck there's brass nobbut a lad t'foot o' our stairs face like a slapped arse is that thine. Nah then tha knows michael palin ah'll learn thi tha knows.",
"A pint 'o mild big girl's blouse is that thine ah'll box thi ears where there's muck there's brass. Is that thine sup wi' 'im. Any rooad ey up michael palin ne'ermind. Nobbut a lad. Shurrup what's that when it's at ooam nobbut a lad tha daft apeth soft southern pansy. Eeh face like a slapped arse ah'll box thi ears nay lad. Tell thi summat for nowt that's champion nah then will 'e 'eckerslike. T'foot o' our stairs where there's muck there's brass god's own county nah then shu' thi gob. Bobbar ah'll box thi ears gi' o'er. Is that thine shurrup. Michael palin t'foot o' our stairs. That's champion ah'll gi' thee a thick ear. Ah'll gi' thi summat to rooer abaht that's champion by 'eck.",
"Be reet a pint 'o mild ey up will 'e 'eckerslike ah'll gi' thee a thick ear. By 'eck shurrup mardy bum. Ah'll box thi ears eeh ah'll box thi ears tell thi summat for nowt. Soft southern pansy. How much what's that when it's at ooam. God's own county. What's that when it's at ooam by 'eck bobbar tha knows eeh. Aye what's that when it's at ooam ah'll box thi ears will 'e 'eckerslike. Where there's muck there's brass. Ey up. Where there's muck there's brass nah then nobbut a lad. Shurrup ee by gum gerritetten. Bobbar how much be reet. Eeh what's that when it's at ooam.",
);
/**
* Generate some t'ipsum, lad
*
* @param int $num_paragraphs The number of paragraphs to generate, or null to make it random (up to ten)
* @param string $format text|html Setting it to html wraps each paragraph in <p> tags, text for newlines only
* @return string
*/
public static function generate($num_paragraphs = null, $format = 'text')
{
if (!$num_paragraphs) $num_paragraphs = rand(1, 10);
$output = '';
for ($i = 0; $i < $num_paragraphs; $i++) {
$paragraph = self::$paragraphs[($i % count(self::$paragraphs))];
$output .= ($format == 'html') ? sprintf("<p>%s</p>\n", $paragraph) : "$paragraph\n";
}
return $output;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment