1 |
8726
|
aaronmk
|
#!/bin/bash -e
|
2 |
|
|
# reformats index.htm for display
|
3 |
|
|
. "$(dirname "${BASH_SOURCE[0]}")"/../../lib/local.run
|
4 |
|
|
|
5 |
|
|
if self_not_included; then
|
6 |
|
|
|
7 |
|
|
export linked_file="${BASH_SOURCE[0]%.run}"
|
8 |
|
|
|
9 |
|
|
clean_up ()
|
10 |
|
|
{
|
11 |
|
|
echo_func "$@"
|
12 |
|
|
echo_run in_place "$linked_file" repl \
|
13 |
|
|
"$root_dir"/lib/Firefox_bookmarks.reformat.csv
|
14 |
8741
|
aaronmk
|
echo_run in_place "$linked_file" repl /dev/fd/3 3<<'EOF'
|
15 |
|
|
|
16 |
|
|
(?:(?<=^<TITLE>)|(?<=^<H1>))Bookmarks(?: Menu)?(?=</),BIEN links
|
17 |
|
|
EOF
|
18 |
8726
|
aaronmk
|
}
|
19 |
|
|
|
20 |
|
|
all ()
|
21 |
|
|
{
|
22 |
|
|
echo_func "$@"
|
23 |
|
|
clean_up
|
24 |
|
|
}
|
25 |
|
|
|
26 |
|
|
fi
|