Exemplo n.º 1
0
    def parse(self):
        """
        """       
        # Initialize data
        data = {}

        # Extract data from lookup fields
        data.update(self.parse_lookup_fields())
        
        # Extract data from custom methods
        data.update(self.parse_method_fields())
        
        # Add data from DOI if available
        if self.ping_doi and 'DOI' in data:
            doi_data = xref.doi_to_csl(data['DOI'])
            data.update(doi_data)

        # Return data
        return data
Exemplo n.º 2
0
    def parse(self):
        """Run lookup- and method-based parsers, then optionally
        ping DOI for additional reference information.

        """       
        # Initialize data
        self.data = {}

        # Extract data from lookup fields
        self.parse_lookup_fields()
        
        # Extract data from custom methods
        self.parse_method_fields()
        
        # Add data from DOI if available
        if self.ping_doi and 'DOI' in data:
            doi_data = xref.doi_to_csl(data['DOI'])
            self.data.update(doi_data)

        # Return data
        return self.data