Skip to main content

export_notes

Function export_notes 

Source
pub fn export_notes(config: &ExportConfig) -> Result<Vec<Note>>
Expand description

Exports all notes from Apple Notes to Markdown files.

This function:

  1. Creates the output directory if it doesn’t exist
  2. Retrieves all notes using AppleScript
  3. Processes each note (converts HTML to Markdown, handles images)
  4. Saves notes with their metadata as Markdown files

§Arguments

  • config - Configuration options for the export process

§Returns

  • Result<Vec<Note>> - A vector of all exported notes on success

§Errors

  • If the output directory cannot be created
  • If the AppleScript execution fails
  • If any note processing or saving fails