search_hub

at 9ceb48b Raw

use crate::importer::gecko;
use crate::importer::Importer;
use crate::models::Bookmark;
use std::path::{Path, PathBuf};

pub struct ZenImporter;

impl Importer for ZenImporter {
    fn name(&self) -> &'static str {
        "Zen"
    }

    fn discover_profiles(&self) -> Vec<PathBuf> {
        gecko::discover_profiles(".zen")
    }

    fn import(&self, profile_path: &Path) -> anyhow::Result<Vec<Bookmark>> {
        gecko::query_bookmarks(profile_path)
    }

    fn import_history(&self, profile_path: &Path) -> anyhow::Result<Vec<Bookmark>> {
        gecko::query_history(profile_path)
    }
}