Created
December 23, 2020 06:50
-
-
Save MitchellKehn/67c18c249b4f87f47d6549602be30e4f to your computer and use it in GitHub Desktop.
[get publish descriptions by user] #shotgun
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
from altpipe.shotgun.api import getShotgunConnection | |
from pprint import pprint | |
sg = getShotgunConnection() | |
user = sg.find_one("HumanUser", [["login", "is", "jtrudgian"]]) | |
versions = sg.find("Version", [["user", "is", user]], ["description"], limit=1000) | |
descriptions = [] | |
for version in versions: | |
descriptions.append(version["description"]) | |
descriptions = sorted(descriptions, reverse=True, key=lambda x: len(x) if x else None) | |
for i in descriptions: | |
print i | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment