summaryrefslogtreecommitdiff
path: root/rc/bin/usps
blob: dfdd78ccf74d3cb04ee67f4961e72d2afcb2a434 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/rc
rfork en


if(! ~ $#* 1) {
	echo usage: usps 01601531218002685498 >[1=2]
	exit usage
}

rfork e

hget -p 'qtc_tLabels1='^$1 https://tools.usps.com/go/TrackConfirmAction |
	uhtml | htmlfmt > /tmp/usps.$pid

sam -d /tmp/usps.$pid >[2] /dev/null <<'!'
,/Your Label Number/-1d
/Check on Another Item/,$d
/id=\"error-tLabels\"/,$d
,p
!
rm /tmp/usps.$pid