+<?php
+
+namespace App\Console\Commands;
+
+use App\Models\ChatLib;
+use Illuminate\Console\Command;
+
+class ChatlibGenerate extends Command {
+
+ /**
+ * The name and signature of the console command.
+ *
+ * @var string
+ */
+ protected $signature = 'chatlib:generate {which=de} {amount=50}';
+
+ /**
+ * The console command description.
+ *
+ * @var string
+ */
+ protected $description = 'Generates samples from a ChatLib database';
+
+ /**
+ * Execute the console command.
+ *
+ * @return int
+ */
+ public function handle() {
+ $db = new ChatLib();
+ $db->loadFrom($this->argument('which'));
+
+ $amount = intval($this->argument('amount'));
+ for ($i = 0; $i < $amount; ++$i) {
+ $this->line($db->generate());
+ }
+
+ return 0;
+ }
+
+}
+
+?>