Sign inSign up

garretpremo/lorem-ipsum-document-generator

By garretpremo

•Updated over 2 years ago

Image
0

305

garretpremo/lorem-ipsum-document-generator repository overview

⁠Dummy Doc Generator

Generates bulk numbers of lorem-ipsum⁠ documents

Can configure number of docs, number of words, number of sentences, number of paragraphs.

Can spit out docs with GUIDS or numbered

⁠SUPPORTED FORMATS:
  • txt
  • pdf

⁠Usage (Docker CLI):

docker run --rm -v $(pwd)/docs:/generator/docs garretpremo/lorem-ipsum-document-generator:latest

On Windows powershell

docker run --rm -v ${pwd}/docs:/generator/docs garretpremo/lorem-ipsum-document-generator:latest

Documents will be outputted in the docs folder in the project root.

⁠Running with custom environment variables

(NOTE the below are all DEFAULT parameters. Configure them however you like.)

docker run --rm \
    -v $(pwd)/docs:/generator/docs
    --name=lorem-ipsum-document-generator \
    -e DOC_COUNT=100 \
    -e SENTENTCE_PER_PARAGRAPH=5 \
    -e WORDS_PER_SENTENCE=20 \
    -e PARAGRAPHS=10 \
    -e USE_GUID_FOLDER=true \
    -e USE_GUID_DOC_NAMES=true \
    -e DOC_PREFIX=generated-doc- \
    -e DOC_EXTENSION=txt \
    garretpremo/lorem-ipsum-document-generator

⁠Environment options

NameDescription
DOC_COUNTThe total number of documents to generate
SENTENTCE_PER_PARAGRAPHNumber of sentences in each paragraph
WORDS_PER_SENTENCENumber of words in each sentence
PARAGRAPHSNumber of paragraphs in the document
USE_GUID_FOLDERTrue: use a guid name for the folder containing generated docs
USE_GUID_DOC_NAMESTrue: use a guid for each doc name
False: use a fixed name and indexed number (index starts at 1)
DOC_PREFIXThe prefix of each document name (applies to guid and non guid docs)
DOC_EXTENSIONextension (default txt)

⁠Using from the repository⁠:

docker compose run --rm --build main

⁠Configuring Output

Modify the .env file

Change values as desired

Run the above command

⁠Running with node (if ur a scrub and don't have docker)
git clone https://github.com/gpremo-re/dummy-doc-generator.git
cd dummy-doc-generator
npm install
npm run start

Modify the .env file to change results

Tag summary

Content type

Image

Digest

sha256:52abdbe0e…

Size

99.8 MB

Last updated

over 2 years ago

docker pull garretpremo/lorem-ipsum-document-generator