Add files using upload-large-folder tool
Browse files- .gitattributes +45 -0
- README.md +9 -16
- data/tdr.csv +0 -0
- documents/1039/protocol.pdf +3 -0
- documents/1039/sap.pdf +3 -0
- documents/1052/protocol.pdf +3 -0
- documents/1052/sap.pdf +3 -0
- documents/1055/protocol.pdf +3 -0
- documents/1055/sap.pdf +3 -0
- documents/1099/protocol.pdf +3 -0
- documents/1099/sap.pdf +3 -0
- documents/131/protocol.pdf +3 -0
- documents/131/sap.pdf +3 -0
- documents/136/protocol.pdf +3 -0
- documents/136/sap.pdf +3 -0
- documents/191/protocol.pdf +3 -0
- documents/191/sap.pdf +3 -0
- documents/303/protocol.pdf +3 -0
- documents/303/sap.pdf +3 -0
- documents/304/protocol.pdf +3 -0
- documents/304/sap.pdf +3 -0
- documents/552/protocol.pdf +3 -0
- documents/552/sap.pdf +3 -0
- documents/555/protocol.pdf +3 -0
- documents/555/sap.pdf +3 -0
- documents/599/protocol.pdf +3 -0
- documents/599/sap.pdf +3 -0
- documents/62/protocol.pdf +3 -0
- documents/62/sap.pdf +3 -0
- documents/65/protocol.pdf +3 -0
- documents/65/sap.pdf +3 -0
- documents/758/protocol.pdf +3 -0
- documents/758/sap.pdf +3 -0
- documents/760/protocol.pdf +3 -0
- documents/760/sap.pdf +3 -0
- documents/767/protocol.pdf +3 -0
- documents/767/sap.pdf +3 -0
- documents/793/protocol.pdf +3 -0
- documents/793/sap.pdf +3 -0
- documents/794/protocol.pdf +3 -0
- documents/794/sap.pdf +3 -0
- documents/91/protocol.pdf +3 -0
- documents/91/sap.pdf +3 -0
- documents/932/protocol.pdf +3 -0
- documents/932/sap.pdf +3 -0
- documents/959/protocol.pdf +3 -0
- documents/959/sap.pdf +3 -0
- documents/96/protocol.pdf +3 -0
- download_docs.py +91 -0
.gitattributes
CHANGED
|
@@ -58,3 +58,48 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 58 |
# Video files - compressed
|
| 59 |
*.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 60 |
*.webm filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 58 |
# Video files - compressed
|
| 59 |
*.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 60 |
*.webm filter=lfs diff=lfs merge=lfs -text
|
| 61 |
+
documents/959/protocol.pdf filter=lfs diff=lfs merge=lfs -text
|
| 62 |
+
documents/959/sap.pdf filter=lfs diff=lfs merge=lfs -text
|
| 63 |
+
documents/191/protocol.pdf filter=lfs diff=lfs merge=lfs -text
|
| 64 |
+
documents/191/sap.pdf filter=lfs diff=lfs merge=lfs -text
|
| 65 |
+
documents/1039/protocol.pdf filter=lfs diff=lfs merge=lfs -text
|
| 66 |
+
documents/1039/sap.pdf filter=lfs diff=lfs merge=lfs -text
|
| 67 |
+
documents/1099/protocol.pdf filter=lfs diff=lfs merge=lfs -text
|
| 68 |
+
documents/1099/sap.pdf filter=lfs diff=lfs merge=lfs -text
|
| 69 |
+
documents/767/protocol.pdf filter=lfs diff=lfs merge=lfs -text
|
| 70 |
+
documents/767/sap.pdf filter=lfs diff=lfs merge=lfs -text
|
| 71 |
+
documents/555/protocol.pdf filter=lfs diff=lfs merge=lfs -text
|
| 72 |
+
documents/555/sap.pdf filter=lfs diff=lfs merge=lfs -text
|
| 73 |
+
documents/131/protocol.pdf filter=lfs diff=lfs merge=lfs -text
|
| 74 |
+
documents/131/sap.pdf filter=lfs diff=lfs merge=lfs -text
|
| 75 |
+
documents/303/protocol.pdf filter=lfs diff=lfs merge=lfs -text
|
| 76 |
+
documents/303/sap.pdf filter=lfs diff=lfs merge=lfs -text
|
| 77 |
+
documents/793/protocol.pdf filter=lfs diff=lfs merge=lfs -text
|
| 78 |
+
documents/793/sap.pdf filter=lfs diff=lfs merge=lfs -text
|
| 79 |
+
documents/932/protocol.pdf filter=lfs diff=lfs merge=lfs -text
|
| 80 |
+
documents/932/sap.pdf filter=lfs diff=lfs merge=lfs -text
|
| 81 |
+
documents/91/protocol.pdf filter=lfs diff=lfs merge=lfs -text
|
| 82 |
+
documents/91/sap.pdf filter=lfs diff=lfs merge=lfs -text
|
| 83 |
+
documents/758/protocol.pdf filter=lfs diff=lfs merge=lfs -text
|
| 84 |
+
documents/758/sap.pdf filter=lfs diff=lfs merge=lfs -text
|
| 85 |
+
documents/65/protocol.pdf filter=lfs diff=lfs merge=lfs -text
|
| 86 |
+
documents/65/sap.pdf filter=lfs diff=lfs merge=lfs -text
|
| 87 |
+
documents/1052/protocol.pdf filter=lfs diff=lfs merge=lfs -text
|
| 88 |
+
documents/1052/sap.pdf filter=lfs diff=lfs merge=lfs -text
|
| 89 |
+
documents/794/protocol.pdf filter=lfs diff=lfs merge=lfs -text
|
| 90 |
+
documents/794/sap.pdf filter=lfs diff=lfs merge=lfs -text
|
| 91 |
+
documents/304/protocol.pdf filter=lfs diff=lfs merge=lfs -text
|
| 92 |
+
documents/304/sap.pdf filter=lfs diff=lfs merge=lfs -text
|
| 93 |
+
documents/136/protocol.pdf filter=lfs diff=lfs merge=lfs -text
|
| 94 |
+
documents/136/sap.pdf filter=lfs diff=lfs merge=lfs -text
|
| 95 |
+
documents/552/protocol.pdf filter=lfs diff=lfs merge=lfs -text
|
| 96 |
+
documents/552/sap.pdf filter=lfs diff=lfs merge=lfs -text
|
| 97 |
+
documents/760/protocol.pdf filter=lfs diff=lfs merge=lfs -text
|
| 98 |
+
documents/760/sap.pdf filter=lfs diff=lfs merge=lfs -text
|
| 99 |
+
documents/1055/protocol.pdf filter=lfs diff=lfs merge=lfs -text
|
| 100 |
+
documents/1055/sap.pdf filter=lfs diff=lfs merge=lfs -text
|
| 101 |
+
documents/62/protocol.pdf filter=lfs diff=lfs merge=lfs -text
|
| 102 |
+
documents/62/sap.pdf filter=lfs diff=lfs merge=lfs -text
|
| 103 |
+
documents/599/protocol.pdf filter=lfs diff=lfs merge=lfs -text
|
| 104 |
+
documents/599/sap.pdf filter=lfs diff=lfs merge=lfs -text
|
| 105 |
+
documents/96/protocol.pdf filter=lfs diff=lfs merge=lfs -text
|
README.md
CHANGED
|
@@ -1,20 +1,13 @@
|
|
| 1 |
---
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
-
|
| 8 |
-
|
| 9 |
-
- protocols
|
| 10 |
-
- benchmark
|
| 11 |
-
- source-corpus
|
| 12 |
---
|
| 13 |
|
| 14 |
-
#
|
| 15 |
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
- The curated trial metadata, manifests, and dataset annotations created by the TrialDesignBench maintainers are released under the Creative Commons Attribution 4.0 International License (CC BY 4.0).
|
| 19 |
-
- Downloaded Statistical Analysis Plans, protocols, and other source PDFs are third-party documents. They are provided with provenance metadata for research transparency and reproducibility. The TrialDesignBench maintainers do not claim copyright ownership over these documents and do not grant additional rights beyond those available from the original sources.
|
| 20 |
-
- Users are responsible for complying with the terms, rights, and restrictions associated with the original source documents.
|
|
|
|
| 1 |
---
|
| 2 |
+
license: cc-by-4.0
|
| 3 |
+
pretty_name: TrialDesignBench Source
|
| 4 |
+
configs:
|
| 5 |
+
- config_name: default
|
| 6 |
+
data_files:
|
| 7 |
+
- split: train
|
| 8 |
+
path: data/tdr.csv
|
|
|
|
|
|
|
|
|
|
| 9 |
---
|
| 10 |
|
| 11 |
+
# TrialDesignBench Source
|
| 12 |
|
| 13 |
+
CSV index of clinical trials with linked protocol and SAP PDFs under `documents/<row_id>/`.
|
|
|
|
|
|
|
|
|
|
|
|
data/tdr.csv
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
documents/1039/protocol.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b29e7f808573df08286ba159a628b743b6f472fc18c906519fbb816f8654558a
|
| 3 |
+
size 6265801
|
documents/1039/sap.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b29e7f808573df08286ba159a628b743b6f472fc18c906519fbb816f8654558a
|
| 3 |
+
size 6265801
|
documents/1052/protocol.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3be1d61df58af95c9e34a90467aefd7ea1ccee6503d02e780e475bec560ab713
|
| 3 |
+
size 226412
|
documents/1052/sap.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3be1d61df58af95c9e34a90467aefd7ea1ccee6503d02e780e475bec560ab713
|
| 3 |
+
size 226412
|
documents/1055/protocol.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:1aee4285c845994e0bda08409c9fd10fdf288a4c9f7e77be55a0e741f335b2fb
|
| 3 |
+
size 4195911
|
documents/1055/sap.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7db5bb160270038a15308f2c45f98645a960f01fec1e0423dfedb584cd1d79ba
|
| 3 |
+
size 1457637
|
documents/1099/protocol.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:1a7f2320e281cccbfce8ad1cd5fbb2618884abaa4ee4fcb5cb9406f10f040660
|
| 3 |
+
size 6222042
|
documents/1099/sap.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:1aeab950eb59aad771d9c3a6a65604d8521daecde707687faa9f3dc5d2e18fe4
|
| 3 |
+
size 405473
|
documents/131/protocol.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:1b968b367b16c3a7c88cae1a1f906df131d81da0a44185522c0d7d163403f114
|
| 3 |
+
size 5439986
|
documents/131/sap.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:1b968b367b16c3a7c88cae1a1f906df131d81da0a44185522c0d7d163403f114
|
| 3 |
+
size 5439986
|
documents/136/protocol.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:049c2367ab2cce556de756a6862182547442c0655ecaebf67a3da0f30943e6ba
|
| 3 |
+
size 5423429
|
documents/136/sap.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:300fdd36419e01b8b7402c8399d1831361604b535476e89841b584faa6872b15
|
| 3 |
+
size 7993709
|
documents/191/protocol.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9f446ceb582e12c5084f6e0aedd463ae2b75db27d5e9ae6e3d9a4c894f6af900
|
| 3 |
+
size 1120510
|
documents/191/sap.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:2bbcbf238a1b37114337e50eece393602fa132f2a1f5530bd9dc21d562bfcd00
|
| 3 |
+
size 469113
|
documents/303/protocol.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:811f29e43f9a8dc981fccb98564fa0826cb3e11a05730b59aa08e3918910fbb4
|
| 3 |
+
size 1260167
|
documents/303/sap.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a581444ce0c666caf28f956648c3bb820e20d584c69ba81cd351cd4c21aef12a
|
| 3 |
+
size 7016445
|
documents/304/protocol.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:39aceabe60dbb46d927d0e6519495578acde882f75e6cf791cfdde235b0333d3
|
| 3 |
+
size 1899046
|
documents/304/sap.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:39aceabe60dbb46d927d0e6519495578acde882f75e6cf791cfdde235b0333d3
|
| 3 |
+
size 1899046
|
documents/552/protocol.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:bf2034e19adfd7a0a9991848460abb8aaa8ba29d33c9bc4d68ae43fc844eed8e
|
| 3 |
+
size 968886
|
documents/552/sap.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:43889bbdd4383ecbcc5ffc724609ace4a59da33a3325432fc94b1866c36c985a
|
| 3 |
+
size 636268
|
documents/555/protocol.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:140e886cc0e20ef463fde937734ca58f0728a1b040dd0cc094dfee56f0abe87a
|
| 3 |
+
size 5927397
|
documents/555/sap.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:79816010b623225286791096f23786ff5cd0ff98064fd2d7ec5dd2fbad0f85a1
|
| 3 |
+
size 967117
|
documents/599/protocol.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9bd4ce166def41b63a9759a8658c262102443332f5a4bc60a309bb2622923600
|
| 3 |
+
size 3998587
|
documents/599/sap.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9bd4ce166def41b63a9759a8658c262102443332f5a4bc60a309bb2622923600
|
| 3 |
+
size 3998587
|
documents/62/protocol.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:80db9016b60c029a428c191c3b49894940e667530197eec11bf4ebda77efc0a7
|
| 3 |
+
size 4317351
|
documents/62/sap.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:2db4ce8d27788b461328be0435a007bd7d8c2e0ded5723fb760252bbe11f7d3d
|
| 3 |
+
size 2159865
|
documents/65/protocol.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:72806f12307e19c01ad6c3f741c3960090bde30f1ce4eb5c3aa9b2b0105d9e04
|
| 3 |
+
size 4878676
|
documents/65/sap.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a52afc983946e5a33d8ec4273f0cb2fce17ea9b078e989291d5daab5b68193fa
|
| 3 |
+
size 8100911
|
documents/758/protocol.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:6f33b56d8e4e1d80eaea42a6e32cf4c3edf473d52633abd02cb5445f1643432f
|
| 3 |
+
size 2275499
|
documents/758/sap.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ef8b61632c0006deaf048c0ae6b606b926bf7825042a14261a520294ee23f4b3
|
| 3 |
+
size 2711754
|
documents/760/protocol.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a0c7eeb23983a0a5965183f5717b32124e0ba49e561b8cabb686f55d1a07d3ff
|
| 3 |
+
size 1830888
|
documents/760/sap.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:be190c5d65c4d8c9a6e6add42779b490c00641c27002981e6520f4000a557015
|
| 3 |
+
size 282509
|
documents/767/protocol.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b214fbb9332cea6f228beec1c6a2d190e0c7ac5233f5b81f1ae79eff36fbf1b7
|
| 3 |
+
size 1350442
|
documents/767/sap.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b214fbb9332cea6f228beec1c6a2d190e0c7ac5233f5b81f1ae79eff36fbf1b7
|
| 3 |
+
size 1350442
|
documents/793/protocol.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:06efad76e1054c9f81cd473031fb8ca3164f8e89f2c4ec9d5241ce2f771a7f45
|
| 3 |
+
size 5838269
|
documents/793/sap.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e209a15e1dcec8d28e47696637c867f7332e6af8b33c0a76daab9941f49e42bd
|
| 3 |
+
size 2883622
|
documents/794/protocol.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d0d3d766030d84477af054affd7e86772b9e30490f5336689e45bc5a10e96ed4
|
| 3 |
+
size 1078754
|
documents/794/sap.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:2fa67daa3dfae0922e453932498d8ff9636bdb4ac46d0cb0032051275d286adc
|
| 3 |
+
size 449684
|
documents/91/protocol.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0e73fd90ee1601f4f2a1caca849583b3f074ac849b582466c90323e4e819c013
|
| 3 |
+
size 970648
|
documents/91/sap.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:50f3b9a2d246b95274e133d7731be4fec9d507da1a87c1fd379ef1892bca60ab
|
| 3 |
+
size 701270
|
documents/932/protocol.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f14bed6883d798a43ea097731cf3d1b23ddfe96751878355f84e76210bdfdd1c
|
| 3 |
+
size 1103175
|
documents/932/sap.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:088fc7caecd0fd5d89a0331c9e0c2b219af84b4a20419b07d82a9d8abc5b94b7
|
| 3 |
+
size 627237
|
documents/959/protocol.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:bee103f151a31dfeeb2fcd0f52667f2fa482668008719bb568e87ba88a03bd0b
|
| 3 |
+
size 4370944
|
documents/959/sap.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a4ebb051e42fcf336a2b2a1976b2f3b8c37613583477e41731f957a871810946
|
| 3 |
+
size 5020849
|
documents/96/protocol.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:df5eb54f3fb4defb20925ba6f610a1987e91b36ed2c0ad2bda219232173360e9
|
| 3 |
+
size 9100306
|
download_docs.py
ADDED
|
@@ -0,0 +1,91 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Download Protocol and SAP PDFs for each row of file.csv.
|
| 2 |
+
|
| 3 |
+
Outputs go to source/downloads/row_<#>/{protocol,sap}.pdf.
|
| 4 |
+
Skips rows with empty links and rows already downloaded.
|
| 5 |
+
"""
|
| 6 |
+
|
| 7 |
+
from __future__ import annotations
|
| 8 |
+
|
| 9 |
+
import csv
|
| 10 |
+
import sys
|
| 11 |
+
import time
|
| 12 |
+
import urllib.error
|
| 13 |
+
import urllib.request
|
| 14 |
+
from pathlib import Path
|
| 15 |
+
|
| 16 |
+
CSV_PATH = Path(__file__).parent / "file.csv"
|
| 17 |
+
OUT_ROOT = Path(__file__).parent / "downloads"
|
| 18 |
+
TIMEOUT = 60
|
| 19 |
+
RETRIES = 2
|
| 20 |
+
SLEEP_BETWEEN = 0.3
|
| 21 |
+
|
| 22 |
+
UA = (
|
| 23 |
+
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) "
|
| 24 |
+
"AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"
|
| 25 |
+
)
|
| 26 |
+
|
| 27 |
+
|
| 28 |
+
def download(url: str, dest: Path) -> tuple[bool, str]:
|
| 29 |
+
if dest.exists() and dest.stat().st_size > 0:
|
| 30 |
+
return True, "exists"
|
| 31 |
+
req = urllib.request.Request(url, headers={"User-Agent": UA})
|
| 32 |
+
last_err = ""
|
| 33 |
+
for attempt in range(RETRIES + 1):
|
| 34 |
+
try:
|
| 35 |
+
with urllib.request.urlopen(req, timeout=TIMEOUT) as resp:
|
| 36 |
+
data = resp.read()
|
| 37 |
+
dest.write_bytes(data)
|
| 38 |
+
return True, f"ok ({len(data)} bytes)"
|
| 39 |
+
except urllib.error.HTTPError as e:
|
| 40 |
+
last_err = f"HTTP {e.code}"
|
| 41 |
+
except (urllib.error.URLError, TimeoutError) as e:
|
| 42 |
+
last_err = f"network: {e}"
|
| 43 |
+
except Exception as e: # noqa: BLE001
|
| 44 |
+
last_err = f"error: {e}"
|
| 45 |
+
time.sleep(1 + attempt)
|
| 46 |
+
return False, last_err
|
| 47 |
+
|
| 48 |
+
|
| 49 |
+
def main(start_row: int = 3) -> None:
|
| 50 |
+
OUT_ROOT.mkdir(exist_ok=True)
|
| 51 |
+
with CSV_PATH.open(newline="", encoding="utf-8") as fh:
|
| 52 |
+
reader = csv.DictReader(fh)
|
| 53 |
+
for row in reader:
|
| 54 |
+
num_str = (row.get("#") or "").strip()
|
| 55 |
+
if not num_str.isdigit():
|
| 56 |
+
continue
|
| 57 |
+
num = int(num_str)
|
| 58 |
+
if num < start_row:
|
| 59 |
+
continue
|
| 60 |
+
|
| 61 |
+
protocol = (row.get("Study Protocol Link") or "").strip()
|
| 62 |
+
sap = (row.get("Protocol+SAP / SAP Link") or "").strip()
|
| 63 |
+
if not protocol and not sap:
|
| 64 |
+
print(f"[{num}] skip: no links")
|
| 65 |
+
continue
|
| 66 |
+
|
| 67 |
+
row_dir = OUT_ROOT / str(num)
|
| 68 |
+
row_dir.mkdir(exist_ok=True)
|
| 69 |
+
|
| 70 |
+
if protocol:
|
| 71 |
+
ok, msg = download(protocol, row_dir / "protocol.pdf")
|
| 72 |
+
print(f"[{num}] protocol: {msg}")
|
| 73 |
+
if not ok:
|
| 74 |
+
(row_dir / "protocol.error.txt").write_text(
|
| 75 |
+
f"{protocol}\n{msg}\n", encoding="utf-8"
|
| 76 |
+
)
|
| 77 |
+
time.sleep(SLEEP_BETWEEN)
|
| 78 |
+
|
| 79 |
+
if sap:
|
| 80 |
+
ok, msg = download(sap, row_dir / "sap.pdf")
|
| 81 |
+
print(f"[{num}] sap: {msg}")
|
| 82 |
+
if not ok:
|
| 83 |
+
(row_dir / "sap.error.txt").write_text(
|
| 84 |
+
f"{sap}\n{msg}\n", encoding="utf-8"
|
| 85 |
+
)
|
| 86 |
+
time.sleep(SLEEP_BETWEEN)
|
| 87 |
+
|
| 88 |
+
|
| 89 |
+
if __name__ == "__main__":
|
| 90 |
+
start = int(sys.argv[1]) if len(sys.argv) > 1 else 3
|
| 91 |
+
main(start_row=start)
|