Project

General

Profile

1
#!/bin/bash -e
2
. "$(dirname "${BASH_SOURCE[0]}")"/table.run
3
. "$(dirname "${BASH_SOURCE[0]}")"/../../lib/sh/web.sh
4

    
5
if self_not_included; then
6

    
7
*.htm/make()
8
{
9
	echo_func; set_make_vars; check_wildcard_target_exists
10
	local letter_range="${letter_range-[A-Z]}"
11
	local rank="${table%_homonyms}"
12
	curl --output '#1.htm' "http://www.marine.csiro.au/mirrorsearch/ir_search.list_homonyms?hlevel=$rank&start_letter=$letter_range&restrict_by=pln&output_style=delim_rows"
13
}
14

    
15
*.txt/make()
16
{
17
	echo_func; set_make_vars; deferred_check_target_exists
18
	*.htm/make
19
	for in in "$top_dir"/*.htm; do
20
		stdout="${in/%.htm/.txt}" to_file grep -vE '^<' "$in" # strip tags
21
	done
22
}
23

    
24
func_override import__table_run
25
import()
26
{
27
	echo_func; set_make_vars
28
	*.txt/make
29
	self_make import__table_run "$@"
30
}
31

    
32
fi
(3-3/7)