0.0
No commit activity in last 3 years
No release in over 3 years
A randomized embedded lorem ipsum generator that can generate words, sentences, or paragraphs.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies
 Project Readme

random_ipsum – randomized Lorem ipsum

We were sick of the ever-same blindtext made by TextMate etc. So here you go:

  >> require "random_ipsum"
  => true
  >> RandomIpsum.words
  => "Purus vulputate congue scelerisque a"
  >> RandomIpsum.words(2)
  => "Justo viverra"
  >> RandomIpsum.words(2)
  => "Sed ut"
  >> RandomIpsum.sentence
  => "Cras sapien lobortis Eleifend faucibus Porttitor fermentum, commodo eros amet."
  >> RandomIpsum.sentence(5)
  => "In risus posuere sit tellus."
  >> RandomIpsum.paragraphs
  => "Volutpat commodo ligula tempus blandit dui Suscipit Ornare sem praesent nam cursus. Nisi Nonummy ullamcorper duis auctor lacus phasellus massa, lorem pede.\n\nElit metus tristique augue, tortor Gravida Lobortis Auctor suscipit vel porta tincidunt donec. Amet porta venenatis consequat bibendum integer Morbi et fames, euismod."

Method Signatures

RandomIpsum.words(nomber_of_words)

RandomIpsum.sentence(number_of_words)

RandomIpsum.paragraphs(number_of_paragraphs, number_of_sentences, number_of_words)

Changing Parameters

To control the actual output, the following constants may be overridden:

RandomIpsum::CapitalizedPercent (default 15)

Average number of capitalized words (apart from the first word in a sentence).

RandomIpsum::CommaPercent (default 18)

Average number of words that are followed by a comma.

RandomIpsum::ParagraphJoiner (default “\n”)

String used to join the individual paragraphs.

RandomIpsum::SentenceJoiner (default " ")

String used to join the individual sentences in a paragraph.

Bugs

If you find a bug, please let me know using the GitHub Bugtracker.

Contributing to random_ipsum

  • Check out the latest master to make sure the feature hasn’t been implemented or the bug hasn’t been fixed yet
  • Check out the issue tracker to make sure someone already hasn’t requested it and/or contributed it
  • Fork the project
  • Start a feature/bugfix branch
  • Commit and push until you are happy with your contribution
  • Make sure to add tests for it. This is important so I don’t break it in a future version unintentionally.
  • Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
  • Feel free to send a pull request if you think others (me, for example) would like to have your change incorporated into future versions of random_ipsum.

License

Copyright © 2010-2014 Peter Horn, metaminded UG

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.