Source

Bitbucket Issue Parser / bitbucket_issue_parser.py

Full commit
import os
import json
import bitbucket
from config import username, password

bb = bitbucket.BitBucket(username, password)
dsr = bb.user('dsr')
repository = dsr.repository('recipe')
repository_issues = repository.issues()
user_name = os.getenv('LOGNAME')
desktop = "/Users/{0}/Desktop".format(user_name)

def parse(json_file):
    f_out = open(desktop + "/test.html", "w")
    for key in repository_issues.iterkeys():
        if key == 'issues':
            for item in repository_issues[key]:
                for description in item.iterkeys():
                    if description == 'status':
                        if item[description] != 'resolved':
                            print(item['title'])
                            f_out.write(item['title'])
                            f_out.write("<br />")
       
    f_out.close()
parse(desktop + "/recipe_issues.json")