Skip to content
This repository
tree: 4021f5ee2c
Fetching contributors…

Cannot retrieve contributors at this time

executable file 26 lines (17 sloc) 0.619 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
#!/usr/bin/env python

# Requirements
# pip install pyquery requests
# PyQuery: http://pypi.python.org/pypi/pyquery
# Requests: http://docs.python-requests.org/en/latest/index.html

import subprocess, sys


def main():

    output = subprocess.check_output('git log --no-merges -1 --pretty=oneline', shell=True)

    hash, title = output.split(' ', 1)

    try:
        from fabric.colors import blue
        sys.stderr.write(blue(title))
    except ImportError:
        sys.stderr.write('%s' % title)

    sys.stdout.write('https://github.com/pculture/unisubs/commit/%s' % hash)

if __name__ == '__main__':
    main()
Something went wrong with that request. Please try again.