[Fun] Lorem Ipsum generator

Discuss and share scripts and script files...
Stef123

Re: [Fun] Lorem Ipsum generator

Post by Stef123 »

You know what would be the icing on the cake? To optionally get the paragraphs wrapped in html paragraph tags :ugeek:
Maybe by throwing in the letter "t", or with a checkbox, or any other way.

highend
Posts: 13317
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: [Fun] Lorem Ipsum generator

Post by highend »

Now you can wrap paragraphs in <p></p> tags...

Input examples:
10 = 10 paragraphs, between 5 and 35 sentences each (random - default values)
10,5 = 10 paragraphs, 5 sentences each
10,1-10 = 10 paragraphs, between 1 and 10 sentences each (random)
10,5-20,w = 10 paragraphs, between 5 and 20 sentences each (random), wrapped in tags
LoremIpsumGenerator_v2_by_Highend.zip
(1.93 KiB) Downloaded 131 times
One of my scripts helped you out? Please donate via Paypal

bdeshi
Posts: 4249
Joined: 12 Mar 2014 17:27
Location: Asteroid B-612 / Dhaka
Contact:

Re: [Fun] Lorem Ipsum generator

Post by bdeshi »

Thank you all for your interest in this
.                     (lazy day today?  :kidding: )




btw, I've converted the original script to a UDF. See first post. It can now also read a file for the words.

One of the example generates paragraphs.
Alter `ceil($maxWordsCount*80/100)` this bit in that example for more random paragraph lengths
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]

SkyFrontier
Posts: 2341
Joined: 04 Jan 2010 14:27
Location: Pasárgada (eu vou!)

Re: [Fun] Lorem Ipsum generator

Post by SkyFrontier »

Thanks for the variations, guyz!

I was just moving towards the full randomization... luckily I've checked the forums first, today! :biggrin:
Have a nice day, all!

-yesterday I noticed how hard it is to find large bits of sample text across the net, with zero patience to look after txt e-books which could fit (or not!) my demand...
New User's Ref. Guide and Quick Setup Guide can help a bit! Check XYplorer Resources Index for many useful links!
Want a new XYperience? XY MOD - surfYnXoard
-coz' the aim of computing is to free us to LIVE...

Stef123

Re: [Fun] Lorem Ipsum generator

Post by Stef123 »

Brilliant. :tup: Many thanks highend
And thanks to Sammay for getting this started.
@SkyFrontier - try the attached philosophy generator.
Attachments
Philosophy_Oracle.zip
(3.55 KiB) Downloaded 126 times

SkyFrontier
Posts: 2341
Joined: 04 Jan 2010 14:27
Location: Pasárgada (eu vou!)

Re: [Fun] Lorem Ipsum generator

Post by SkyFrontier »

Haha, thank you, Stef!
A most productive approach on ipsumnation... :P
New User's Ref. Guide and Quick Setup Guide can help a bit! Check XYplorer Resources Index for many useful links!
Want a new XYperience? XY MOD - surfYnXoard
-coz' the aim of computing is to free us to LIVE...

Irwin of Upton
Posts: 131
Joined: 28 Feb 2015 19:42

Re: [Fun] Lorem Ipsum generator

Post by Irwin of Upton »

"It can now also read a file for the words."

How to do this?

bdeshi
Posts: 4249
Joined: 12 Mar 2014 17:27
Location: Asteroid B-612 / Dhaka
Contact:

Re: [Fun] Lorem Ipsum generator

Post by bdeshi »

Suppose the lipsumgen function is saved in <xyscripts>\inc\lipsumgen.xyi and you have a space-separated wordlist saved as <xydata>\wordlist.txt
Then here's an example that will create a 500-word text from that file.

Code: Select all

INCLUDE "inc\LipsumGen.xyi";

"lipsumFileTest"
  text LipsumGen(500, "<xydata>\wordlist.txt");
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]

Irwin of Upton
Posts: 131
Joined: 28 Feb 2015 19:42

Re: [Fun] Lorem Ipsum generator

Post by Irwin of Upton »

Will put together the first "wordlist" and try it out. Looks promising!

bdeshi
Posts: 4249
Joined: 12 Mar 2014 17:27
Location: Asteroid B-612 / Dhaka
Contact:

Re: [Fun] Lorem Ipsum generator

Post by bdeshi »

remember words should be separated by space.
Forget that, I just added a separator variable. You can create a |-separated wordlist and do this now: ::text lipsumgen(40, "wordlist.txt", "|");
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]

Post Reply