Skip to content

Commit

Permalink
Merge pull request #71 from ethanwhite/library-carpentry
Browse files Browse the repository at this point in the history
Add Library Carpentry lessons
  • Loading branch information
garezana authored Nov 6, 2023
2 parents 0124240 + 703e8c9 commit 0feab5b
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions offlinedatasci/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,14 @@ def download_lessons(ods_dir):
"https://datacarpentry.org/R-ecology-lesson/",
"https://datacarpentry.org/python-ecology-lesson/",
"https://datacarpentry.org/sql-ecology-lesson/"]

for lesson in dc_lessons:
lc_lessons = ["https://librarycarpentry.org/lc-overview/",
"https://librarycarpentry.org/lc-data-intro/",
"https://librarycarpentry.org/lc-shell/",
"https://librarycarpentry.org/lc-open-refine/",
"https://librarycarpentry.org/lc-git/",
]

for lesson in dc_lessons + lc_lessons:
print(f"Downloading lesson from {lesson}")
subprocess.run(["wget", "-r", "-k", "-N", "-c", "--no-parent", "-P", ods_dir, lesson],
stdout=subprocess.DEVNULL,
Expand All @@ -82,7 +88,7 @@ def download_lessons(ods_dir):
"http://swcarpentry.github.io/git-novice-es",
"http://swcarpentry.github.io/r-novice-gapminder-es"]

# Software Carpentry lessons have external CSS so requires a more expansize search & rewriting to get all necessary files
# Software Carpentry lessons have external CSS so requires a more expansive search & rewriting to get all necessary files
for lesson in sc_lessons:
print(f"Downloading lesson from {lesson}")
subprocess.run(["wget", "-p", "-r", "-k", "-N", "-c", "-E", "-H", "-D", "swcarpentry.github.io", "-K", "--no-parent", "-P", ods_dir, lesson],
Expand Down

0 comments on commit 0feab5b

Please sign in to comment.