Skip to content

Commit 5997fa0

Browse files
committed
v0.2.1
[v0.2.1, 7/24/2018] .gitignore file added, ignoring *.wmv files
1 parent d14d085 commit 5997fa0

File tree

4 files changed

+27
-10
lines changed

4 files changed

+27
-10
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.wmv

change_log.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
Visual Tracker (vistrack) change log
22
James Jun, Maler Lab
33

4+
[v0.2.1, 7/24/2018]
5+
.gitignore file added, ignoring *.wmv files
6+
7+
[v0.2.0, 7/24/2018]
8+
Debugged "visrack download-sample" command
9+
Retrying up to 5 times
10+
411
[v0.1.9, 7/24/2018]
512
Debugged "visrack download-sample" command
613

default.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ vcFile_settings = 'settings_vistrack.m'; % default settings for vistrack GUI
44

55
%# Commit
66
vcDir_commit = 'D:\Dropbox\Git\vistrack\';
7-
csFiles_commit = {'*.m', 'GUI.fig', 'change_log.txt', 'readme.txt', 'example.trialset', 'default.cfg', 'R12A2_Ts.mat', 'R12A2_Rs.mat', 'R12A2_Track.mat'};
7+
csFiles_commit = {'*.m', 'GUI.fig', 'change_log.txt', 'readme.txt', 'example.trialset', 'default.cfg', 'R12A2_Ts.mat', 'R12A2_Rs.mat', 'R12A2_Track.mat', '.gitignore'};
88
csLink_sample = {'https://www.dropbox.com/s/wamrg6ha2nk2ik3/R12A2.wmv?dl=1'}; % too large to upload via Github.com. Hosting from Dropbox instead.

vistrack.m

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -170,10 +170,11 @@ function delete_files_(csFiles)
170170
% 9/29/17 JJJ: Displaying the version number of the program and what's used. #Tested
171171
function [vcVer, vcDate] = version_()
172172
if nargin<1, vcFile_prm = ''; end
173-
vcVer = 'v0.1.9';
173+
vcVer = 'v0.2.1';
174174
vcDate = '7/24/2018';
175175
if nargout==0
176176
fprintf('%s (%s) installed\n', vcVer, vcDate);
177+
edit_('change_log.txt');
177178
end
178179
end %func
179180

@@ -1246,17 +1247,25 @@ function download_sample_()
12461247
%--------------------------------------------------------------------------
12471248
function vlSuccess = download_files_(csLink, csDest)
12481249
% download file from the web
1250+
nRetry = 5;
1251+
12491252
if nargin<2, csDest = link2file_(csLink); end
12501253
vlSuccess = false(size(csLink));
12511254
for iFile=1:numel(csLink)
1252-
try
1253-
% download from list of files
1254-
fprintf('\tDownloading %s: ', csLink{iFile});
1255-
vcFile_out1 = websave(csDest{iFile}, csLink{iFile});
1256-
fprintf('saved to %s\n', vcFile_out1);
1257-
vlSuccess(iFile) = 1;
1258-
catch
1259-
fprintf(2, '\n\tCannot download. Check internet connection.\n');
1255+
for iRetry = 1:nRetry
1256+
try
1257+
% download from list of files
1258+
fprintf('\tDownloading %s: ', csLink{iFile});
1259+
vcFile_out1 = websave(csDest{iFile}, csLink{iFile});
1260+
fprintf('saved to %s\n', vcFile_out1);
1261+
vlSuccess(iFile) = 1;
1262+
break;
1263+
catch
1264+
fprintf('\tRetrying %d/%d\n', iRetry, nRetry);
1265+
if iRetry==nRetry
1266+
fprintf(2, '\n\tDownload failed. Check internet connection.\n');
1267+
end
1268+
end
12601269
end
12611270
end %for
12621271
end %func

0 commit comments

Comments
 (0)