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 135
 It might be nice to have delayed evaluation for render results. More tests.
136 136
 
137 137
 
138
+INSTALLATION (mulle-scion command line tool only)
139
+=============
140
+
141
+```
142
+brew install mulle-kybernetik/software/mulle-scion
143
+```
144
+
145
+USAGE mulle-scion
146
+=============
147
+
148
+```
149
+Usage:
150
+   mulle-scion [options] <input> <datasource> [output] [arguments]
151
+
152
+Options:
153
+   -w       : start webserver for /usr/local/share/mulle-scion/dox
154
+   -z       : write compressed archive to outputfile
155
+   -Z       : write compressed keyed archive to outputfile (for IOS)
156
+
157
+Input:
158
+   -        : Read template from stdin
159
+   template : a MulleScion template path or URL
160
+
161
+Datasource:
162
+   -        : Read data from stdin (only if input is not stdin already)
163
+   args     : use arguments as datasource (see below)
164
+   bundle   : a NSBundle. It's NSPrincipalClass will be used as the datasource
165
+   plist    : a property list path or URL as datasource, see: plist(5)
166
+   none     : empty datasource
167
+
168
+Output:
169
+   -        : Write result to stdout
170
+   file     : Write result to file
171
+
172
+Arguments:
173
+   key=value: key/value pairs to be used as __ARGV__ contents
174
+              (unless args as datasource was specified)
175
+
176
+Examples:
177
+   echo '***{{ VALUE }}***' | mulle-scion - args - VALUE="VfL Bochum 1848"
178
+   echo '***{{ __ARGV__[ 0]}}***' | mulle-scion - none - "VfL Bochum 1848"
179
+```
180
+
181
+
138 182
 AUTHOR
139 183
 =============
140 184
 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 82
 "              (unless args as datasource was specified)\n"
83 83
 "\n"
84 84
 "Examples:\n"
85
-"   echo '***{{ VALUE }}***' | mulle-scion - args - VALUE=\"VfL Bochum 1848\"\n"
85
+"   echo '***{{ VALUE }}***' | mulle-scion - args - VALUE=\"VfL Bochum 1848\"\n"
86 86
 "   echo '***{{ __ARGV__[ 0]}}***' | mulle-scion - none - \"VfL Bochum 1848\"\n"
87 87
    );
88 88
 }
... ...
@@ -475,7 +477,7 @@ static int   main_www( int argc, char *argv[])
475 475
    loadBundles();
476 476
 
477 477
    root = [NSString stringWithCString:DOCUMENT_ROOT];
478
-   
478
+
479 479
    // hack to get something else going
480 480
    if( argc)
481 481
       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