Function journal_file

Source
pub fn journal_file(journals: &mut Vec<Journal>, aim_path: &Path) -> Result<()>
Expand description

Journals version headers in an .aim file and saves the journal entries to a .jnl file.

This function scans through an AIM file, identifies version headers (lines starting with ‘[’), and creates journal entries for complete versions (those without partial components). The resulting journal entries are saved to a corresponding .jnl file.

§Arguments

  • journals - Vector to store the parsed journal entries
  • aim_path - Path to the .aim file to journal

§Returns

  • Ok(()) on successful journal creation
  • Err if the file cannot be read or parsed

§Examples

use std::path::Path;
use aimx::aim::{Journal, journal_file};

let mut journals = Vec::new();
let result = journal_file(&mut journals, Path::new("workflow.aim"));