#NEWLINE# def Scheduler( ) : #NEWLINE# #INDENT# import os.path #NEWLINE# if ( os . path . isfile ( globs . TOKEN ) and ( os . path . getsize ( globs . TOKEN ) > 0 ) ) : #NEWLINE# #INDENT# print ( "\n          _                      _             _       _                 \n         | |    ___   ___  _ __ (_)_ __  _   _| | __ _| |_ ___           \n         | |   / _ \\ / _ \\| '_ \\| | '_ \\| | | | |/ _` | __/ _ \\          \n         | |__| (_) | (_) | |_) | | |_) | |_| | | (_| | ||  __/_   _   _ \n         |_____\\___/ \\___/| .__/|_| .__/ \\__,_|_|\\__,_|\\__\\___(_) (_) (_)\n                          |_|     |_|                                    \n    " ) #NEWLINE# token = freshtoken ( globs . TOKEN ) #NEWLINE# creds = Credentials ( access_token = token ) #NEWLINE# import gspread #NEWLINE# gsp = gspread . authorize ( creds ) #NEWLINE# doclist = gsp . openall ( ) #NEWLINE# for onedoc in doclist : #NEWLINE# #INDENT# if ( onedoc . title != 'Users' ) : #NEWLINE# #INDENT# print ( "\n              _   _           _     ____  _               _   \n             | \\ | | _____  _| |_  / ___|| |__   ___  ___| |_ \n             |  \\| |/ _ \\ \\/ / __| \\___ \\| '_ \\ / _ \\/ _ \\ __|\n             | |\\  |  __/>  <| |_   ___) | | | |  __/  __/ |_ \n             |_| \\_|\\___/_/\\_\\\\__| |____/|_| |_|\\___|\\___|\\__|\n        " ) #NEWLINE# dockey = onedoc . get_id_fields ( ) [ 'spreadsheet_id' ] #NEWLINE# print ( ( 'PROCESSING SHEET: "%s" with key %s' % ( onedoc . title , dockey ) ) ) #NEWLINE# out ( 'ENTERING PIPULATE FUNCTION' , '0' ) #NEWLINE# STREAMIT = Pipulate ( dockey = dockey , token = token ) #NEWLINE# for thebits in STREAMIT : #NEWLINE# #INDENT# print ( thebits ) #NEWLINE# #UNINDENT# out ( 'EXITING PIPULATE FUNCTION' , '0' , '-' ) #NEWLINE# #UNINDENT# #UNINDENT# print ( "\n              _____           _   _                      _ \n             | ____|_ __   __| | | |    ___   ___  _ __ | |\n             |  _| | '_ \\ / _` | | |   / _ \\ / _ \\| '_ \\| |\n             | |___| | | | (_| | | |__| (_) | (_) | |_) |_|\n             |_____|_| |_|\\__,_| |_____\\___/ \\___/| .__/(_)\n                                                  |_|      \n    " ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# print ( 'Please configure Pipulate by visiting from a browser.' )