dolor, lorem ipsum cli

dolor: A good enough for me lorem ipsum CLI tool

Published at

I've found myself in need of a little lorem ipsum CLI tool a few times. It's not the most complete thing but that's okay.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
dolor -h
Usage of dolor:
  -J string
        Used to join words together, default is a space (default " ")
  -P int
        maximum number of sentences in a paragraph (default 7)
  -S int
        maximum number of words in a sentence (default 7)
  -W int
        number of words to generate
  -p int
        number of paragraphs to generate

Example

Generate a hundred placeholder blog posts with 10 random tags each

1
2
3
4
5
for i in {1..99}; do 
tags=$(dolor -W 10 -J ", ")
content=$(dolor -p 10 -S 20 -P 19)
echo -e "Title: LI${i}\nDate: 20${i}-07-29 18:36\nTags: ${tags}\n\n${contnet}" > content/articles/lore${i}.md;
done