Browse code

Dynamically update README.md from manages using mulls-markdown-utilities

Nat! authored on 12/02/2013 21:22:51
Showing 6 changed files
... ...
@@ -6,8 +6,7 @@ mulle-plist-from-files.xcodeproj/xcuserdata
6 6
 mulle-plist-from-files.xcodeproj/project.xcworkspace
7 7
 mulle-plist-compress/mulle-plist-compress
8 8
 mulle-plist-from-files/mulle-plist-from-files
9
-mulle-plist-utilities.xcodeproj/project.xcworkspace/contents.xcworkspacedata
10
-mulle-plist-utilities.xcodeproj/project.xcworkspace/xcuserdata/nat.xcuserdatad/UserInterfaceState.xcuserstate
11
-mulle-plist-utilities.xcodeproj/project.xcworkspace/xcuserdata/nat.xcuserdatad/WorkspaceSettings.xcsettings
12
-mulle-plist-utilities.xcodeproj/xcuserdata/nat.xcuserdatad/xcdebugger/Breakpoints.xcbkptlist
13
-mulle-plist-utilities.xcodeproj/xcuserdata/nat.xcuserdatad/xcschemes/xcschememanagement.plist
14 9
\ No newline at end of file
10
+mulle-plist-utilities.xcodeproj/project.xcworkspace
11
+mulle-plist-utilities.xcodeproj/xcuserdata
12
+mulle-plist-fix/mulle-plist-fix
13
+mulle-plist-hack/mulle-plist-hack
15 14
new file mode 100644
... ...
@@ -0,0 +1,8 @@
0
+---
1
+
2
+## Author
3
+
4
+     Coded by Nat! 2013, Mulle kybernetiK. www.mulle‐kybernetik.com. The
5
+     lastest version should be available on github. http://github.com/mulle‐
6
+     nat/mulle‐plist‐utilities
7
+
0 8
new file mode 100644
... ...
@@ -0,0 +1,7 @@
0
+# mulle-plist-utilties
1
+
2
+Just say *sudo make install* and the files will end up in /usr/local.
3
+
4
+---
5
+
6
+## man pages
0 7
new file mode 100755
... ...
@@ -0,0 +1,36 @@
0
+#! /bin/sh
1
+
2
+if [ ! -d .ugly ]
3
+then
4
+   echo "fail"
5
+   exit 1
6
+fi
7
+
8
+cat .ugly/README.md.header 
9
+
10
+#
11
+# need mulle-markdown-utilities to generate this
12
+#
13
+n=0
14
+for i in $*
15
+do
16
+  n=`expr $n + 1`
17
+done 
18
+
19
+i=0
20
+for manpage in $*
21
+do
22
+   n=`expr $i + 1`
23
+   if [ -f "$manpage" ]
24
+   then
25
+      echo "##" `basename $manpage .8` 
26
+      mulle-markdown-man-page-hack.sh < "$manpage" 
27
+      if [ $i -lt $n ] 
28
+      then
29
+         echo "---"
30
+      fi
31
+   fi
32
+done
33
+
34
+cat .ugly/README.md.footer
35
+
... ...
@@ -1,7 +1,12 @@
1 1
 #
2 2
 # old skool Makefile by Nat!
3 3
 #
4
-all:
4
+MANPAGES = mulle-plist-from-files/mulle-plist-from-files.8 \
5
+	mulle-plist-compress/mulle-plist-compress.8 \
6
+	mulle-plist-fix/mulle-plist-fix.8 \
7
+	mulle-plist-hack/mulle-plist-hack.8 
8
+
9
+all:	README.md
5 10
 	( cd mulle-plist-from-files; make )	
6 11
 	( cd mulle-plist-compress; make )	
7 12
 	( cd mulle-plist-fix; make )
... ...
@@ -19,3 +24,6 @@ install:
19 19
 	( cd mulle-plist-fix; make install )
20 20
 	( cd mulle-plist-hack; make install )	
21 21
 
22
+README.md:	.ugly/README.md.header .ugly/README.md.footer $(MANPAGES)
23
+	.ugly/update-README.md.sh $(MANPAGES) > README.md
24
+
... ...
@@ -1,82 +1,190 @@
1
-mulle-plist-utilties
2
-======================
1
+# mulle-plist-utilties
3 2
 
4 3
 Just say *sudo make install* and the files will end up in /usr/local.
5 4
 
6
-man pages
7
-=========
8
-NAME
5
+---
9 6
 
10
-     mulle‐plist‐from‐files — Combine multiple files into a single property
11
-     list
7
+## man pages
8
+## mulle-plist-compress
12 9
 
