lukaskubanek / LoremSwiftum

A lightweight lorem ipsum generator for Swift
MIT License
216 stars 37 forks source link

Randomly generate a "meaningful" word or words. #26

Open soaapp opened 11 months ago

soaapp commented 11 months ago

Hey there, wondering if its ok to add a feature request:

Hoping to add support to generate random meaningful words that can be contributed to either a word generator or "username" generation.

If there's anyway I can help with this, I would be very interested as well.

Thank you for the awesome package!

lukaskubanek commented 11 months ago

Hi Jay, I’m not really working actively on this project anymore, but feel free to open a PR with a sketch of this functionality. Have you thought about where to source the meaningful words? And as for the username, you can consider building these from firstName and lastName.

soaapp commented 11 months ago

Hey Lukas, thanks for your response.

I did end up building sort of a rough idea of how it works. It pretty much just reuses your Lorem.word (now called Lorem.realWord) and pulls a word from the macOS dictionary (located in /usr/share/dict/web2a). My current version had to recreate the web2a file as the one inside the macOS seems to be locked. I have tested it in a side project I have and seems to work.

Let me know what you think, I can try to submit a rough PR if you're ok with it.

Cheers, Jay

lukaskubanek commented 11 months ago

Hi Jay, this looks like it’d only be available on macOS, right? That would be kind of limiting considering that the library is platform-agnostic.