...
 
Commits (2)
......@@ -31,3 +31,7 @@ Here a few lines from an actual log file:
The first two lines are less interesting -- these are accesses to a movie from the movie itself. The third line however provides an HTTP_REFERER which comes from another server, namely an HTML page that embeds the given movie.
## Changelog
6 Oct 2017: Script rewrite to process a single file and output JSON.
logs=$(shell ls samples/*.log)
zlogs=$(shell ls samples/*.gz)
all: backlinks.log
backlinks.log: $(logs) $(zlogs)
python backlinks.py \
--exclude-url http://video.constantvzw.org/icons \
--exclude-url http://video.constantvzw.org/favicon.ico \
--exclude-referer-host google.* \
--exclude-referer-host google.*.* \
--exclude-referer-host localhost \
--docroot /var/www/html \
--log $@ \
$?
test.log: samples/video_access.log.49.gz
python backlinks.py \
--exclude-url http://video.constantvzw.org/icons \
--exclude-url http://video.constantvzw.org/favicon.ico \
--exclude-referer-host google.* \
--exclude-referer-host google.*.* \
--exclude-referer-host localhost \
--log $@ \
--makedirs \
--docroot out \
$?
logs=$(shell ls logs/*.log)
logz=$(shell ls logs/*.gz)
backlinks=$(logs=logs/%.log=backlinks/%.backlinks.json)
backlinkz=$(logz=logs/%.gz=backlinks/%.backlinks.json)
all: $(backlinks) $(backlinkz)
backlinks/%.backlinks.json: logs/%.gz
mkdir -p backlinks
python backlinks.py
--mappath / http://video.constantvzw.org \
--exclude http://video.constantvzw.org/ \
$< > $@
# --exclude-url http://video.constantvzw.org/icons \
# --exclude-url http://video.constantvzw.org/favicon.ico \
# --exclude-referer-host google.* \
# --exclude-referer-host google.*.* \
# --exclude-referer-host localhost \
# --docroot /var/www/html \
# --log $@ \
# $< > $@
# test.log: samples/video_access.log.49.gz
# python backlinks.py \
# --exclude-url http://video.constantvzw.org/icons \
# --exclude-url http://video.constantvzw.org/favicon.ico \
# --exclude-referer-host google.* \
# --exclude-referer-host google.*.* \
# --exclude-referer-host localhost \
# --log $@ \
# --makedirs \
# --docroot out \
# $?
print-%:
......