Project rename
All checks were successful
CI Pipeline / build (push) Successful in 12s

This commit is contained in:
2025-12-02 13:21:13 +01:00
parent 29ebb9a8d1
commit dec346254c
36 changed files with 114 additions and 114 deletions

View File

@@ -19,28 +19,28 @@ bundle exec ruby -Ilib:test test/paragraph_test.rb -n test_paragraph_with_text
## Architecture
Ezdoc is a Ruby gem for creating .docx files using a DSL. The gem generates valid Office Open XML (OOXML) documents.
Notare is a Ruby gem for creating .docx files using a DSL. The gem generates valid Office Open XML (OOXML) documents.
### Core Components
- **Document** (`lib/ezdoc/document.rb`): Entry point via `Document.create`. Includes the Builder module and maintains a collection of nodes.
- **Document** (`lib/notare/document.rb`): Entry point via `Document.create`. Includes the Builder module and maintains a collection of nodes.
- **Builder** (`lib/ezdoc/builder.rb`): DSL methods (`p`, `text`, `h1`-`h6`, `b`, `i`, `u`, `ul`, `ol`, `li`, `table`, `tr`, `td`, `image`). Uses a format stack for nested formatting and target tracking for content placement.
- **Builder** (`lib/notare/builder.rb`): DSL methods (`p`, `text`, `h1`-`h6`, `b`, `i`, `u`, `ul`, `ol`, `li`, `table`, `tr`, `td`, `image`). Uses a format stack for nested formatting and target tracking for content placement.
- **Nodes** (`lib/ezdoc/nodes/`): Document element representations (Paragraph, Run, Image, List, ListItem, Table, TableRow, TableCell). All inherit from `Nodes::Base`.
- **Nodes** (`lib/notare/nodes/`): Document element representations (Paragraph, Run, Image, List, ListItem, Table, TableRow, TableCell). All inherit from `Nodes::Base`.
- **Style** (`lib/ezdoc/style.rb`): Style definitions with text properties (bold, italic, color, size, font) and paragraph properties (align, indent, spacing).
- **Style** (`lib/notare/style.rb`): Style definitions with text properties (bold, italic, color, size, font) and paragraph properties (align, indent, spacing).
- **Package** (`lib/ezdoc/package.rb`): Assembles the docx ZIP structure using rubyzip. Coordinates XML generation.
- **Package** (`lib/notare/package.rb`): Assembles the docx ZIP structure using rubyzip. Coordinates XML generation.
- **XML generators** (`lib/ezdoc/xml/`): Generate OOXML-compliant XML:
- **XML generators** (`lib/notare/xml/`): Generate OOXML-compliant XML:
- `DocumentXml`: Main content with paragraphs, lists, tables, images
- `StylesXml`: styles.xml with built-in and custom styles
- `ContentTypes`: [Content_Types].xml
- `Relationships`: .rels files
- `Numbering`: numbering.xml for lists
- **ImageDimensions** (`lib/ezdoc/image_dimensions.rb`): Uses fastimage gem to read image dimensions for EMU calculations.
- **ImageDimensions** (`lib/notare/image_dimensions.rb`): Uses fastimage gem to read image dimensions for EMU calculations.
### Data Flow
@@ -51,4 +51,4 @@ Ezdoc is a Ruby gem for creating .docx files using a DSL. The gem generates vali
### Testing
Tests use Minitest. `EzdocTestHelpers` module provides helpers that create temp documents and extract XML for assertions.
Tests use Minitest. `NotareTestHelpers` module provides helpers that create temp documents and extract XML for assertions.