annotate bin/normXML @ 2:f9d4af74e3d0
convert firefox bookmarks file to xml, e.g. for making a new ~/u/New_Tabs.py
| author |
Henry S. Thompson <ht@inf.ed.ac.uk> |
| date |
Tue, 18 Aug 2026 15:38:14 +0100 |
| parents |
2aa53823fb21 |
| children |
|
| rev |
line source |
|
0
|
1 #!/bin/sh
|
|
|
2 if [ "$1" = "-w" ]
|
|
|
3 then
|
|
|
4 shift
|
|
|
5 rxp -c ASCII -o 1 "$@" | sed '/0/s/ISO-646/utf-8/;s/	/ /g;s/> * *</>\
|
|
|
6 </g;s/ / /g' | tr -s ' ' ' ' | sed '/></s@<\([_.a-zA-Z][^ >]*\)\([^>]*\)></\1>@<\1\2/>@g;s/> *</>\
|
|
|
7 </g'
|
|
|
8 else
|
|
|
9 rxp -d "$@"
|
|
|
10 fi
|