Skip to content

Instantly share code, notes, and snippets.

@loisaidasam
Last active January 23, 2019 16:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save loisaidasam/2cb9bcc32312ca673c933ef07cdc706f to your computer and use it in GitHub Desktop.
Save loisaidasam/2cb9bcc32312ca673c933ef07cdc706f to your computer and use it in GitHub Desktop.
Check the current version of a lib on pypi
#!/bin/bash
###
# Check the current version of a lib on pypi
#
# https://gist.github.com/loisaidasam/2cb9bcc32312ca673c933ef07cdc706f
#
# Requires `curl` and [pup](https://github.com/ericchiang/pup)
###
lib="$1"
if [ -z $lib ]
then
echo "Usage: pypi-check <lib>";
exit 1;
fi
lib_url="https://pypi.org/project/$lib/"
echo $(curl -Ss "$lib_url" | pup --plain ".package-header__name text{}")
$ ./pypi-check scipy
scipy 1.2.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment