-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of https://github.com/cpp-lln-lab/CPP_SPM into main
- Loading branch information
Showing
11 changed files
with
93 additions
and
23 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
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
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 |
---|---|---|
|
@@ -30,8 +30,6 @@ name: update submodules | |
on: | ||
push: | ||
branches: | ||
- main | ||
- master | ||
- dev | ||
schedule: | ||
- cron: "0 0 1 * *" | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
function filename = download(URL, output_dir, verbose) | ||
% | ||
% USAGE:: | ||
% | ||
% filename = download(URL, output_dir, verbose) | ||
% | ||
% (C) Copyright 2021 Remi Gau | ||
if nargin < 2 | ||
output_dir = pwd; | ||
end | ||
|
||
msg = sprintf('Downloading dataset from:\n %s\n\n', URL); | ||
print_to_screen(msg, verbose); | ||
|
||
tokens = regexp(URL, '/', 'split'); | ||
protocol = tokens{1}; | ||
|
||
filename = tokens{end}; | ||
|
||
if exist(filename, 'file') | ||
delete(filename); | ||
end | ||
|
||
if strcmp(protocol, 'http:') | ||
|
||
if isunix() | ||
if verbose | ||
system(sprintf('wget %s', URL)); | ||
else | ||
system(sprintf('wget -q %s', URL)); | ||
end | ||
else | ||
urlwrite(URL, filename); | ||
end | ||
|
||
% move file in case it was not downloaded in the root dir | ||
if ~exist(fullfile(output_dir, filename), 'file') | ||
print_to_screen([filename ' --> ' output_dir], verbose); | ||
movefile(filename, fullfile(output_dir, filename)); | ||
end | ||
filename = fullfile(output_dir, filename); | ||
|
||
else | ||
|
||
ftp_server = tokens{3}; | ||
ftpobj = ftp(ftp_server); | ||
|
||
filename = strjoin(tokens(4:end), '/'); | ||
filename = mget(ftpobj, filename, output_dir); | ||
|
||
end | ||
|
||
if iscell(filename) | ||
filename = filename{1}; | ||
end | ||
|
||
print_to_screen(' Done\n\n', verbose); | ||
|
||
end | ||
|
||
function print_to_screen(msg, verbose) | ||
if verbose | ||
fprintf(1, msg); | ||
end | ||
end |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,4 +3,5 @@ | |
*/*.json | ||
group/* | ||
dummyData/derivatives/cpp_spm*/sub-*/ | ||
dummyData/copy/ | ||
dummyData/copy/ | ||
bids-examples |
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
Empty file.
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 |
---|---|---|
@@ -1 +1,3 @@ | ||
regex_function_name: "(test(_unit){0,1}_[a-z]+|[a-z]+)(([A-Z]){1}[A-Za-z0-9]+)*" | ||
|
||
exclude_dir: "bids-examples" |