build/lib/lottie_animation_manager/__main__.py
def list_hosted_animations():
	''' List hosted animations / folders currently in the s3 bucket '''
	global bucket
	global configured_tiny_png_key
	global compression_enabled
	global bucket_name_final

	# Clear screen
	click.clear()
	# Window Title
	click.echo(click.style(emoji.emojize(' List Animations '), bg='green', fg="bright_white"))
	click.echo('\n')

	click.echo(click.style('Found the following folders in your s3 bucket:', fg="green"))
	# creating a working list of folders in the bucket
	existing_folders = []
	folders = bucket.list("","/")
	for folder in folders:
		folder_name = folder.name
		# strip the folder name to just the root level, with no trailing slashes
		folder_name = pathlib.Path(folder_name).parts[0]
		existing_folders.append(folder_name)

	if len(existing_folders) > 0:
		count = 1
		for folder in existing_folders:
			click.echo(click.style("{}) ".format(count), fg="bright_white"), nl=False)
			click.echo(click.style("{}".format(folder), bg='bright_white', fg="black"), nl=True)
			click.echo(click.style("https://s3.console.aws.amazon.com/s3/buckets/{}/{}/".format(bucket_name_final, folder), fg="bright_cyan"), nl=True)
			count += 1
	else:
		click.echo(click.style('Sorry - no existing animation folders were found!'))
 List hosted animations / folders currently in the s3 bucket 
List hosted animations / folders currently in the s3 bucket
List hosted animations / folders currently in the s3 bucket
def list_hosted_animations():
	global bucket
	global configured_tiny_png_key
	global compression_enabled
	global bucket_name_final
	click.clear()
	click.echo(click.style(emoji.emojize(' List Animations '), bg='green', fg="bright_white"))
	click.echo('\n')
	click.echo(click.style('Found the following folders in your s3 bucket:', fg="green"))
	existing_folders = []
	folders = bucket.list("","/")
	for folder in folders:
		folder_name = folder.name
		folder_name = pathlib.Path(folder_name).parts[0]
		existing_folders.append(folder_name)
	if len(existing_folders) > 0:
		count = 1
		for folder in existing_folders:
			click.echo(click.style("{}) ".format(count), fg="bright_white"), nl=False)
			click.echo(click.style("{}".format(folder), bg='bright_white', fg="black"), nl=True)
			click.echo(click.style("https://s3.console.aws.amazon.com/s3/buckets/{}/{}/".format(bucket_name_final, folder), fg="bright_cyan"), nl=True)
			count += 1
	else:
		click.echo(click.style('Sorry - no existing animation folders were found!'))
def list_hosted_animations ( ) : global bucket global configured_tiny_png_key global compression_enabled global bucket_name_final click . clear ( ) click . echo ( click . style ( emoji . emojize ( ' List Animations ' ) , bg = 'green' , fg = "bright_white" ) ) click . echo ( '\n' ) click . echo ( click . style ( 'Found the following folders in your s3 bucket:' , fg = "green" ) ) existing_folders = [ ] folders = bucket . list ( "" , "/" ) for folder in folders : folder_name = folder . name folder_name = pathlib . Path ( folder_name ) . parts [ 0 ] existing_folders . append ( folder_name ) if len ( existing_folders ) > 0 : count = 1 for folder in existing_folders : click . echo ( click . style ( "{}) " . format ( count ) , fg = "bright_white" ) , nl = False ) click . echo ( click . style ( "{}" . format ( folder ) , bg = 'bright_white' , fg = "black" ) , nl = True ) click . echo ( click . style ( "https://s3.console.aws.amazon.com/s3/buckets/{}/{}/" . format ( bucket_name_final , folder ) , fg = "bright_cyan" ) , nl = True ) count += 1 else : click . echo ( click . style ( 'Sorry - no existing animation folders were found!' ) )
List hosted animations / folders currently in the s3 bucket
List hosted animations / folders currently in the s3 bucket
''' List hosted animations / folders currently in the s3 bucket ''' # Clear screen # Window Title # creating a working list of folders in the bucket # strip the folder name to just the root level, with no trailing slashes