コード例 #1
0
    def publisher(self):
        """
        Get the publisher.

        Returns: str
        """

        return clean_field(self.record.publisher())
コード例 #2
0
    def date(self):
        """
        Get the date.

        Returns: str
        """

        return clean_field(self.record.pubyear())
コード例 #3
0
    def control_number(self):
        """
        Get the control number.

        Returns: str
        """

        return clean_field(self.record['001'].format_field())
コード例 #4
0
    def title(self):
        """
        Get the title.

        Returns: str
        """

        return clean_field(self.record.title())
コード例 #5
0
    def surname(self):
        """
        Extract a surname.

        Returns: surname
        """

        author = clean_field(self.record.author())
        return author.split(',')[0] if author else None
コード例 #6
0
    def authors(self):
        """
        Get the author array.

        Returns: list
        """

        author = clean_field(self.record.author())
        return [author] if author else []
コード例 #7
0
    def date(self):

        """
        Get the date.

        Returns: str
        """

        return clean_field(self.record.pubyear())
コード例 #8
0
    def publisher(self):

        """
        Get the publisher.

        Returns: str
        """

        return clean_field(self.record.publisher())
コード例 #9
0
    def title(self):

        """
        Get the title.

        Returns: str
        """

        return clean_field(self.record.title())
コード例 #10
0
    def control_number(self):

        """
        Get the control number.

        Returns: str
        """

        return clean_field(self.record['001'].format_field())
コード例 #11
0
    def surname(self):

        """
        Extract a surname.

        Returns: surname
        """

        author = clean_field(self.record.author())
        return author.split(',')[0] if author else None
コード例 #12
0
    def authors(self):

        """
        Get the author array.

        Returns: list
        """

        author = clean_field(self.record.author())
        return [author] if author else []
コード例 #13
0
def test_clean_field(raw, clean, mock_hlom):
    assert clean_field(raw) == clean