This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#EZProxy Starting Point URL Log (SPULog) Example | |
#LogSPU -strftime log/spu/spu%Y%m.log %h %l %u %t "%r" %s %b "%{ezproxy-groups}i" | |
111.222.1.2 - - [27/Oct/2014:16:32:27 -0800] "GET http://example.com" 301 0 "-" | |
111.222.1.3 - uSeR1sEsSiOnId [27/Oct/2014:16:32:31 -0800] "GET http://github.com" 200 0 "Default" | |
111.222.1.3 - uSeR2sEsSiOnId [27/Oct/2014:16:32:42 -0800] "GET http://gist.github.com" 200 0 "Default" | |
111.222.1.4 - uSeR3sEsSiOnId [27/Oct/2014:16:32:58 -0800] "GET http://help.github.com" HTTP/1.1" 301 0 "Default" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Example anonymized entries from a full ezproxy log | |
#LogFormat %h %l %u %t "%r" %s %b "%{user-agent}i" | |
11.222.333.444 - tHiSiSaSeSsIoNiD [01/Sep/2014:03:26:05 -0800] "GET http://example.com:80/interface/search/ HTTP/1.1" 403 459 "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.1985.143 Safari/537.36" | |
11.222.333.444 - tHiSiSaSeSsIoNiD [01/Sep/2014:03:26:05 -0800] "GET http://example.com:80/interface/results?query=dinosaurs HTTP/1.1" 200 664 "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.1985.143 Safari/537.36" | |
11.222.333.444 - tHiSiSaSeSsIoNiD [01/Sep/2014:03:26:06 -0800] "GET http://example.com:80/interface/results/article.pdf HTTP/1.1" 200 117956 "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.1985.143 Safari/537.36" | |
11.222.333.444 - tHiSiSaSeSsIoNiD [01/Sep/2014:03:26:07 -0800] "GET http://example.com:80/interface/results/article.pdf?page=2 HTTP/1.1" 200 664 "Mozilla/5.0 (Windows NT 6.1; W |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import csv | |
from pymarc import MARCReader | |
from os import listdir | |
from re import search | |
# change this line to match your folder structure | |
SRC_DIR = '/path/to/mrc/records' |