Skip to content

Commit

Permalink
update scripts to create staffer bios
Browse files Browse the repository at this point in the history
  • Loading branch information
jlobue committed Jan 4, 2024
1 parent 8cb3220 commit 7c3cb26
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 15 deletions.
65 changes: 57 additions & 8 deletions scripts/.ipynb_checkpoints/create-staffer-pages-checkpoint.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -101,15 +101,47 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": 11,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"['9/23/2023 10:38:03\\tArjun Malleswaran\\the/him\\thttps://drive.google.com/file/d/1NNfZqOmAeINVCmB2TlwPFepGotQSbw57/view?usp=sharing']\n",
"Image for Arjun Malleswaran has been saved successfully to ../assets/staff-images/wi24\\malleswaran-arjun.jpg\n"
"['1/3/2024 11:31:00\\tAaron Rasin\\the/him\\thttps://drive.google.com/file/d/1frQe4Z09_BbIGL6bifbXLgvYesR0VBf6/view?usp=sharing']\n",
"Image for Aaron Rasin has been saved successfully to ../assets/staff-images/wi24\\rasin-aaron.jpg\n",
"['1/3/2024 12:44:11\\tDoris Gao\\tshe/her\\thttps://photos.app.goo.gl/hhiRYchdjPUfAsg86']\n",
"Failed to extract file ID from link for Doris Gao. Skipping.\n",
"['1/3/2024 16:19:19\\tAshley Ho\\tshe/her\\thttps://drive.google.com/file/d/1axBMlAyfSICSAP0nZZtjnPi6-aEkZ0in/view?usp=sharing']\n",
"Image for Ashley Ho has been saved successfully to ../assets/staff-images/wi24\\ho-ashley.jpg\n",
"['1/3/2024 17:59:52\\tEster Tsai\\tshe/her\\thttps://drive.google.com/file/d/1r-v8jm-fpMXt5pvsGqIBjaYbhquoEEYG/view?usp=sharing']\n",
"Image for Ester Tsai has been saved successfully to ../assets/staff-images/wi24\\tsai-ester.jpg\n",
"['1/3/2024 18:51:05\\tCiro Zhang\\the/him\\thttps://drive.google.com/file/d/1sw0lE791jZmE3fRRtuHlT9a8ibpZ2pWi/view?usp=sharing']\n",
"Failed to download and save image for Ciro Zhang. Error: cannot identify image file <_io.BytesIO object at 0x000001DF6C4A8400>\n",
"['1/3/2024 20:24:50\\tOren Ciolli\\the/him\\thttps://drive.google.com/file/d/10KWQ5rUMgfQT_L-Af4452BST5o97dflb/view?usp=sharing']\n",
"Failed to download and save image for Oren Ciolli. Error: cannot identify image file <_io.BytesIO object at 0x000001DF6A316900>\n",
"['1/3/2024 21:17:46\\tKeenan Serrao\\the/him\\thttps://drive.google.com/file/d/1EHVeeaCvbVx4OpgFzM_kWEcj64P11Vh6/view?usp=sharing']\n",
"Image for Keenan Serrao has been saved successfully to ../assets/staff-images/wi24\\serrao-keenan.jpg\n",
"['1/4/2024 0:40:02\\tSofia Tkachenko\\tshe/her\\thttps://drive.google.com/file/d/12_B5BDtQCgSzToeFfoygW_WedO_cx5sn/view?usp=sharing']\n",
"Image for Sofia Tkachenko has been saved successfully to ../assets/staff-images/wi24\\tkachenko-sofia.jpg\n",
"['1/4/2024 0:52:02\\tPallavi Prabhu\\tshe/her\\thttps://drive.google.com/file/d/1ohZshbfRa9V2A-tACoXrtSYaCTc-oWX6/view?usp=sharing']\n",
"Image for Pallavi Prabhu has been saved successfully to ../assets/staff-images/wi24\\prabhu-pallavi.jpg\n",
"['1/4/2024 1:33:57\\tAbel Seyoum\\the/him\\thttps://drive.google.com/file/d/1aSA2NNg04izkyy3gX6uGcP24SpAtiCbi/view?usp=sharing']\n",
"Failed to download and save image for Abel Seyoum. Error: cannot identify image file <_io.BytesIO object at 0x000001DF6C491C70>\n",
"['1/4/2024 9:44:23\\tChiaChan Ho\\the/him\\thttps://drive.google.com/file/d/1NcZ2bi3irjGgtbMrtqKJ_1QrbtQqOuo0/view?usp=sharing']\n",
"Image for ChiaChan Ho has been saved successfully to ../assets/staff-images/wi24\\ho-chiachan.jpg\n",
"['1/3/2024 13:14:53\\tGuoxuan Xu\\the/him\\thttps://drive.google.com/file/d/1HLPQkC9Ei0FF1JXQmdvSMbHdcFAKvjiC/view?usp=sharing']\n",
"Image for Guoxuan Xu has been saved successfully to ../assets/staff-images/wi24\\xu-guoxuan.jpg\n",
"['1/3/2024 13:57:28\\tGina Roberg\\tshe/her\\thttps://drive.google.com/file/d/1a9BN0y_b8teywTKTcn1Mp-VWkwgVPSLC/view?usp=sharing']\n",
"Image for Gina Roberg has been saved successfully to ../assets/staff-images/wi24\\roberg-gina.jpg\n",
"['1/3/2024 15:38:51\\tRaine Hoang\\tthey/them\\thttps://drive.google.com/file/d/1-Lxj8yY1REXiJym1caTnncbCFYi4O5RR/view?usp=sharing']\n",
"Image for Raine Hoang has been saved successfully to ../assets/staff-images/wi24\\hoang-raine.jpg\n",
"['1/3/2024 16:51:23\\tJack Determan\\the/him\\thttps://docs.google.com/document/d/1WMKBCdR2zvha0siRemOkBUo6nNaml6jbteeVJQ6iGac/edit']\n",
"Failed to download and save image for Jack Determan. Error: 500 Server Error: Internal Server Error for url: https://doc-0c-18-docs.googleusercontent.com/docs/securesc/ha0ro937gcuc7l7deffksulhg5h7mbp1/v8sdg06jpm8b6uvhp29gjt77qfars9vj/1704395775000/16520039577878111519/*/1WMKBCdR2zvha0siRemOkBUo6nNaml6jbteeVJQ6iGac?e=download&uuid=94b61b8d-0377-4078-a2fa-5d9e49cfa076\n",
"['1/3/2024 17:24:34\\tYlesia Wu\\tshe/her\\thttps://drive.google.com/file/d/1cyyBxVpTJ6WigsbTVHfdHAfgVgpY5bfZ/view?usp=sharing']\n",
"Image for Ylesia Wu has been saved successfully to ../assets/staff-images/wi24\\wu-ylesia.jpg\n",
"['1/3/2024 18:26:51\\tBill Wang\\the/him\\thttps://drive.google.com/file/d/1SQNKL8hUxdpwIXB9cPNT6lqktqaWxhB8/view?usp=sharing']\n",
"Failed to download and save image for Bill Wang. Error: cannot identify image file <_io.BytesIO object at 0x000001DF6C49F270>\n"
]
}
],
Expand All @@ -128,7 +160,7 @@
" \n",
" # Parse the CSV content line by line\n",
" reader = csv.reader(csv_content.splitlines())\n",
" next(reader) # Skip the header row\n",
" #next(reader) # Skip the header row\n",
" \n",
" for row in reader:\n",
" print(row)\n",
Expand Down Expand Up @@ -164,15 +196,32 @@
" except Exception as e:\n",
" print(f\"Failed to download and save image for {full_name}. Error: {e}\")\n",
"\n",
"# The CSV content\n",
"csv_content = \"\"\"9/18/2023 15:48:03\tNorah Kerendian\tshe/her\thttps://drive.google.com/file/d/16mvLT-ueRnHhdvPDM0_im_gEOEj2bMsj/view?usp=sharing\n",
"9/23/2023 10:38:03\tArjun Malleswaran\the/him\thttps://drive.google.com/file/d/1NNfZqOmAeINVCmB2TlwPFepGotQSbw57/view?usp=sharing\"\"\"\n",
"# Copy-paste the first four columns from the staff onboarding form responses\n",
"csv_content = \"\"\"1/3/2024 11:31:00\tAaron Rasin\the/him\thttps://drive.google.com/file/d/1frQe4Z09_BbIGL6bifbXLgvYesR0VBf6/view?usp=sharing\n",
"1/3/2024 12:44:11\tDoris Gao\tshe/her\thttps://photos.app.goo.gl/hhiRYchdjPUfAsg86\n",
"1/3/2024 16:19:19\tAshley Ho\tshe/her\thttps://drive.google.com/file/d/1axBMlAyfSICSAP0nZZtjnPi6-aEkZ0in/view?usp=sharing\n",
"1/3/2024 17:59:52\tEster Tsai\tshe/her\thttps://drive.google.com/file/d/1r-v8jm-fpMXt5pvsGqIBjaYbhquoEEYG/view?usp=sharing\n",
"1/3/2024 18:51:05\tCiro Zhang\the/him\thttps://drive.google.com/file/d/1sw0lE791jZmE3fRRtuHlT9a8ibpZ2pWi/view?usp=sharing\n",
"1/3/2024 20:24:50\tOren Ciolli\the/him\thttps://drive.google.com/file/d/10KWQ5rUMgfQT_L-Af4452BST5o97dflb/view?usp=sharing\n",
"1/3/2024 21:17:46\tKeenan Serrao\the/him\thttps://drive.google.com/file/d/1EHVeeaCvbVx4OpgFzM_kWEcj64P11Vh6/view?usp=sharing\n",
"1/4/2024 0:40:02\tSofia Tkachenko\tshe/her\thttps://drive.google.com/file/d/12_B5BDtQCgSzToeFfoygW_WedO_cx5sn/view?usp=sharing\n",
"1/4/2024 0:52:02\tPallavi Prabhu\tshe/her\thttps://drive.google.com/file/d/1ohZshbfRa9V2A-tACoXrtSYaCTc-oWX6/view?usp=sharing\n",
"1/4/2024 1:33:57\tAbel Seyoum\the/him\thttps://drive.google.com/file/d/1aSA2NNg04izkyy3gX6uGcP24SpAtiCbi/view?usp=sharing\n",
"1/4/2024 9:44:23\tChiaChan Ho\the/him\thttps://drive.google.com/file/d/1NcZ2bi3irjGgtbMrtqKJ_1QrbtQqOuo0/view?usp=sharing\n",
"1/3/2024 13:14:53\tGuoxuan Xu\the/him\thttps://drive.google.com/file/d/1HLPQkC9Ei0FF1JXQmdvSMbHdcFAKvjiC/view?usp=sharing\n",
"1/3/2024 13:57:28\tGina Roberg\tshe/her\thttps://drive.google.com/file/d/1a9BN0y_b8teywTKTcn1Mp-VWkwgVPSLC/view?usp=sharing\n",
"1/3/2024 15:38:51\tRaine Hoang\tthey/them\thttps://drive.google.com/file/d/1-Lxj8yY1REXiJym1caTnncbCFYi4O5RR/view?usp=sharing\n",
"1/3/2024 16:51:23\tJack Determan\the/him\thttps://docs.google.com/document/d/1WMKBCdR2zvha0siRemOkBUo6nNaml6jbteeVJQ6iGac/edit\n",
"1/3/2024 17:24:34\tYlesia Wu\tshe/her\thttps://drive.google.com/file/d/1cyyBxVpTJ6WigsbTVHfdHAfgVgpY5bfZ/view?usp=sharing\n",
"1/3/2024 18:26:51\tBill Wang\the/him\thttps://drive.google.com/file/d/1SQNKL8hUxdpwIXB9cPNT6lqktqaWxhB8/view?usp=sharing\"\"\"\n",
"\n",
"# The directory where the images should be saved\n",
"directory = \"../assets/staff-images/wi24\"\n",
"\n",
"# Call the function with the CSV content and the directory\n",
"download_and_save_images(csv_content, directory)\n"
"download_and_save_images(csv_content, directory)\n",
"\n",
"# This will extract some, others will need to be done manually."
]
},
{
Expand Down
14 changes: 7 additions & 7 deletions scripts/create-staffer-pages.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@
},
{
"cell_type": "code",
"execution_count": 10,
"execution_count": 11,
"metadata": {},
"outputs": [
{
Expand All @@ -117,17 +117,17 @@
"['1/3/2024 17:59:52\\tEster Tsai\\tshe/her\\thttps://drive.google.com/file/d/1r-v8jm-fpMXt5pvsGqIBjaYbhquoEEYG/view?usp=sharing']\n",
"Image for Ester Tsai has been saved successfully to ../assets/staff-images/wi24\\tsai-ester.jpg\n",
"['1/3/2024 18:51:05\\tCiro Zhang\\the/him\\thttps://drive.google.com/file/d/1sw0lE791jZmE3fRRtuHlT9a8ibpZ2pWi/view?usp=sharing']\n",
"Failed to download and save image for Ciro Zhang. Error: cannot identify image file <_io.BytesIO object at 0x000001DF6C489C20>\n",
"Failed to download and save image for Ciro Zhang. Error: cannot identify image file <_io.BytesIO object at 0x000001DF6C4A8400>\n",
"['1/3/2024 20:24:50\\tOren Ciolli\\the/him\\thttps://drive.google.com/file/d/10KWQ5rUMgfQT_L-Af4452BST5o97dflb/view?usp=sharing']\n",
"Failed to download and save image for Oren Ciolli. Error: cannot identify image file <_io.BytesIO object at 0x000001DF6B7A38B0>\n",
"Failed to download and save image for Oren Ciolli. Error: cannot identify image file <_io.BytesIO object at 0x000001DF6A316900>\n",
"['1/3/2024 21:17:46\\tKeenan Serrao\\the/him\\thttps://drive.google.com/file/d/1EHVeeaCvbVx4OpgFzM_kWEcj64P11Vh6/view?usp=sharing']\n",
"Image for Keenan Serrao has been saved successfully to ../assets/staff-images/wi24\\serrao-keenan.jpg\n",
"['1/4/2024 0:40:02\\tSofia Tkachenko\\tshe/her\\thttps://drive.google.com/file/d/12_B5BDtQCgSzToeFfoygW_WedO_cx5sn/view?usp=sharing']\n",
"Image for Sofia Tkachenko has been saved successfully to ../assets/staff-images/wi24\\tkachenko-sofia.jpg\n",
"['1/4/2024 0:52:02\\tPallavi Prabhu\\tshe/her\\thttps://drive.google.com/file/d/1ohZshbfRa9V2A-tACoXrtSYaCTc-oWX6/view?usp=sharing']\n",
"Image for Pallavi Prabhu has been saved successfully to ../assets/staff-images/wi24\\prabhu-pallavi.jpg\n",
"['1/4/2024 1:33:57\\tAbel Seyoum\\the/him\\thttps://drive.google.com/file/d/1aSA2NNg04izkyy3gX6uGcP24SpAtiCbi/view?usp=sharing']\n",
"Failed to download and save image for Abel Seyoum. Error: cannot identify image file <_io.BytesIO object at 0x000001DF6B7A38B0>\n",
"Failed to download and save image for Abel Seyoum. Error: cannot identify image file <_io.BytesIO object at 0x000001DF6C491C70>\n",
"['1/4/2024 9:44:23\\tChiaChan Ho\\the/him\\thttps://drive.google.com/file/d/1NcZ2bi3irjGgtbMrtqKJ_1QrbtQqOuo0/view?usp=sharing']\n",
"Image for ChiaChan Ho has been saved successfully to ../assets/staff-images/wi24\\ho-chiachan.jpg\n",
"['1/3/2024 13:14:53\\tGuoxuan Xu\\the/him\\thttps://drive.google.com/file/d/1HLPQkC9Ei0FF1JXQmdvSMbHdcFAKvjiC/view?usp=sharing']\n",
Expand All @@ -137,11 +137,11 @@
"['1/3/2024 15:38:51\\tRaine Hoang\\tthey/them\\thttps://drive.google.com/file/d/1-Lxj8yY1REXiJym1caTnncbCFYi4O5RR/view?usp=sharing']\n",
"Image for Raine Hoang has been saved successfully to ../assets/staff-images/wi24\\hoang-raine.jpg\n",
"['1/3/2024 16:51:23\\tJack Determan\\the/him\\thttps://docs.google.com/document/d/1WMKBCdR2zvha0siRemOkBUo6nNaml6jbteeVJQ6iGac/edit']\n",
"Failed to download and save image for Jack Determan. Error: 500 Server Error: Internal Server Error for url: https://doc-0c-18-docs.googleusercontent.com/docs/securesc/ha0ro937gcuc7l7deffksulhg5h7mbp1/m10r66ma52pcni4fkdeepj7mdqvs0tvq/1704395325000/16520039577878111519/*/1WMKBCdR2zvha0siRemOkBUo6nNaml6jbteeVJQ6iGac?e=download&uuid=03002f39-1812-41b0-a5a4-6f4794c9b550\n",
"Failed to download and save image for Jack Determan. Error: 500 Server Error: Internal Server Error for url: https://doc-0c-18-docs.googleusercontent.com/docs/securesc/ha0ro937gcuc7l7deffksulhg5h7mbp1/v8sdg06jpm8b6uvhp29gjt77qfars9vj/1704395775000/16520039577878111519/*/1WMKBCdR2zvha0siRemOkBUo6nNaml6jbteeVJQ6iGac?e=download&uuid=94b61b8d-0377-4078-a2fa-5d9e49cfa076\n",
"['1/3/2024 17:24:34\\tYlesia Wu\\tshe/her\\thttps://drive.google.com/file/d/1cyyBxVpTJ6WigsbTVHfdHAfgVgpY5bfZ/view?usp=sharing']\n",
"Image for Ylesia Wu has been saved successfully to ../assets/staff-images/wi24\\wu-ylesia.jpg\n",
"['1/3/2024 18:26:51\\tBill Wang\\the/him\\thttps://drive.google.com/file/d/1SQNKL8hUxdpwIXB9cPNT6lqktqaWxhB8/view?usp=sharing']\n",
"Failed to download and save image for Bill Wang. Error: cannot identify image file <_io.BytesIO object at 0x000001DF6C525DB0>\n"
"Failed to download and save image for Bill Wang. Error: cannot identify image file <_io.BytesIO object at 0x000001DF6C49F270>\n"
]
}
],
Expand Down Expand Up @@ -221,7 +221,7 @@
"# Call the function with the CSV content and the directory\n",
"download_and_save_images(csv_content, directory)\n",
"\n",
"# This will extract some, others will need to be done manually.\n"
"# This will extract some, others will need to be done manually."
]
},
{
Expand Down

0 comments on commit 7c3cb26

Please sign in to comment.