-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
45 lines (35 loc) · 905 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# comment this to use default python/pip
USE_VENV=1
ifdef USE_VENV
PIP = venv/bin/pip
PY = venv/bin/python3
VENV_TARGET = venv/done
else
PIP = pip
PY = python3
VENV_TARGET =
endif
PY_SYS = python3
download: $(VENV_TARGET) downloads
$(PY) dl.py
cd downloads; git add .; git commit -m "download"
oneshot:
$(PY) dl.py section 'https://campus.exactas.uba.ar/course/view.php?id=3282§ion=3'
# $(PY) dl.py resource 'https://campus.exactas.uba.ar/mod/resource/view.php?id=350539'
venv/done: requirements.txt
$(PY_SYS) -m venv venv
$(PIP) install -r requirements.txt
touch venv/done
downloads:
mkdir downloads; cd downloads; \
git init && \
echo '.old/' > .gitignore && \
git add .gitignore && \
git commit -m 'initial commit' --allow-empty
clean:
rm -rf downloads
todo:
grep -n -R TODO *.py || true
pudb:
$(PY) -m pudb dl.py
.PHONY: download clean todo