Skip to content

Instantly share code, notes, and snippets.

View RobertArbon's full-sized avatar
💻
Looking for work

Lex O'brien RobertArbon

💻
Looking for work
View GitHub Profile
@RobertArbon
RobertArbon / osf_project_uploader.py
Created March 7, 2021 17:57
this uploads all files in a directory which meet certain given conditions.
import osfclient
from osfclient.models.storage import Storage
import os
from pathlib import Path
from typing import Callable, Optional
def get_storage(username: str, password: str, project_id: str, storage_provider: str = 'osfstorage') -> Storage:
"""
project_id is the alpha-numeric sequence at the end of the project url on OSF, e.g., osf.io/ab123 has project id of ab123
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.