Page 2 of 2
Re: [Fun] Lorem Ipsum generator
Posted: 10 Jun 2015 11:37
by Stef123
You know what would be the icing on the cake? To optionally get the paragraphs wrapped in html paragraph tags
Maybe by throwing in the letter "t", or with a checkbox, or any other way.
Re: [Fun] Lorem Ipsum generator
Posted: 10 Jun 2015 12:55
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
Re: [Fun] Lorem Ipsum generator
Posted: 10 Jun 2015 13:02
by bdeshi
Thank you all for your interest in
this. (lazy day today?
)
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
Re: [Fun] Lorem Ipsum generator
Posted: 10 Jun 2015 14:01
by SkyFrontier
Thanks for the variations, guyz!
I was just moving towards the full randomization... luckily I've checked the forums first, today!
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...
Re: [Fun] Lorem Ipsum generator
Posted: 10 Jun 2015 14:47
by Stef123
Brilliant.

Many thanks highend
And thanks to Sammay for getting this started.
@SkyFrontier - try the attached philosophy generator.
Re: [Fun] Lorem Ipsum generator
Posted: 10 Jun 2015 17:06
by SkyFrontier
Haha, thank you, Stef!
A most productive approach on ipsumnation...

Re: [Fun] Lorem Ipsum generator
Posted: 11 Jun 2015 17:19
by Irwin of Upton
"It can now also read a file for the words."
How to do this?
Re: [Fun] Lorem Ipsum generator
Posted: 11 Jun 2015 17:27
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");
Re: [Fun] Lorem Ipsum generator
Posted: 12 Jun 2015 15:35
by Irwin of Upton
Will put together the first "wordlist" and try it out. Looks promising!
Re: [Fun] Lorem Ipsum generator
Posted: 12 Jun 2015 15:37
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", "|");