summaryrefslogtreecommitdiff
path: root/rc
diff options
context:
space:
mode:
authorSigrid <ftrvxmtrx@gmail.com>2021-04-13 11:26:55 +0200
committerSigrid <ftrvxmtrx@gmail.com>2021-04-13 11:26:55 +0200
commitb777d3fe7d947c7bb9595aed5a571e311872b5f6 (patch)
tree013dfb3325e73ecd64c7ed338193d24b2652cfb9 /rc
parentfd4e8eef0b14200982c7ef08dcb978445f32c866 (diff)
downloadplan9front-b777d3fe7d947c7bb9595aed5a571e311872b5f6.tar.xz
remove old, broken scripts: fedex, u(s)ps, weather (thanks fulton)
Diffstat (limited to 'rc')
-rwxr-xr-xrc/bin/fedex62
-rwxr-xr-xrc/bin/ups15
-rwxr-xr-xrc/bin/usps20
-rwxr-xr-xrc/bin/weather46
4 files changed, 0 insertions, 143 deletions
diff --git a/rc/bin/fedex b/rc/bin/fedex
deleted file mode 100755
index 0925f8283..000000000
--- a/rc/bin/fedex
+++ /dev/null
@@ -1,62 +0,0 @@
-#!/bin/rc
-
-if(! ~ $#* 1) {
- echo usage: fedex 123456789012 >[1=2]
- exit usage
-}
-
-rfork e
-
-fn bgrep{
-pattern=`{echo $1 | sed 's;/;\\&;'}
-shift
-
-@{ echo 'X {
-$
-a
-
-.
-}
-X ,x/(.+\n)+\n/ g/'$pattern'/p' |
-sam -d $* >[2]/dev/null
-}
-}
-
-fn awk2 {
- awk 'NR%2==1 { a=$0; }
- NR%2==0 { b=$0; printf("%-30s %s\n", a, b); }
- ' $*
-}
-
-fn awk3 {
- awk '{line[NR] = $0}
- END{
- i = 4;
- while(i < NR){
- what=line[i++];
- when=line[i];
- comment="";
- if(!(when ~ /..\/..\/.... ..:../)){
- # out of sync
- printf("%s\n", what);
- continue;
- }
- i++;
- if(!(line[i+1] ~ /..\/..\/.... ..:../) &&
- (i+2 > NR || line[i+2] ~ /..\/..\/.... ..:../)){
- what = what ", " line[i++];
- }
- printf("%s %s\n", when, what);
- }
- }' $*
-}
-
-# hget 'http://www.fedex.com/cgi-bin/track_it?airbill_list='$1'&kurrent_airbill='$1'&language=english&cntry_code=us&state=0' |
-hget 'http://www.fedex.com/Tracking?action=track&language=english&cntry_code=us&initial=x&mps=y&tracknumbers='$1 |
- htmlfmt >/tmp/fedex.$pid
-sed -n '/Tracking number/,/^$/p' /tmp/fedex.$pid | awk2
-echo
-sed -n '/Reference number/,/^$/p' /tmp/fedex.$pid | awk2
-echo
-sed -n '/Date.time/,/^$/p' /tmp/fedex.$pid | sed 1,4d | fmt -l 4000 | sed 's/ [A-Z][A-Z] /&\n/g'
-rm /tmp/fedex.$pid
diff --git a/rc/bin/ups b/rc/bin/ups
deleted file mode 100755
index 025634822..000000000
--- a/rc/bin/ups
+++ /dev/null
@@ -1,15 +0,0 @@
-#!/bin/rc
-# ups - look up a UPS tracking number
-rfork en
-
-if(! ~ $#* 1) {
- echo usage: ups 1ZA41W190338680961 >[1=2]
- exit usage
-}
-
-hget 'http://wwwapps.ups.com/WebTracking/processInputRequest?tracknum='^$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'
diff --git a/rc/bin/usps b/rc/bin/usps
deleted file mode 100755
index ab5e489ad..000000000
--- a/rc/bin/usps
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/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 |
- htmlfmt > /tmp/usps.$pid
-
-sam -d /tmp/usps.$pid >[2] /dev/null <<'!'
-,/Tracking Number:/-1d
-/Available Actions/,$d
-,p
-!
-rm /tmp/usps.$pid
diff --git a/rc/bin/weather b/rc/bin/weather
deleted file mode 100755
index 0f3f0a091..000000000
--- a/rc/bin/weather
+++ /dev/null
@@ -1,46 +0,0 @@
-#!/bin/rc
-
-rfork e
-
-DEFAULT=ewr
-
-fn usage{
- echo 'usage: weather 3-letter-city-code' >[1=2]
- echo 'for a list of cities in new york, say' >[1=2]
- echo ' weather ny' >[1=2]
- exit usage
-}
-
-switch($#*){
-case 0
- arg=$DEFAULT
- if(~ $#weather 1)
- arg=$weather
-case 1
- arg=$1
-case *
- usage
-}
-
-switch($arg){
-case [a-zA-Z][a-zA-Z][a-zA-Z]
- script=('' '' 'C' '4' '1' '1' $arg '' '' '' '' 'X')
-case [a-zA-Z][a-zA-Z]
- script=('' '' 'C' '4' '1' '3' $arg '' '' '' '' 'X')
-case *
- usage
-}
-
-{
- for(i in $script)
- echo $i
-} |
-con -nrl tcp!rainmaker.wunderground.com!telnet |
-sed -n '/Enter .-letter .* code:/,/CITY FORECAST MENU/p' |
-sed 's/Enter .-letter .* code: //' |
-sed 's/ Press Return to continue, M to return to menu, X to exit: //' |
-grep -v 'CITY FORECAST MENU' |
-tr -d ' ' |
-sed 's/ *$//' |
-uniq |
-sed -n '/^VTEC/q; p'