Created
March 27, 2016 12:59
-
-
Save 0xItx/2ec924f87023c61f4a98 to your computer and use it in GitHub Desktop.
Israel Post (דואר ישראל) command-line pacakge tracker
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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