kewl printing now
This commit is contained in:
@@ -6,3 +6,4 @@ python-dateutil==2.6.1
|
|||||||
s3transfer==0.1.11
|
s3transfer==0.1.11
|
||||||
six==1.11.0
|
six==1.11.0
|
||||||
virtualenv==15.1.0
|
virtualenv==15.1.0
|
||||||
|
tabulate=0.8.2
|
||||||
|
|||||||
29
weirdAAL.py
29
weirdAAL.py
@@ -14,6 +14,8 @@ from modules import *
|
|||||||
import sys
|
import sys
|
||||||
import builtins
|
import builtins
|
||||||
import re
|
import re
|
||||||
|
from tabulate import tabulate
|
||||||
|
import textwrap
|
||||||
|
|
||||||
os.environ['AWS_SHARED_CREDENTIALS_FILE'] = '.env'
|
os.environ['AWS_SHARED_CREDENTIALS_FILE'] = '.env'
|
||||||
|
|
||||||
@@ -97,13 +99,28 @@ def make_the_list():
|
|||||||
and not (m == "modules.gcp")):
|
and not (m == "modules.gcp")):
|
||||||
make_list_of_methods("gcp", m)
|
make_list_of_methods("gcp", m)
|
||||||
|
|
||||||
|
def normalize_comments(string):
|
||||||
|
string = textwrap.fill(string.strip(), 40)
|
||||||
|
return string
|
||||||
|
|
||||||
|
|
||||||
|
def make_tabulate_rows(hash, cloud_provider):
|
||||||
|
entire_contents = []
|
||||||
|
for (key) in hash:
|
||||||
|
for item in hash[key]:
|
||||||
|
for (k,v) in item.items():
|
||||||
|
normalized_comment = normalize_comments(v)
|
||||||
|
entire_contents.append([cloud_provider, key, k, normalized_comment])
|
||||||
|
|
||||||
|
return entire_contents
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def print_the_list():
|
def print_the_list():
|
||||||
print("AWS")
|
aws_rows = make_tabulate_rows(aws_module_methods_info, 'AWS')
|
||||||
print("---")
|
gcp_rows = make_tabulate_rows(gcp_module_methods_info, 'GCP')
|
||||||
for (k) in aws_module_methods_info:
|
print(tabulate(aws_rows, headers=['Cloud Provider', 'Service', 'Mod', 'Desc']))
|
||||||
print(k)
|
print(tabulate(gcp_rows, headers=['Cloud Provider', 'Service', 'Mod', 'Desc']))
|
||||||
print(aws_module_methods_info[k])
|
|
||||||
print("....")
|
|
||||||
|
|
||||||
# Need to figure out if we have keys in the ENV or not
|
# Need to figure out if we have keys in the ENV or not
|
||||||
try:
|
try:
|
||||||
|
|||||||
Reference in New Issue
Block a user