import { showHintWithLink } from "../../utils/hint"; import { formatPath } from "../../utils/str"; export async function saveMD( filename: string, noteId: number, options: { keepNoteLink?: boolean; withYAMLHeader?: boolean; }, ) { const noteItem = Zotero.Items.get(noteId); const dir = OS.Path.join( ...OS.Path.split(formatPath(filename)).components.slice(0, -1), ); const hasImage = noteItem.getNote().includes(" { Zotero.File.reveal(filename); }); } export async function syncMDBatch(saveDir: string, noteIds: number[]) { const noteItems = Zotero.Items.get(noteIds); await Zotero.File.createDirectoryIfMissingAsync(saveDir); const attachmentsDir = formatPath(OS.Path.join(saveDir, "attachments")); const hasImage = noteItems.some((noteItem) => noteItem.getNote().includes("