13
-SYNOPSIS
10
+<p style="margin-top: 1em" valign="top"><b>NAME</b></p>
14 11
 
15
-     mulle‐plist‐from‐files file [file ...]
12
+<p style="margin-left:8%;"><b>mulle-plist-compress</b>
13
+&mdash; Compress and format a property list for inclusion in
14
+C code.</p>
16 15
 
17
-DESCRIPTION
18 16
 
19
-     Reads, possibly recursively, a bunch of files and creates a property
20
-     plist from them. This property list is then written to standard output.
17
+<p style="margin-top: 1em" valign="top"><b>SYNOPSIS</b></p>
21 18
 
19
+<p style="margin-left:40%;"><b>mulle-plist-compress</b>
20
+[<b>&minus;s&nbsp;</b><i>style</i>]
21
+[<b>&minus;c&nbsp;</b><i>compression</i>]
22
+[<b>&minus;f&nbsp;</b><i>format</i>]</p>
22 23
 
23
-NAME
24 24
 
25
-     mulle‐plist‐compress — Compress and format a property list for inclusion
26
-     in C code.
25
+<p style="margin-top: 1em" valign="top"><b>DESCRIPTION</b></p>
27 26
 
28
-SYNOPSIS
27
+<p style="margin-left:8%;">Reads a <i>property plist</i>
28
+from standard input and writes it&rsquo;s result to standard
29
+output. The <i>property list</i> is by default space
30
+optimized and escaped to be used in a C-String. The options
31
+are processed in the order s, c, f.</p>
29 32
 
30
-     mulle‐plist‐compress [−s style] [−c compression] [−f format]
33
+<p style="margin-left:8%; margin-top: 1em">The following
34
+options are available:</p>
31 35
 
32
-DESCRIPTION
33 36
 
34
-     Reads a property plist from standard input and writes it’s result to
35
-     standard output. The property list is by default space optimized and
36
-     escaped to be used in a C‐String. The options are processed in the order
37
-     s, c, f.
37
+<p style="margin-top: 1em" valign="top"><b>&minus;s</b></p>
38 38
 
39
-     The following options are available:
39
+<p style="margin-left:22%; margin-top: 1em">Change the
40
+style of the produced property list:</p>
40 41
 
41
-     −s       Change the style of the produced property list:
42 42
 
43
-              condensed only outputs a minimal number of characters for the
44
-              property list (default).
43
+<p style="margin-left:22%; margin-top: 1em"><b>condensed</b>
44
+only outputs a minimal number of characters for the property
45
+list (default).</p>
45 46
 
46
-              pretty is the output created by ‐[NSObject description].
47
+<p style="margin-left:22%; margin-top: 1em"><b>pretty</b>
48
+is the output created by -[NSObject description].</p>
47 49
 
48
-              xml produces XML property list output.  binary produces binary
49
-              property list output.
50
+<p style="margin-left:22%; margin-top: 1em"><b>xml</b>
51
+produces XML property list output. <b>binary</b> produces
52
+binary property list output.</p>
50 53
 
51
-     −c       Use a binary compression method:
52 54
 
53
-              none to not compress (default), use
55
+<p style="margin-top: 1em" valign="top"><b>&minus;c</b></p>
54 56
 
55
-              zlib to create a zlib compressed blob.
57
+<p style="margin-left:22%; margin-top: 1em">Use a binary
58
+compression method:</p>
56 59
 
57
-     −f       Choose an output format:
60
+<p style="margin-left:22%; margin-top: 1em"><b>none</b> to
61
+not compress (default), use</p>
58 62
 
59
-              escaped for inclusion into a C‐String (default). Not useful in
60
-              combination with compression.
63
+<p style="margin-left:22%; margin-top: 1em"><b>zlib</b> to
64
+create a zlib compressed blob.</p>
61 65
 
62
-              plain for output as is.
63 66
 
64
-              hex to output in hexadecimal format for inclusion in a unsigned
65
-              char C‐Array.
67
+<p style="margin-top: 1em" valign="top"><b>&minus;f</b></p>
66 68
 
67
-ENVIRONMENT
69
+<p style="margin-left:22%; margin-top: 1em">Choose an
70
+output format:</p>
68 71
 
69
-     MULLE_PLIST_HEADER  The contents of this environment variable are
70
-                         prepended to the output.
72
+<p style="margin-left:22%; margin-top: 1em"><b>escaped</b>
73
+for inclusion into a C-String (default). Not useful in
74
+combination with compression.</p>
71 75
 
72
-     MULLE_PLIST_FOOTER  The contents of this environment variable are
73
-                         appended to the output.
76
+<p style="margin-left:22%; margin-top: 1em"><b>plain</b>
77
+for output as is.</p>
74 78
 
