Sync-in · Sovereign platform for file storage, sharing, synchronization, and collaboration.
TypeScript cloud-alternativecollaborationcollaborative-editingdropboxfile-serverfile-sharingfile-storagefile-syncfull-text-searchhomelabnextcloudon-premiseopen-sourceprivacy-firstprivate-cloudrealtimesecureself-hostedstorage-serverwebdav
import fs from 'fs/promises'
import { compile } from 'html-to-text'
const htmlConverter = compile({ wordwrap: false, preserveNewlines: false, baseElements: { selectors: ['*'] } })
export async function parseHtml(filePath: string): Promise<string> {
const content = await fs.readFile(filePath, { encoding: 'utf8' })
return htmlConverter(content)
}