summaryrefslogtreecommitdiff
path: root/rc
diff options
context:
space:
mode:
authorstanley lieber <stanley.lieber@gmail.com>2013-08-06 21:36:11 -0400
committerstanley lieber <stanley.lieber@gmail.com>2013-08-06 21:36:11 -0400
commitcc542f2b2d8102b2e18662b8a7cae87c0a849506 (patch)
tree6f2ca232fe23e02c56b0bdd8e457e46029f7a310 /rc
parent3663ffeefacb34fc131b3ca8995783ce8dc1bd83 (diff)
ups: give me my computer
Diffstat (limited to 'rc')
-rwxr-xr-xrc/bin/ups26
1 files changed, 5 insertions, 21 deletions
diff --git a/rc/bin/ups b/rc/bin/ups
index e1ad56ca6..6d1223d4b 100755
--- a/rc/bin/ups
+++ b/rc/bin/ups
@@ -8,25 +8,9 @@ if(! ~ $#* 1) {
}
hget 'http://wwwapps.ups.com/WebTracking/processInputRequest?tracknum='^$1^ \
- '&TypeOfInquiryNumber=T' >/tmp/ups.1
+ '&TypeOfInquiryNumber=T' |
+ htmlfmt |
+ awk '/^Share/,/^Subscribe/ {print;}' |
+ grep -v '^(Share|Change Delivery|Request Status Updates|Never Track Again|Continue|I am already a UPS My Choice Member|• What|Subscribe to UPS)' |
+ ssam 's/\n\n\n/\n/g'
-sed 's/<[Tt][Dd]>/& «TD»/g; s/<[Tt][Rr]>/&<td> «TR» /g' /tmp/ups.1 |
- htmlfmt >/tmp/ups.2
-sam -d /tmp/ups.2 >[2] /dev/null <<'!'
-/^Tracking results.*/p
-.,$d
-/Help/d
-1,.d
-$-2,$d
-/Status:/+1
-.,/«TR»/-2d
-,s/\n/ /g
-,s/«TR»/\n/g
-,s/«TD»/ /g
-,s/ * */ /g
-,s/^[ ]*//g
-,s/[ ]*$//g
-,s/\n\n+/\n\n/g
-,p
-!
-echo