A revival of Jeff Holman's nonsense generator. Original script: http://www.jholman.com/scripts/nonsense/ (note that there are reports of malware on this site and it might not be the original site any more).
This project is still in very early development. In other words, the code isn't fully converted, optimized,
or even pretty. The sentence and title generators reply on the word lists in the db
folder.
See example.php
for an example of use and some configuration and how to use it outside of WP-CLI.
wp --require=nonsentences.php nonsentences generate_posts
'min_sentences' => 3,
'max_sentences' => 20,
'min_paragraphs' => 2,
'max_paragraphs' => 10,
'post_type' => 'post',
'number_of_posts' => 10,
post_type
is currently not checked for validity.
The number of sentences in a paragraph is a random number between the two relevant parameters.
The number of paragraphs per post is a random number between the two relevant parameters.
A single optional taxonomy and term (or comma-separated list of terms) can be added as well via:
'taxonomy' => 'taxonomy_slug',
'taxonomy_term' => 'taxonomy term',
- Add additional WP-CLI support to generate a post or posts with generated content.
- Document options for code-based usage.
- Restructure as WordPress plugin that includes WP-CLI functionality and wp-admin
- Changed function calls to use non-deprecated (or removed) functions
- Added rudimentary taxonomy support
- Fixed a bug in specific word types that casued them to be added as one-character instead of the full word
- Verified working in PHP 7.2
- Initial work to add WP-CLI integration via
generate_posts
- Rename
index.php
toexample.php
- Add
.gitignore
to allow a WordPress installation inwp/
folder and WordPressindex.php
andwp-config.php
in root
- Abstract word list generator into wrappable
get_words()
method - Change
sentence()
method to wrapget_words()
- Add support for titles, including word list structure, using
get_words()
- Add logic to add WP-CLI support in main file
- Add stub for WP-CLI support
- Add additional "normal" sentence structure duplicates
- Add paragraphs output
- Add passed parameters to control the number of paragraphs, sentences, and a paragraph wrapper.
- Removed dead code
- Imported latest known version of "nonsense generator"
- Edits to word lists
- Added new sentence structures
- Code refactoring for PHP5