Legacy text randomizer and ad generator project with two runtimes:
- WordPress plugin mode.
- Standalone CLI mode.
- Category: legacy utility / WordPress plugin.
- Main plugin entrypoint:
ad-generator.php. - Main CLI entrypoint:
ad-generator-cli.php.
- Plugin shortcode:
[ad_generator]. - Core randomization engine:
includes/Randomizer.php(+includes/Node.php). - Plugin metadata indicates legacy compatibility (
Requires WP 3.8,Tested up to 5.6,Requires PHP 5.4). - Localization files are in
languages/.
- Usage example:
php ad-generator-cli.php -n 300 -f template.txt -o result.txt. - Required argument: template file via
-f/--file. - Optional arguments:
-n/-Nnumber of variants (default300).-o/--outoutput file (defaultresult-N.txt).-h/--helphelp.
- Alternatives:
{a|b|c}. - Optional block:
{|text}. - Permutations:
[a|b|c]. - Permutations with delimiter:
[+,+a|b|c]. - Random digit:
%rand%. - Escaping:
\{,\},\|,\[,\],\+,\\.
- Treat this repository as legacy: avoid broad refactors unless explicitly requested.
- Keep randomization syntax backward-compatible (plugin and CLI share same engine).
- Keep shortcode name
[ad_generator]unchanged for existing WP pages. - Preserve CLI argument compatibility and output defaults to avoid breaking existing scripts.