Docker-in-Docker (DinD) capabilities of public runners deactivated. More info

msgcollection.py 809 Bytes
Newer Older
1 2 3 4 5 6 7
""" harvest_tools.msgcollection

"""
from gluon.storage import Storage


class MsgCollection(Storage):
8 9 10
    """Messages for a collection.

    Args:
11
        error (str): error when scanning the collection.
12
        found (int): number of publication found in the harvester repository.
13 14
        url (str): URL used to scan the harvester repository.
        title (str): title of the collection.
15 16 17 18 19 20 21 22 23 24 25

    """
    def __init__(self, error="", found=0, title="", url=""):
        Storage.__init__(self)
        self.error = error
        self.found = found
        self.title = title
        self.url = url

    def url_hb(self):
        """
26 27 28
        Returns:
            str: an URL configures to return a list of record
                in readable format.
29 30 31

        """
        return self.url.replace("of=id", "of=hb")