from FileMetadataExtractor import FileMetadataExtractor import os from datetime import datetime from RSS import ns """ File metadata extractor which simply sets dc:date, based on the mtime of the file. """ class FileStatExtractor(FileMetadataExtractor): def extract(self, f, item): item[(ns.dc, 'date')] = datetime.utcfromtimestamp(os.path.getmtime(f)).isoformat() + 'Z'