UNPKG

@slidef/cli

Version:

CLI tool for converting PDF slides to web-viewable format

46 lines 1.58 kB
import type { SlideMetadata } from '../types.js'; /** * Save metadata to JSON file */ export declare function saveMetadata(outputDir: string, metadata: SlideMetadata): Promise<void>; /** * Load metadata from JSON file */ export declare function loadMetadata(slideDir: string): Promise<SlideMetadata | null>; /** * Get all slide directories in the slides folder */ export declare function getAllSlides(slidesDir: string): Promise<SlideMetadata[]>; /** * Load all slides from the slides directory (alias for getAllSlides) */ export declare function loadSlides(slidesDir: string): Promise<SlideMetadata[]>; /** * Save slide index */ export declare function saveSlideIndex(outputDir: string, slides: SlideMetadata[]): Promise<void>; /** * Check if file exists */ export declare function fileExists(filePath: string): Promise<boolean>; /** * Get filename without extension */ export declare function getBaseName(filePath: string): string; /** * Calculate SHA256 hash of a file */ export declare function calculateFileHash(filePath: string): Promise<string>; /** * Normalize filename to be filesystem-safe * - Converts to lowercase * - Replaces spaces with hyphens * - Normalizes Unicode characters (NFD -> NFC) * - Removes special characters except alphanumeric, hyphen, and underscore */ export declare function normalizeFilename(name: string): string; /** * Generate a unique slide name by appending count if name exists */ export declare function generateUniqueSlideName(slidesDir: string, baseName: string): Promise<string>; //# sourceMappingURL=file.d.ts.map