Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add lipsum_from_seed and tweak capitalization. #73

Merged
merged 2 commits into from
Mar 17, 2022

Conversation

reknih
Copy link
Contributor

@reknih reknih commented Mar 13, 2022

Hey,
thanks for the nice library!

I'm considering using this in one of my projects to allow users to create blind text of arbitrary length. I'd prefer everyone to have the same output for a given length while preserving the iconic start "Lorem ipsum dolor sit amet". Hence, I needed a function combining the properties of lipsum and lipsum_words_from_seed. I added lipsum_from_seed (very easy thanks to great design!) for this purpose and rearranged both its and lipsum_words_from_seed doc string a bit as to not make the function overview to wordy.

While implementing the new function, I realized that lipsum will sometimes yield strings like "Nullam habuit. voluptatem cum summum." containing punctuation followed by non-capitalized words. This did not look very nice to me, so I adjusted join_words to always capitalize after a ., ?, or !.

I hope these changes align with your plan for the library and match the style used so far. I'm happy to make stylistic changes to the PR!

@mgeisler
Copy link
Owner

Hi Martin,

Your PR looks great, thanks! I agree completely that we shouldn't have stray punctuation in the sentences :-)

@mgeisler mgeisler merged commit fbcf857 into mgeisler:master Mar 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants