X-Git-Url: https://git.mdrn.pl/librarian.git/blobdiff_plain/f8e5f031c04122d65d1066077be3920ae95518ae..e82ceed3d3d72dc75697449285a67e0a42a9cc56:/librarian/dcparser.py diff --git a/librarian/dcparser.py b/librarian/dcparser.py index 80d6247..cca9c6f 100644 --- a/librarian/dcparser.py +++ b/librarian/dcparser.py @@ -1,4 +1,8 @@ # -*- coding: utf-8 -*- +# +# This file is part of Librarian, licensed under GNU Affero GPLv3 or later. +# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. +# from xml.parsers.expat import ExpatError from datetime import date import time @@ -131,6 +135,10 @@ class BookInfo(object): Field( DCNS('rights.license'), 'license', required=False), Field( DCNS('rights'), 'license_description'), ) + + @property + def slug(self): + return self.url.rsplit('/', 1)[1] @classmethod def from_string(cls, xml):