-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Automatically send gene sample results (#46)
- Loading branch information
Showing
5 changed files
with
223 additions
and
42 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Gene samples | ||
|
||
This directory contains a script to convert the gene sample PDF names to a hash of the person id. This is done so that the players can't guess the gene sample file names. | ||
|
||
1. Download the gene sample PDFs from Google Drive and place them in this directory | ||
2. Make sure that files.csv is up to date, as it maps the file names to person id's | ||
3. Make sure you are in this directory and run `./convert.sh` | ||
4. The script will create a new directory called `processed` that contains the PDFs where the file name is now the first 8 characters of the sha1 hash of the person id | ||
5. The contents of `processed` can be uploaded to the server to be served under `/gene-samples/` |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -euo pipefail | ||
|
||
input="files.csv" | ||
|
||
# Function to generate a short hash from an ID | ||
generate_hash() { | ||
echo -n "$1" | sha1sum | cut -c1-8 | ||
} | ||
|
||
mkdir -p ./processed | ||
rm -f ./processed/*.pdf | ||
|
||
while IFS=',' read -r id file; do | ||
# Skip the header line | ||
if [ "$id" != "id" ]; then | ||
# Remove leading ./ from the filename if present | ||
filename="${file#./}" | ||
hash=$(generate_hash "$id") | ||
# hash="$id" | ||
cp "$filename" "./processed/${hash}.pdf" | ||
fi | ||
done < "$input" | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
id,file | ||
20077,./Gene test - Amir Bolton image.pdf | ||
20107,./Gene test - Jonah Malone image.pdf | ||
20011,./Gene test - Terran Wells image.pdf | ||
20022,./Gene test - Jardan image.pdf | ||
20066,./Gene test - Lane Hayakawa image.pdf | ||
20087,./Gene test - Beva Drugov image.pdf | ||
20040,./Gene test - Deron Richard image.pdf | ||
20026,./Gene test - Naethan image.pdf | ||
20073,./Gene test - Torrey Watson image.pdf | ||
20386,./Gene test - The Guardian image.pdf | ||
20130,./Gene test - Anix image.pdf | ||
20021,./Gene test - Alia Swanson image.pdf | ||
20096,./Gene test - Dayle Rogers image.pdf | ||
20085,./Gene test - Abe Arima image.pdf | ||
20004,./Gene test - Dallan Jordan image.pdf | ||
20025,./Gene test - Jaeco image.pdf | ||
20052,./Gene test - Glen Hollow image.pdf | ||
20012,./Gene test - Blake Ishimoto image.pdf | ||
20090,./Gene test - Harper Ellis image.pdf | ||
20005,./Gene test - Yera Romero image.pdf | ||
20060,./Gene test - Nicol Wells image.pdf | ||
20108,./Gene test - Malak Fukui image.pdf | ||
20094,./Gene test - Hayden Carson image.pdf | ||
20089,./Gene test - Fenix Ellis image.pdf | ||
20083,./Gene test - Tan Ellis image.pdf | ||
20124,./Gene test - Jovian Aurelios Cauruleos image.pdf | ||
20015,./Gene test - Gallan Reid image.pdf | ||
20086,./Gene test - Aeran Lester image.pdf | ||
20001,./Gene test - Vane Hodge image.pdf | ||
20039,./Gene test - Noe Walker image.pdf | ||
20121,./Gene test - Pax Houghton image.pdf | ||
20059,./Gene test - Ballard Case image.pdf | ||
20051,./Gene test - Roan Rowen image.pdf | ||
20006,./Gene test - Kai Rogers image.pdf | ||
20132,./Gene test - Nayel image.pdf | ||
20110,./Gene test - Jose Cain image.pdf | ||
20044,./Gene test - Jill Montoya image.pdf | ||
20007,./Gene test - Cal Allen image.pdf | ||
20131,./Gene test - Keana image.pdf | ||
20120,./Gene test - Remi Sharp image.pdf | ||
20023,./Gene test - Zaera image.pdf | ||
20104,./Gene test - Espen Nakahara image.pdf | ||
20043,./Gene test - Gail Wells image.pdf | ||
20058,./Gene test - Hali Okuma image.pdf | ||
20084,./Gene test - Arlyn Booth image.pdf | ||
20055,./Gene test - Julia Aurelios Cauruleos image.pdf | ||
20134,./Gene test - Tarai image.pdf | ||
20013,./Gene test - Devyn Pearson image.pdf | ||
20003,./Gene test - Jin Komatsu image.pdf | ||
20119,./Gene test - Yuri Mills image.pdf | ||
20126,./Gene test - Gene Hawkins image.pdf | ||
20123,./Gene test - Lee Savage image.pdf | ||
20014,./Gene test - Evin Reid image.pdf | ||
20082,./Gene test - Eva Ellis image.pdf | ||
20098,./Gene test - Briana Chambers image.pdf | ||
20103,./Gene test - Valerian Fukui image.pdf | ||
20101,./Gene test - Osha Green image.pdf | ||
20095,./Gene test - Han Barnes image.pdf | ||
20074,./Gene test - Nikita Watson image.pdf | ||
20106,./Gene test - Nico Lawrence image.pdf | ||
20088,./Gene test - Fran Abrankowich image.pdf | ||
20099,./Gene test - Heath Steele image.pdf | ||
20020,./Gene test - Xavier Blake image.pdf | ||
20133,./Gene test - Saria image.pdf | ||
20063,./Gene test - Eli Booth image.pdf | ||
20045,./Gene test - Isha Hayakawa image.pdf | ||
20097,./Gene test - Mel McBride image.pdf | ||
20019,./Gene test - Malak Kovalenko image.pdf | ||
20117,./Gene test - Leigh Kent image.pdf | ||
20017,./Gene test - Skye Duran image.pdf | ||
20116,./Gene test - Nolan Hunter image.pdf | ||
20061,./Gene test - Flann Hollow image.pdf | ||
20037,./Gene test - Hale Green image.pdf | ||
20018,./Gene test - Zyra Lee image.pdf | ||
20028,./Gene test - Briya image.pdf | ||
20100,./Gene test - Caden Andrews image.pdf | ||
20102,./Gene test - Lynn Ryan image.pdf | ||
20041,./Gene test - Nickie Ramirez image.pdf | ||
20125,./Gene test - Avery Higashi image.pdf | ||
20128,./Gene test - Aedan image.pdf | ||
20070,./Gene test - Jodey Agaki image.pdf | ||
20008,./Gene test - Idris McBride image.pdf | ||
20042,./Gene test - Lowan Romero image.pdf | ||
20024,./Gene test - Mael image.pdf | ||
20002,./Gene test - Lex Peters image.pdf | ||
20057,./Gene test - Eugenie Russell image.pdf | ||
20112,./Gene test - Zeya Cook image.pdf | ||
20127,./Gene test - Harley Carroll image.pdf | ||
20092,./Gene test - Hedly Walker image.pdf | ||
20062,./Gene test - Tristan Fukui image.pdf | ||
20016,./Gene test - Tyler Carrillo image.pdf | ||
20118,./Gene test - Lonnie Gordon image.pdf | ||
20081,./Gene test - Oriel Cook image.pdf | ||
20113,./Gene test - Karin Alexandrov image.pdf | ||
20111,./Gene test - Ziva Callahan image.pdf | ||
20114,./Gene test - Leone Mills image.pdf | ||
20064,./Gene test - Ismy Arima image.pdf | ||
20091,./Gene test - Gale Chapman image.pdf | ||
20038,./Gene test - Ashlin Hall image.pdf | ||
20129,./Gene test - Taelor image.pdf | ||
20010,./Gene test - Remy Hall image.pdf | ||
20093,./Gene test - Taren Yates image.pdf | ||
20115,./Gene test - Kerrie Ray image.pdf | ||
20050,./Gene test - Gaylen Russell image.pdf |
This file contains 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
This file contains 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