Step Three - Python script
I have put a slightly redacted version of the Python script at:https://github.com/alfi1/ezproxy-harvestThe script goes through the output file I created previously from our log files, and for each line:
- Makes an Alma API call that gets information about the user from our Library Management system
- Extracts 'school', 'department', and 'course' from the API results
- Converts the IP address of the requester to a geographic location (country name)
- Writes out to a MySQL database:
- School
- timestamp
- resource
- country
- usergroup
- course
From a point of view of GDPR, note that the user name is discarded, and not sent to the database. We only want a school/department/course affiliation, and nothing that could identify the individual.
No comments:
Post a Comment