Skip to content

Instantly share code, notes, and snippets.

@0xItx
Created March 27, 2016 12:59
Show Gist options
  • Save 0xItx/2ec924f87023c61f4a98 to your computer and use it in GitHub Desktop.
Save 0xItx/2ec924f87023c61f4a98 to your computer and use it in GitHub Desktop.
Israel Post (דואר ישראל) command-line pacakge tracker
# Stick it somewhere and source it :)
pkg_tracker() {
for pkg in "$@"; do
echo -n "${pkg}: "
curl -s "http://www.israelpost.co.il/itemtrace.nsf/trackandtraceJSON?openagent&lang=EN&itemcode=${pkg}" |
python2 -c "import sys, json; print json.load(sys.stdin)['itemcodeinfo'].split('<script')[0]"
done
}
@yisraeldov
Copy link

Hi

I updated your script so that it will work with piping the output out etc

https://gist.github.com/yisraeldov/c1587fc04fd99c944f644e3675f8c97c#file-pkg_tracker-sh

can have a window watch

watch -n 180  --color --differences israepost.sh LB273161534

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment