What would be a good offline alternative of the online Lipsum generator? It's frustrating when I'm not online and need some placeholder text for testing purpose. A CLI utility would be ideal, so that I can tailor the output to fit my needs.
-
See also http://stackoverflow.com/questions/1356765/online-lorem-ipsum-generators for online lorem ipsum generators – Spoike Aug 31 '09 at 18:30
18 Answers
In Office 2007 apps, you can type in
=lorem(n)
with n
equaling the number of paragraphs of lorem ipsum you would like generated.

- 2,536
- 1
- 16
- 21
Django's lipsum addon seemed pretty straightforward. As I didn't want to install python just to run this script, I ported it to php.
Here's my PHP version:

- 87,203
- 23
- 98
- 131
Generate a long section online. Save it to a txt file. Refer to txt file when offline.

- 77,456
- 30
- 160
- 194
-
-
1Generators come in handy when you need it in specific number of characters, words, paragraphs and etc. – Brian Kim Aug 17 '10 at 22:57
-
1You don't want a single fixed text if you want random text that isn't always exactly same, for example, if you want to track where it came from. – bart Nov 19 '10 at 10:40
Textmate has a built in snippet to print this
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
From
lorem

- 108,121
- 75
- 161
- 195
I think you could use a Markov Text Generator, fed from the original Lorem Ipsum text. That way you should be able to find an implementation in any language you prefer.
You can try out if that will do, online, here.

- 7,640
- 3
- 33
- 40
Not sure about a command line version but there is a firefox extension that does Lorem Ipsum: https://addons.mozilla.org/en-US/firefox/addon/2064

- 339
- 2
- 5
Just checked and found that it pulls text from the website so it wouldn't work online... sorry about that, how about this though:
#!/usr/bin/env python
import sys
import random
try:
n = int(sys.argv[1])
except:
print 'Usage: %s num-words' % sys.argv[0]
words = open('/usr/share/dict/words').readlines()
for i in range(n):
print words[random.randrange(0, len(words))][:-1],

- 339
- 2
- 5
For completeness: a Perl module to do this is called Text::Lorem, and there is also a Text::Lorem::More.

- 10,595
- 6
- 48
- 52
To make Juan’s answer more complete, there is fine wrapper to Text::Lorem
module. If you’re on debian:
$> sudo apt-get install libtext-lorem-perl
And after this just type
$> lorem
There's a nice generator available from homebrew if you're on macOS. brew install lorem
. My default python distribution is python 3 which caused a syntax error for the print statements. After fixing that, it was quite nice for my purposes.

- 875
- 1
- 18
- 46
Word 2007 will produce a block of placeholder text when you type in =rand() and this hit the return/enter key. If you're looking for simple placeholder text, I'd go ahead and generate a bunch ahead of time and stick it in a text file.

- 19,053
- 13
- 51
- 67
Django includes the {% lorem %}
tag as part of the contrib addons. It shouldn't be too hard to make a command-line version. Here's the source.

- 72,985
- 14
- 101
- 108
On http://www.lipsum.com there are links to several offline Lorem Ipsum generators, about halfway down the frontpage. Or you could write one of your own in a matter of minutes.
Edit: This isn't accurate, I wrongfully assumed all of the linked lorem ipsum generators were offline ones, not only the LaTeX one.

- 2,907
- 3
- 20
- 15
If you are on linux and have these tools:
pdf2ps | ps2txt < yourarticlecollection/someresearchpaper.pdf
:)
Seiously, most of the time I just copy&paste from research papers and articles that interests me. They have good amount of text that show white rivers and sometimes as incomprehensible as "Lorem ipsum".

- 1
- 1

- 5,309
- 29
- 27
-
1The whole point of lorem ipsum is that it *isn't* comprehensible text, so that you concentrate on the design rather than what is being said. – Jim Sep 18 '08 at 18:04
The alternative is to use VS Code to generate dummy text within html tag.
You can control how much text you want to generate. For example, type lorem10
then press Enter key it will generate 10 words of lorem text.
You can also generate a few paragraphs containing lorem text inside.
For example, p*3>lorem5
will create 3 paragraphs each containing 5 words of lorem text.

- 15,447
- 5
- 79
- 98
At the bottom of the lorem ipsum generator you will find links to the generator for other usage. My understanding is the following can be used offline:
But you may also find the following helpful:
- WWW::Lipsum CPAN Module
- Firefox Add-on
- Dreamweaver Extension
- GTK Lipsum
- ActionScript3
Each of these, while requiring connectivity, reduce the load on the lipsum generator as they don't require loading the actual website.

- 972
- 1
- 7
- 15
-
Thanks, but I really need a total offline solution. I did take a look at the Lipsum CPAN module before. It's rather nice, only if it worked offline... – Imran Sep 18 '08 at 17:48
Slightly off-topic: try to avoid using lorem ipsum for layout testing!
The letter frequencies in Latin are way different than in e.g. English or German. There's lots of 'i' and 'l', i.e. lots of narrow letters.

- 363,080
- 75
- 446
- 653