# Pluto notebook HTML version: how to download data from repository?

**URL:** <https://discourse.julialang.org/t/pluto-notebook-html-version-how-to-download-data-from-repository/74992>\
**Category:** Tooling\
**Tags:** pluto\
**Created:** [January 21, 2022, 3:28pm UTC](https://discourse.julialang.org/t/pluto-notebook-html-version-how-to-download-data-from-repository/74992 "2022-01-21T15:28:32Z")\
**Posts on this page:** 4\
**Page:** 2

<div class="post-metadata">

**Author:** ![EmiliaJarochowska](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/emiliajarochowska/32/202594_2.png) [@EmiliaJarochowska](https://discourse.julialang.org/u/EmiliaJarochowska)\
**Post date:** [October 19, 2023, 3:16pm UTC](https://discourse.julialang.org/t/pluto-notebook-html-version-how-to-download-data-from-repository/74992/21 "2023-10-19T15:16:18Z")

</div>

Thanks! I am able to download from OSF using [datahugger](https://github.com/J535D165/datahugger) via `PyCall`. It would also be possible to call [osfr](https://github.com/ropensci/osfr) via R, I haven’t tried using it from Julia, but from R it works okay (given that it’s not maintained) and allows downloading from private projects on OSF, unlike datahugger.  
But I would still like to figure out how to use OSF.jl, just struggling with the API.

---

<div class="post-metadata">

**Author:** ![Igor\_Douven](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/igor_douven/32/8433_2.png) [@Igor\_Douven](https://discourse.julialang.org/u/Igor_Douven)\
**Post date:** [October 19, 2023, 4:00pm UTC](https://discourse.julialang.org/t/pluto-notebook-html-version-how-to-download-data-from-repository/74992/22 "2023-10-19T16:00:14Z")

</div>

Yes, that would help me too (though the workaround is also okay for now).

---

<div class="post-metadata">

**Author:** ![aplavin](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/aplavin/32/222056_2.png) [@aplavin](https://discourse.julialang.org/u/aplavin)\
**Post date:** [October 19, 2023, 4:05pm UTC](https://discourse.julialang.org/t/pluto-notebook-html-version-how-to-download-data-from-repository/74992/23 "2023-10-19T16:05:49Z")

</div>

OSF.jl is indeed not fully-documented, but see the README ([Alexander Plavin / OpenScienceFramework.jl · GitLab](https://gitlab.com/aplavin/OpenScienceFramework.jl)) – it has an example of how to do basically all high-level stuff.  
To get a link/download a file specifically:

```julia
using OpenScienceFramework

osf = OSF.Client(; token="YOUR TOKEN")

proj = OSF.project(osf; title="YOUR PROJECT")

# list all dirs
dirs = readdir(OSF.Directory, proj)

# list all files in the first dir
files = readdir(OSF.File, first(dirs))

# you can apply abspath/basename/... to files and dirs to see their paths and names
abspath.(files)

# obtain the URL to the first file in the list:
url = OSF.url(first(files))

# this URL can be downloaded anonymously (assuming you created at least one "view-only link" for this project):
download(url)

```

---

<div class="post-metadata">

**Author:** ![Igor\_Douven](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/igor_douven/32/8433_2.png) [@Igor\_Douven](https://discourse.julialang.org/u/Igor_Douven)\
**Post date:** [October 19, 2023, 4:21pm UTC](https://discourse.julialang.org/t/pluto-notebook-html-version-how-to-download-data-from-repository/74992/24 "2023-10-19T16:21:00Z")

</div>

Ah thank you, I hadn’t seen that. Maybe it’s recent. I will give this a try again.

[Previous page](https://discourse.julialang.org/t/pluto-notebook-html-version-how-to-download-data-from-repository/74992.md?page=1)
