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.
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
Generate a long section online. Save it to a txt file. Refer to txt file when offline.
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.
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.
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.
In Office 2007 apps, you can type in
=lorem(n)
with n
equaling the number of paragraphs of lorem ipsum you would like generated.
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
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],
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.
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".
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:
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.