Lorem Gen
Generate placeholder text via CLI. Supports multiple styles and output formats.
Quick Start
CODEBLOCK0
Options
| Flag | Description | Default |
|---|
| INLINECODE0 | Number of units | 3 |
| INLINECODE1 |
paragraphs,
sentences, or
words | paragraphs |
|
-s, --style |
lorem,
hipster, or
tech | lorem |
|
-f, --format |
plain,
html,
markdown,
json | plain |
|
--no-classic | Skip "Lorem ipsum dolor sit amet..." opening | off |
|
--seed | Random seed for reproducible output | none |
Styles
- - lorem — Classic Latin placeholder text
- hipster — Artisan / wellness / lifestyle vocabulary
- tech — DevOps, cloud, and infrastructure jargon
Notes
- - No external dependencies (Python 3 stdlib only)
- First paragraph starts with the classic opening by default (use
--no-classic to disable) - Use
--seed for deterministic output across runs
Lorem Gen
通过命令行生成占位文本。支持多种风格和输出格式。
快速开始
bash
生成3段经典Lorem Ipsum文本
python3 scripts/lorem_gen.py
生成5个句子
python3 scripts/lorem_gen.py -n 5 -u sentences
生成50个词的文艺风格文本
python3 scripts/lorem_gen.py -n 50 -u words -s hipster
生成HTML格式的技术术语文本
python3 scripts/lorem_gen.py -s tech -f html
生成JSON输出,使用可复现的随机种子
python3 scripts/lorem_gen.py -n 2 -f json --seed 42
选项
| 标志 | 描述 | 默认值 |
|---|
| -n, --count | 生成单元数量 | 3 |
| -u, --unit |
paragraphs(段落)、sentences(句子)或words(单词) | paragraphs |
| -s, --style | lorem、hipster或tech | lorem |
| -f, --format | plain(纯文本)、html、markdown、json | plain |
| --no-classic | 跳过Lorem ipsum dolor sit amet...经典开头 | 关闭 |
| --seed | 用于可复现输出的随机种子 | 无 |
风格
- - lorem — 经典拉丁语占位文本
- hipster — 手工艺/健康/生活方式词汇
- tech — DevOps、云和基础设施术语
说明
- - 无外部依赖(仅使用Python 3标准库)
- 默认情况下,第一段以经典开头语句起始(使用--no-classic可禁用)
- 使用--seed可确保每次运行生成相同的输出