Created
September 24, 2021 22:52
-
-
Save daniel-schroeder-dev/dd85df0fcf5cb1298ca1d919f99ee42e to your computer and use it in GitHub Desktop.
CWHQ Zip Folder Script
This file contains hidden or 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
#!/usr/bin/python3 | |
print("Content-Type: text/html \n") | |
import cgitb | |
cgitb.enable() | |
import shutil | |
username = "danielj" | |
zipped_filename = "i_h14_api_lesson_12" | |
folder_to_zip = "i_h14_api_12" | |
shutil.make_archive(zipped_filename, "zip", folder_to_zip) | |
zip_url = f"https://{username}.codewizardshq.com/{zipped_filename}.zip" | |
print(f"{zipped_filename}.zip created!") | |
print(f"Download it at <a href={zip_url}>{zip_url}</a>") | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment