Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
fao-fetcher
Manage
Activity
Members
Labels
Plan
Issues
1
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
dbnomics-fetchers
fao-fetcher
Commits
83bf2409
Commit
83bf2409
authored
4 years ago
by
Enzo Buthiot
Browse files
Options
Downloads
Patches
Plain Diff
Delete useless lines
parent
cb84ff84
No related branches found
Branches containing commit
No related tags found
1 merge request
!1
New download
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
download.py
+0
-18
0 additions, 18 deletions
download.py
with
0 additions
and
18 deletions
download.py
+
0
−
18
View file @
83bf2409
...
...
@@ -116,24 +116,6 @@ def main():
# Download main FAO file
download_file
(
target_dir
,
url
)
# Then loads datasets.json file
datasets_info_list
=
None
fd
=
open
(
target_dir
/
"
datasets.json
"
,
'
rt
'
,
encoding
=
'
latin-1
'
)
datasets_info_list
=
json
.
load
(
fd
)[
'
Datasets
'
][
'
Dataset
'
]
#or dataset in datasets_info_list:
#print(Path(dataset['FileLocation']).name)
zip_file
=
zipfile
.
ZipFile
(
'
/Users/EnzoButhiot/Downloads/FAOSTAT.zip
'
,
'
r
'
)
zip_list
=
zip_file
.
namelist
()
with
open
(
str
(
target_dir
)
+
"
/zip_list.txt
"
,
'
w
'
)
as
fd
:
json
.
dump
(
zip_list
,
fd
)
#with open(str(target_dir) + '/zipfile_list.txt', 'w') as fd:
# for name in zip_file.namelist():
# fd.write('%s\n' % name)
# print('%s' % (name))
zip_file
.
close
()
if
__name__
==
'
__main__
'
:
sys
.
exit
(
main
())
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment