Add deflist generation

Change-Id: I28282a23e0fee65191db6f45d87a02664a19acdf
diff --git a/script/cosmasvc2koralquery b/script/cosmasvc2koralquery
index a95605f..2e20568 100755
--- a/script/cosmasvc2koralquery
+++ b/script/cosmasvc2koralquery
@@ -19,10 +19,12 @@
 my $cmd = shift @ARGV;
 
 
-my $input;
+my ($input, $output, $copysrc);
 
 GetOptions (
-  "input|i=s" => \$input
+  "input|i=s" => \$input,
+  "output|o=s" => \$output,
+  "copy-src|c=s" => \$copysrc,
 )
 or die("Error in command line arguments\n");
 
@@ -34,7 +36,18 @@
   $ perl cosmasvc2koralquery def my_vc.txt | gzip -vc > my_vc.jsonld.gz
   $ cat my_vc.txt | perl cosmasvc2koralquery def - | gzip -vc > my_vc.jsonld.gz
 
-Commands: def, list
+Command: def
+
+  Convert a def file or a list of sigles to a KoralQuery VC.
+
+  Takes the list or def from STDIN and exports to STDOUT.
+
+Command: list
+
+  Convert a list with copy or regex instructions to KoralQuery VCs.
+
+  --output: The output directory
+  --copy-src: The directory for def files to copy
 
 HELP
 exit 1;
@@ -43,7 +56,11 @@
 
 # Process a list
 if ($cmd eq 'list') {
-  KorAP::DefList->new($input || $ARGV[0])->parse;
+  KorAP::DefList->new(
+    file => ($input || $ARGV[0]),
+    copy => ($copysrc || '.'),
+    output => ($output || '.')
+  )->parse;
   exit(0);
 };