forked from dbharris/repoman
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Pritty printing functions for repoman objects. Needs work!
- Loading branch information
Showing
1 changed file
with
36 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
from pprint import pprint | ||
|
||
|
||
# Single line listings of users/groups/images | ||
def display_user(user, long=False): | ||
pprint(user) | ||
|
||
def display_image(image, long=False): | ||
pprint(image) | ||
|
||
def display_group(group, long=False): | ||
pprint(group) | ||
|
||
def display_user_list(users, long=False): | ||
for user in users: | ||
display_user(user, long) | ||
|
||
def display_image_list(images, long=False): | ||
for image in images: | ||
display_image(image, long) | ||
|
||
def display_group_list(groups, long=False): | ||
for group in groups: | ||
display_group(group, long) | ||
|
||
|
||
# detailed descriptions of user/groups/images | ||
def describe_user(user, long=False): | ||
pprint(user) | ||
|
||
def describe_group(group, long=False): | ||
pprint(group) | ||
|
||
def describe_image(image, long=False): | ||
pprint(image) | ||
|