Commit dbc988c 1 parent eca7bea commit dbc988c Copy full SHA for dbc988c
File tree 8 files changed +16
-8
lines changed
8 files changed +16
-8
lines changed Original file line number Diff line number Diff line change 3
3
set -e
4
4
5
5
s3=" https://files.planning.data.gov.uk/"
6
+ timestamp=` date +%s`
6
7
7
8
csvcut -c collection specification/collection.csv | tail -n +2 |
8
9
while read collection
14
15
if [ ! -f $path ] ; then
15
16
mkdir -p $dir
16
17
set -x
17
- curl -qsfL $flags --retry 3 -o $path " $s3$collection -collection/collection/$file "
18
+ curl -qsfL $flags --retry 3 -o $path " $s3$collection -collection/collection/$file ?version= $timestamp "
18
19
set +x
19
20
fi
20
21
done
Original file line number Diff line number Diff line change 2
2
3
3
s3=" https://files.planning.data.gov.uk/"
4
4
column_field_dir=" column-field/"
5
+ timestamp=` date +%s`
5
6
6
7
python3 bin/resources.py |
7
8
while read collection pipeline resource
14
15
if [ ! -f $path ] ; then
15
16
mkdir -p $dir
16
17
set -x
17
- curl -qsfL $flags " $s3$collection -collection/var/column-field/$pipeline /$resource .csv" > $path
18
+ curl -qsfL $flags " $s3$collection -collection/var/column-field/$pipeline /$resource .csv?version= $timestamp " > $path
18
19
set +x
19
20
fi
20
21
done
Original file line number Diff line number Diff line change 3
3
4
4
s3=" https://files.planning.data.gov.uk/"
5
5
dir=var/converted-resource
6
+ timestamp=` date +%s`
6
7
7
8
python3 bin/resources.py |
8
9
while read collection pipeline resource
14
15
if [ ! -f $path ] ; then
15
16
mkdir -p $dir /$pipeline
16
17
set -x
17
- curl -qsfL $flags " $s3$collection -collection/$dir /$pipeline /$resource .csv" -o $path || :
18
+ curl -qsfL $flags " $s3$collection -collection/$dir /$pipeline /$resource .csv?version= $timestamp " -o $path || :
18
19
set +x
19
20
fi
20
21
done
Original file line number Diff line number Diff line change 3
3
set -e
4
4
5
5
s3=" https://files.planning.data.gov.uk/"
6
+ timestamp=` date +%s`
6
7
7
8
# Directory to save the database
8
9
db_dir=" dataset"
9
10
db_file=" digital-land.sqlite3"
10
11
db_path=" ${db_dir} /${db_file} "
11
- db_url=" ${s3} digital-land-builder/dataset/${db_file} "
12
+ db_url=" ${s3} digital-land-builder/dataset/${db_file} ?version= ${timestamp} "
12
13
13
14
# Create directory if it does not exist
14
15
mkdir -p $db_dir
Original file line number Diff line number Diff line change 4
4
5
5
s3=" https://files.planning.data.gov.uk/"
6
6
expectations_dir=" expectations/"
7
+ timestamp=` date +%s`
7
8
8
9
dir=var/$expectations_dir
9
10
mkdir -p $dir
19
20
path=$dir$file
20
21
if [ ! -f $path ] ; then
21
22
set -x
22
- if ! curl -qsfL $flags --retry 3 -o $path $s3$collection -collection/dataset/$file ; then
23
+ if ! curl -qsfL $flags --retry 3 -o $path $s3$collection -collection/dataset/$file ? version= $timestamp ; then
23
24
echo " *** UNABLE TO DOWNLOAD $collection FROM $path ***"
24
25
fi
25
26
set +x
Original file line number Diff line number Diff line change 3
3
# set -e
4
4
5
5
s3=" https://files.planning.data.gov.uk/"
6
+ timestamp=` date +%s`
6
7
7
8
python3 bin/resources.py |
8
9
while read collection pipeline resource
14
15
if [ ! -f $path ] ; then
15
16
mkdir -p $dir
16
17
set -x
17
- curl -qsfL $flags " $s3$collection -collection/issue/$pipeline /$resource .csv" > $path
18
+ curl -qsfL $flags " $s3$collection -collection/issue/$pipeline /$resource .csv?version= $timestamp " > $path
18
19
set +x
19
20
fi
20
21
done
Original file line number Diff line number Diff line change 4
4
5
5
s3=" https://files.planning.data.gov.uk/"
6
6
operational_issue_dir=" performance/operational_issue/"
7
+ timestamp=` date +%s`
7
8
8
9
mkdir -p $operational_issue_dir
9
10
15
16
if [ ! -f $path ] ; then
16
17
mkdir -p $dir
17
18
set -x
18
- curl -qsfL $flags " $s3$operational_issue_dir$dataset /operational-issue.csv" > $path
19
+ curl -qsfL $flags " $s3$operational_issue_dir$dataset /operational-issue.csv?version= $timestamp " > $path
19
20
set +x
20
21
fi
21
22
done
Original file line number Diff line number Diff line change 3
3
set -e
4
4
5
5
s3=" https://files.planning.data.gov.uk/"
6
+ timestamp=` date +%s`
6
7
7
8
python3 bin/resources.py |
8
9
while read collection pipeline resource
14
15
if [ ! -f $path ] ; then
15
16
mkdir -p $dir
16
17
set -x
17
- curl -qsfL $flags " $s3$collection -collection/collection/resource/$resource " > $path
18
+ curl -qsfL $flags " $s3$collection -collection/collection/resource/$resource ?version= $timestamp " > $path
18
19
set +x
19
20
fi
20
21
done
You can’t perform that action at this time.
0 commit comments