Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Github-Crawler
Manage
Activity
Members
Labels
Plan
Issues
0
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
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
shareFAIR
Github-Crawler
Commits
bf632200
Commit
bf632200
authored
1 year ago
by
George Marchment
Browse files
Options
Downloads
Patches
Plain Diff
update download
parent
53754093
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
download_corpus.py
+20
-19
20 additions, 19 deletions
download_corpus.py
with
20 additions
and
19 deletions
download_corpus.py
+
20
−
19
View file @
bf632200
import
json
import
os
with
open
(
"
./wf_crawl_nextflow.json
"
)
as
json_file
:
crawler
=
json
.
load
(
json_file
)
#with open("./wf_crawl_nextflow.json") as json_file:
# crawler = json.load(json_file)
#
#crawler.pop("last_date")
crawler
.
pop
(
"
last_date
"
)
def
download
(
path
,
crawler
):
#These are the licenses that we are keeping
LICENSE
=
[
"
Apache License 2.0
"
,
"
GNU General Public License v3.0
"
,
"
MIT License
"
]
#These are the licenses that we are keeping
LICENSE
=
[
"
Apache License 2.0
"
,
"
GNU General Public License v3.0
"
,
"
MIT License
"
]
#Code for downloading the files
index
=
1
downloaded
=
0
for
project
in
crawler
:
print
(
f
'
*
{
index
}
/
{
len
(
crawler
)
}
'
)
if
(
crawler
[
project
][
"
license
"
]
in
LICENSE
):
print
(
f
"
Downloading...
'
{
project
}
'"
)
downloaded
+=
1
os
.
system
(
f
"
mkdir -p
"
)
os
.
system
(
f
'
git clone https://github.com/
{
project
}
.git ../../../Workflow-Corpus-Open-License/
{
project
}
'
)
index
+=
1
print
(
'
\n\n
'
)
print
(
downloaded
)
#Code for downloading the files
index
=
1
downloaded
=
0
for
project
in
crawler
:
print
(
f
'
*
{
index
}
/
{
len
(
crawler
)
}
'
)
if
(
crawler
[
project
][
"
license
"
]
in
LICENSE
):
print
(
f
"
Downloading...
'
{
project
}
'"
)
downloaded
+=
1
os
.
system
(
f
"
mkdir -p
"
)
os
.
system
(
f
'
git clone https://github.com/
{
project
}
.git
{
path
}
/
{
project
}
'
)
index
+=
1
print
(
'
\n\n
'
)
print
(
downloaded
)
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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