79
+<p style="margin-left:22%; margin-top: 1em"><b>hex</b> to
80
+output in hexadecimal format for inclusion in a unsigned
81
+char C-Array.</p>
82
+
83
+---
84
+## mulle-plist-fix
85
+
86
+<p style="margin-top: 1em" valign="top"><b>NAME</b></p>
87
+
88
+<p style="margin-left:8%;"><b>mulle-plist-fix</b> &mdash;
89
+Fix ancient property list files</p>
90
+
91
+
92
+<p style="margin-top: 1em" valign="top"><b>SYNOPSIS</b></p>
93
+
94
+<p style="margin-left:32%;"><b>mulle-plist-fix</b>
95
+<i>file</i> [<i>file&nbsp;...</i>]</p>
96
+
97
+
98
+<p style="margin-top: 1em" valign="top"><b>DESCRIPTION</b></p>
99
+
100
+<p style="margin-left:8%;">Reads very, very old <i>property
101
+list</i> format from standard input and a more modern
102
+<i>property plist</i> format is then then written to
103
+standard output.</p>
104
+
105
+---
106
+## mulle-plist-from-files
107
+
108
+<p style="margin-top: 1em" valign="top"><b>NAME</b></p>
109
+
110
+<p style="margin-left:8%;"><b>mulle-plist-from-files</b>
111
+&mdash; Combine multiple files into a single property
112
+list</p>
113
+
114
+
115
+<p style="margin-top: 1em" valign="top"><b>SYNOPSIS</b></p>
116
+
117
+<p style="margin-left:43%;"><b>mulle-plist-from-files</b>
118
+<i>file</i> [<i>file&nbsp;...</i>]</p>
119
+
120
+
121
+<p style="margin-top: 1em" valign="top"><b>DESCRIPTION</b></p>
122
+
123
+<p style="margin-left:8%;">Reads, possibly recursively, a
124
+bunch of files and creates a <i>property plist</i> from
125
+them. This <i>property list</i> is then written to standard
126
+output.</p>
127
+
128
+---
129
+## mulle-plist-hack
130
+
131
+<p style="margin-top: 1em" valign="top"><b>NAME</b></p>
132
+
133
+<p style="margin-left:8%;"><b>mulle-plist-hack,
134
+Other_name_for_same_program(), Yet another name for the same
135
+program.</b> &mdash; This line parsed for whatis
136
+database.</p>
137
+
138
+
139
+<p style="margin-top: 1em" valign="top"><b>SYNOPSIS</b></p>
140
+
141
+<p style="margin-left:35%;"><b>mulle-plist-hack,</b>
142
+[<b>&minus;abcd</b>] [<b>&minus;a&nbsp;</b><i>path</i>]
143
+[<i>file</i>] [<i>file&nbsp;...</i>] <i>arg0</i> arg2
144
+...</p>
145
+
146
+
147
+<p style="margin-top: 1em" valign="top"><b>DESCRIPTION</b></p>
148
+
149
+<p style="margin-left:8%;">Use the .Nm macro to refer to
150
+your program throughout the man page like such:
151
+<b>mulle-plist-hack,</b> Underlining is accomplished with
152
+the .Ar macro like this: <i>underlined text</i>.</p>
153
+
154
+<p style="margin-left:8%; margin-top: 1em">A list of items
155
+with descriptions:</p>
156
+
157
+<p style="margin-top: 1em" valign="top">item a</p>
158
+
159
+<p style="margin-left:22%; margin-top: 1em">Description of
160
+item a</p>
161
+
162
+<p style="margin-top: 1em" valign="top">item b</p>
163
+
164
+<p style="margin-left:22%; margin-top: 1em">Description of
165
+item b</p>
166
+
167
+<p style="margin-left:8%; margin-top: 1em">A list of flags
168
+and their descriptions:</p>
169
+
170
+
171
+<p style="margin-top: 1em" valign="top"><b>&minus;a</b></p>
172
+
173
+<p style="margin-left:22%; margin-top: 1em">Description of
174
+-a flag</p>
175
+
176
+
177
+<p style="margin-top: 1em" valign="top"><b>&minus;b</b></p>
178
+
179
+<p style="margin-left:22%; margin-top: 1em">Description of
180
+-b flag</p>
181
+
182
+---
183
+---
184
+
185
+## Author
75 186
 
76
-AUTHOR
77
-======
78 187
      Coded by Nat! 2013, Mulle kybernetiK. www.mulle‐kybernetik.com. The
79 188
      lastest version should be available on github. http://github.com/mulle‐
80 189
      nat/mulle‐plist‐utilities
190
+