summary refs log tree commit diff stats
path: root/gmi2html.awk
diff options
context:
space:
mode:
Diffstat (limited to 'gmi2html.awk')
-rwxr-xr-xgmi2html.awk11
1 files changed, 7 insertions, 4 deletions
diff --git a/gmi2html.awk b/gmi2html.awk
index e1850a3..0193e6e 100755
--- a/gmi2html.awk
+++ b/gmi2html.awk
@@ -18,7 +18,10 @@
 # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #
 # usage:
-#   $ awk -f gmi2html.awk -- <title> <css> <url> < path/to/gmi > path/to/html
+#   $ awk -f gmi2html.awk \
+#       -v title=<title> \
+#       -v css=<css> \
+#       -v url=<url> < path/to/gmi > path/to/html
 #
 # parameters:
 #   <title>: the title of the document, used in the HTML <title>
@@ -35,9 +38,9 @@ BEGIN {
 <link rel=\"stylesheet\" type=\"text/css\" href=\"%s\">\
 <title>%s</title>\
 </head>\
-<body>", ARGV[2], ARGV[1]
+<body>", css, title
 
-    pre  = 0
+    pre = 0
     list = 0
 }
 
@@ -171,5 +174,5 @@ Also available on <a href=\"gemini://%s\">Gemini</a>\
 </small>\
 </footer>\
 </body>\
-</html>", ARGV[3]
+</html>", url
 }
='#n17'>17 18 19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42