summaryrefslogtreecommitdiff
path: root/ipl/progs/link2url.icn
diff options
context:
space:
mode:
Diffstat (limited to 'ipl/progs/link2url.icn')
-rw-r--r--ipl/progs/link2url.icn34
1 files changed, 34 insertions, 0 deletions
diff --git a/ipl/progs/link2url.icn b/ipl/progs/link2url.icn
new file mode 100644
index 0000000..19e2260
--- /dev/null
+++ b/ipl/progs/link2url.icn
@@ -0,0 +1,34 @@
+############################################################################
+#
+# File: link2url.icn
+#
+# Subject: Program to convert links to URLs
+#
+# Author: Ralph E. Griswold
+#
+# Date: September 1, 1998
+#
+############################################################################
+#
+# This file is in the public domain.
+#
+############################################################################
+#
+# This program takes HTML links from standard input, strips off the
+# tags and related material, and write the resulting URLs to standard
+# output.
+#
+############################################################################
+
+procedure main()
+ local line
+
+ while line := read() do {
+ line ? {
+ tab(find("<A" | "<a"))
+ tab(upto('"') + 1)
+ write(tab(upto('"')))
+ }
+ }
+
+end