Skip to content
Permalink
Browse files
Return empty dict in FilenameRegexMetadata._extract_metadata_from_text
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
  • Loading branch information
Kwpolska committed Apr 14, 2018
1 parent b9aa3fb commit 258132d9d75be3db723b4b765ae4f15cd4275759
Showing with 5 additions and 0 deletions.
  1. +5 −0 nikola/metadata_extractors.py
@@ -239,6 +239,11 @@ class FilenameRegexMetadata(MetadataExtractor):
priority = MetaPriority.fallback
conditions = [(MetaCondition.config_bool, 'FILE_METADATA_REGEXP')]

def _extract_metadata_from_text(self, source_text: str) -> dict:
"""Extract metadata from text."""
# This extractor does not use the source text, and as such, this method returns an empty dict.
return {}

def extract_filename(self, filename: str, lang: str) -> dict:
"""Try to read the metadata from the filename based on the given re.

0 comments on commit 258132d

Please sign in to comment.