apple-dev-mcp
Version:
Complete Apple development guidance: Human Interface Guidelines (design) + Technical Documentation for iOS, macOS, watchOS, tvOS, and visionOS
53 lines • 1.64 kB
TypeScript
/**
* Content Processor Service
*
* Handles content extraction and processing using Turndown
* for clean HTML-to-Markdown conversion and structured content organization.
*/
import type { HIGSection } from '../../types.js';
export interface ContentQualityMetrics {
score: number;
length: number;
structureScore: number;
appleTermsScore: number;
codeExamplesCount: number;
imageReferencesCount: number;
headingCount: number;
isFallbackContent: boolean;
extractionMethod: string;
confidence: number;
}
export interface ProcessedContent {
cleanedMarkdown: string;
frontMatter: string;
quality: ContentQualityMetrics;
keywords: string[];
relatedSections: string[];
}
export declare class ContentProcessorService {
private turndown;
private readonly appleDesignTerms;
private readonly fallbackIndicators;
private readonly appleSPAIndicators;
constructor();
private configureTurndownRules;
/**
* Process HTML content into clean markdown with metadata
*/
processContent(html: string, section: HIGSection): Promise<ProcessedContent>;
private cleanHtml;
private cleanMarkdown;
private removeAppleSPAMetadata;
private removeRepeatedTitles;
/**
* Fix common word concatenation issues from HTML to Markdown conversion
*/
private fixWordConcatenation;
private removeTrailingMetadata;
private extractKeywords;
private extractRelatedSections;
private calculateQualityMetrics;
private detectFallbackContent;
private generateFrontMatter;
}
//# sourceMappingURL=content-processor.service.d.ts.map