-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
55 lines (38 loc) · 1.6 KB
/
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
46
47
48
49
50
51
52
53
54
55
# - Adam Koprowski 9/06/2010
include .imdb_passwd
include Makefile-XSLT
######################################################################################################
LOGIN_URL := https://secure.imdb.com/register-imdb/login?login=$(USERNAME)&password=$(PASSWD)
VOTE_HISTORY_URL := http://www.imdb.com/mymovies/list?votehistory
COOKIES := cookies.txt
######################################################################################################
.PHONY: login clean movie-files poster-files
all: movies.xml poster-files
login:
$(SHOW) Logging to IMDB...
$(HIDE) wget --save-cookies $(COOKIES) "$(LOGIN_URL)" --directory-prefix=/tmp -o /dev/null
%.xhtml: %.html
$(SHOW) Generating: [$@]
$(HIDE) html2xhtml -t strict $< -o $@
vote_history.html: login
$(SHOW) Generating: [$@]
$(HIDE) wget --load-cookies $(COOKIES) "$(VOTE_HISTORY_URL)" -O $@ -o /dev/null
premovies.xml: vote_history.xhtml
$(SHOW) Generating: [$@]
$(HIDE) $(RUN_XSLT) -o $@ $< premovies.xsl
movie_list.txt: premovies.xml movie_list.xsl tvseries.xml
$(SHOW) Generating: [$@]
$(HIDE) $(RUN_XSLT) -o $@ $< movie_list.xsl
movies.xml: premovies.xml movies.xsl movie-files
$(SHOW) Generating: [$@]
$(HIDE) $(RUN_XSLT) -o $@ $< movies.xsl
movie-files: movie_list.txt
$(HIDE) make -f Makefile-posters get-movie-files
poster-files: movies.xml
$(HIDE) make -f Makefile-posters get-poster-files
clean:
$(SHOW) Cleaning...
$(HIDE) rm -f vote_history.html vote_history.xhtml premovies.xml movies.xml movie_list.txt $(COOKIES)
full-clean: clean
$(SHOW) Cleaning cached movies and poster files...
$(HIDE) rm -f imdb/*.xhtml posters/*.jpg