| 41 | |
| 42 | |
| 43 | def github(): # Start of the function just to count the files in the github directory |
| 44 | github_dir = os.path.join( |
| 45 | dropbox, "github" |
| 46 | ) # Joins the paths to get the github directory - 1.1 |
| 47 | github_count = sum( |
| 48 | (len(f) for _, _, f in os.walk(github_dir)) |
| 49 | ) # Get a count for all the files in the directory |
| 50 | if ( |
| 51 | github_count > 5 |
| 52 | ): # If the number of files is greater then 5, then print the following messages |
| 53 | print("\nYou have too many in here, start uploading !!!!!") |
| 54 | print("You have: " + str(github_count) + " waiting to be uploaded to github!!") |
| 55 | elif github_count == 0: # Unless the count is 0, then print the following messages |
| 56 | print("\nGithub directory is all Clear") |
| 57 | else: # If it is any other number then print the following message, showing the number outstanding. |
| 58 | print( |
| 59 | "\nYou have: " + str(github_count) + " waiting to be uploaded to github!!" |
| 60 | ) |
| 61 | |
| 62 | |
| 63 | def development(): # Start of the function just to count the files in the development directory |