Skip to content

xairaven/StyleGuard

StyleGuard

Rust-based🦀 project for parsing, analyzing, and validating Microsoft Word .docx styles, featuring a modular architecture with a core library, CLI tool, and validation engine.


🚀 Project Overview

The project has a focus on academic and professional formatting standards and is split into three main components:

  • .docx Library: Core crate for parsing and representing .docx files and their style definitions.
  • Validator: Library for defining and applying validation rules to document styles, supporting custom standards and preferences.
  • CLI Tool: Command-line interface for analyzing documents, generating reports, and automating style checks.

This modular design allows easy extension for new validation rules, integration into CI pipelines, or embedding in other Rust applications.

🔍 Key Features

  • Comprehensive Style Parsing: Reads and interprets all style-related XML from .docx files
  • Customizable Validation: Supports user-defined style standards and preferences
  • Detailed Reporting: Outputs human-readable validation reports
  • CLI Tool: Simple command-line interface for automation and scripting
  • Extensible Core: Add new style checks or document features with minimal effort
  • And more: logging, error reporting, integration-ready libraries, etc.

Supported Features: Paragraph styles, character styles, numbering, indentation, fonts, colors, and more.

🛠️ Technology Stack

Component Description
Programming Language Rust
XML Parsing quick-xml
CLI Library clap
Validation Engine Custom, extensible Rust code

⏳ TODO:

  • Better inheritance of user styles;
  • Processing of images, tables;
  • List processing;
  • Other elements.

📦 Precompiled Binaries

Precompiled binaries for Windows, Linux, and macOS can be found in the latest releases.

🔨 Building from Source

  1. Ensure you are using the latest stable version of Rust:

    rustup update
  2. Build and run the application:

    cargo run --package cli --release -- <arguments>

For example:

cargo run --package cli -- -s dte2023 -f html -o .\aaa.html -p 3 dev-resources\Diploma.docx

If you need help:

cargo run --package cli -- --help

Encounter any issues? Feel free to open an issue (or make a pull-request), and I'll likely help you out.

📰 License

This project is licensed under the MIT License.

🎆 Contributing

Contributions are welcome! Please fork the repository and create a pull request with your changes.

About

DOCX style and formatting validator for academic and professional documents.

Topics

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Languages