Browse code

update dox

Nat! authored on 13-06-2017 13:08:28
Showing 3 changed files
... ...
@@ -71,6 +71,7 @@ This is the general architecture of *MulleScion*
71 71
 enough iterations to pronounce it "ready for production".
72 72
 
73 73
 
74
+
74 75
 TOOLS
75 76
 =============
76 77
 There is an interactive editor available for OS X called [MulleScionist](http://www.mulle-kybernetik.com/software/git/MulleScionist/),
... ...
@@ -135,6 +136,50 @@ TODO
135 136
 It might be nice to have delayed evaluation for render results. More tests.
136 137
 
137 138
 
139
+INSTALLATION (mulle-scion command line tool only)
140
+=============
141
+
142
+```
143
+brew install mulle-kybernetik/software/mulle-scion
144
+```
145
+
146
+USAGE mulle-scion
147
+=============
148
+
149
+```
150
+Usage:
151
+   mulle-scion [options] <input> <datasource> [output] [arguments]
152
+
153
+Options:
154
+   -w       : start webserver for /usr/local/share/mulle-scion/dox
155
+   -z       : write compressed archive to outputfile
156
+   -Z       : write compressed keyed archive to outputfile (for IOS)
157
+
158
+Input:
159
+   -        : Read template from stdin
160
+   template : a MulleScion template path or URL
161
+
162
+Datasource:
163
+   -        : Read data from stdin (only if input is not stdin already)
164
+   args     : use arguments as datasource (see below)
165
+   bundle   : a NSBundle. It's NSPrincipalClass will be used as the datasource
166
+   plist    : a property list path or URL as datasource, see: plist(5)
167
+   none     : empty datasource
168
+
169
+Output:
170
+   -        : Write result to stdout
171
+   file     : Write result to file
172
+
173
+Arguments:
174
+   key=value: key/value pairs to be used as __ARGV__ contents
175
+              (unless args as datasource was specified)
176
+
177
+Examples:
178
+   echo '***{{ VALUE }}***' | mulle-scion - args - VALUE="VfL Bochum 1848"
179
+   echo '***{{ __ARGV__[ 0]}}***' | mulle-scion - none - "VfL Bochum 1848"
180
+```
181
+
182
+
138 183
 AUTHOR
139 184
 =============
140 185
 Coded by Nat!
... ...
@@ -54,7 +54,9 @@ static NSString  *processName( void);
54 54
 
55 55
 static void   usage( void)
56 56
 {
57
-   fprintf( stderr, "Usage:\n   %s [options] <input> [datasource] [output] [arguments]\n", [processName() cString]);
57
+   fprintf( stderr, "Usage:\n"
58
+                    "   %s [options] <input> <datasource> [output] [arguments]\n",
59
+                        [processName() cString]);
58 60
    fprintf( stderr,
59 61
 "\n"
60 62
 "Options:\n"
... ...
@@ -82,7 +84,7 @@ static void   usage( void)
82 84
 "              (unless args as datasource was specified)\n"
83 85
 "\n"
84 86
 "Examples:\n"
85
-"   echo '***{{ VALUE }}***' | mulle-scion - args - VALUE=\"VfL Bochum 1848\"\n"
87
+"   echo '***{{ VALUE }}***' | mulle-scion - args - VALUE=\"VfL Bochum 1848\"\n"
86 88
 "   echo '***{{ __ARGV__[ 0]}}***' | mulle-scion - none - \"VfL Bochum 1848\"\n"
87 89
    );
88 90
 }
... ...
@@ -475,7 +477,7 @@ static int   main_www( int argc, char *argv[])
475 477
    loadBundles();
476 478
 
477 479
    root = [NSString stringWithCString:DOCUMENT_ROOT];
478
-   
480
+
479 481
    // hack to get something else going
480 482
    if( argc)
481 483
       s = argv[ 0];
... ...
@@ -3,7 +3,7 @@
3 3
 .Os Darwin
4 4
 .Sh NAME       
5 5
 .Nm mulle-scion
6
-.Nd creates text output from a template and a property list.
6
+.Nd create text output from a template and a property list.
7 7
 .Sh SYNOPSIS      
8 8
 .Nm
9 9
 .Op Fl w z Z
... ...
@@ -47,15 +47,14 @@ be read from standard input.
47 47
 .It Ar plist  
48 48
 A property list filename or URL. If you give '-' as a path, the property list will 
49 49
 be read from standard input, unless you already used '-' for the template.
50
-You can also give 'none' for no property list. Giving the keyword 'keyvalue'
51
-makes mulle-scion treat the arguments as key value pairs for a datasource plist
52
-instead.
50
+You can also give 'none' for no property list. Giving the keyword 'args
51
+makes mulle-scion treat the arguments as key value pairs for a datasource plist.
53 52
 .It Ar outputfile
54 53
 The output file to write the output to. If this parameter is '-' or omitted, the 
55 54
 output is written to standard output.
56 55
 .It Ar arguments
57 56
 All other trailing arguments are collected and are available as an array in the
58
-MulleScion variable __ARGV__, unless 'keyvalue' has been set. In which case the
57
+MulleScion variable __ARGV__, unless 'args' has been set. In which case the
59 58
 arguments become the datasource.
60 59
 .El 
61 60
 .Pp