# amber **Repository Path**: Firoly_li/amber ## Basic Information - **Project Name**: amber - **Description**: 用rust处理文件得cli工具 - **Primary Language**: Rust - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-01-14 - **Last Updated**: 2026-01-21 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # amber Word to Obsidian converter written in Rust. ## Overview amber is a command-line tool that converts Word documents (`.docx`) to Markdown files with Obsidian-specific features like front matter and wikilinks. ## Features - **Multi-format support**: Currently supports `.docx` (extensible architecture for future formats) - **Markdown conversion**: Converts headings, paragraphs, lists, tables, and code blocks - **Obsidian integration**: Generates YAML front matter (title, created, source) - **AI optimization**: Optional integration with Ollama for tag generation - **Configurable**: TOML-based configuration with CLI override support - **Progress tracking**: Optional progress bar for long operations ## Installation ```bash cargo install --path . ``` ## Usage amber supports two command modes: **subcommand mode** (recommended) and **legacy mode** (for backward compatibility). ### Subcommand Mode (Recommended) #### Convert document to Markdown ```bash # Basic conversion amber convert --input document.docx --output ./output # With AI optimization amber convert --input document.docx --output ./output --ai # Specify AI model amber convert -i document.docx -o ./output --ai --model qwen2.5:7b # Show progress bar amber convert -i document.docx -o ./output --progress ``` #### Generate table of contents ```bash amber toc --input document.docx ``` ### Legacy Mode (Backward Compatible) For users who prefer the old CLI format, the following commands still work: ```bash # Basic conversion amber --input document.docx --output ./output # With AI optimization amber -i document.docx -o ./output --ai # Specify AI model amber -i document.docx -o ./output --ai --model qwen2.5:7b # Show progress bar amber -i document.docx -o ./output --progress ``` ### Get Help ```bash # General help amber --help # Subcommand-specific help amber convert --help amber toc --help ``` ## Configuration Create a `amber.toml` file in your current directory or `~/.config/amber/config.toml`: ```toml [output] default_path = "." attachments_dir = "attachments" [ai] enabled = false model = "qwen2.5:7b" ollama_base_url = "http://localhost:11434" max_tokens = 2000 [conversion] preserve_formatting = true extract_images = true image_format = "png" ``` ## Project Structure ``` amber/ ├── crates/ │ ├── amber-core/ # Core abstractions (traits, types, errors) │ ├── amber-readers/ # Document readers (docx, future: pdf, txt) │ ├── amber-markdown/ # Markdown converter │ ├── amber-obsidian/ # Obsidian-specific features │ ├── amber-ai/ # AI optimization (Ollama) │ └── amber-config/ # Configuration management ├── src/ # Main CLI binary └── amber.toml # Example config ``` ## Development ```bash # Build cargo build --release # Run tests cargo nextest run --workspace # Run cargo run -- --input test.docx --output ./output ``` ## License MIT OR Apache-2.0