Download additional resources
All checks were successful
continuous-integration/drone/push Build is passing

Scrape:
- https://web.stanford.edu/class/cs143/
- http://openclassroom.stanford.edu/MainFolder/courses/Compilers/docs

Both contain resources not found in the edx course. Among others:
- LaTeX sources for assignments
- Slides (annotated and un-annotated)
- Previous finals for practicing
This commit is contained in:
Armin Friedl 2020-12-26 17:12:08 +01:00
parent 5a5b9d9e09
commit 032f8a5714

View file

@ -41,6 +41,32 @@ RUN wget -O - https://courses.edx.org/asset-v1:StanfordOnline+SOE.YCSCS1+1T2020+
RUN wget -O - https://courses.edx.org/asset-v1:StanfordOnline+SOE.YCSCS1+1T2020+type@asset+block@pa4-grading.pl \
| tee /usr/class/assignments/PA5J/grade.pl /usr/class/assignments/PA5/grade.pl > /dev/null
# Download additional resources to `class/handouts`. We scrape the whole
# websites every time we build the container. On the other hand they could just
# provide the resources in the course ¯\_(ツ)_/¯
# Move the handouts in the student-dist.tar.gz to edx subfolder
RUN mkdir -p /usr/class/handouts/edx \
&& cd /usr/class/handouts \
&& mv *.pdf edx
# Download cs143 resources. This contains e.g. latex templates for the assignments, previous finals
# https://web.stanford.edu/class/cs143/
RUN mkdir -p /usr/class/handouts/cs143 \
&& cd /usr/class/handouts/cs143 \
&& wget -r -k -l1 https://web.stanford.edu/class/cs143/ \
&& mv web.stanford.edu/class/cs143/* . && rm -fR web.stanford.edu
# Download openclassroom resources. this contains e.g. the annotated video slides.
# We are downloading the directory listing from
# http://openclassroom.stanford.edu/MainFolder/courses/Compilers/docs
# here, so we can use mirror (-m) without parents (-np) here.
# see also: http://openclassroom.stanford.edu/MainFolder/CoursePage.php?course=Compilers
RUN mkdir -p /usr/class/handouts/openclassroom \
&& cd /usr/class/handouts/openclassroom \
&& wget -np -m http://openclassroom.stanford.edu/MainFolder/courses/Compilers/docs \
&& mv openclassroom.stanford.edu/MainFolder/courses/Compilers/docs/* . && rm -fR openclassroom.stanford.edu
# Patch tar arguments in submission scripts
# We add -o to tar command since --preserve-permissions and --same-owner
# are default in tar for superuser. Since we are running as root
@ -65,7 +91,9 @@ RUN patch -u /usr/class/assignments/PA2/cool.flex -i /tmp/build/cool.flex.patch
RUN mkdir -p /class
WORKDIR /class
# Run entrypoint to connect working directory to mounted host volume
# Run entrypoint to connect working directory to mounted host volume. This
# copies files to the (potentially host-mounted) volume, s.t. files can be
# edited on the host and are also visible in the container.
COPY entrypoint.sh /usr/bin/entrypoint.sh
ENTRYPOINT ["entrypoint.sh"]
CMD ["/bin/bash"]