Skip to content

tivaliy/validocx

Folders and files

NameName
Last commit message
Last commit date

Latest commit

4d6362a · Jan 17, 2018

History

29 Commits
Sep 15, 2017
Jan 15, 2018
Jan 13, 2018
Jan 8, 2018
Jan 9, 2018
Aug 25, 2017
Jan 17, 2018
Sep 15, 2017
Sep 11, 2017
Jan 8, 2018
Jan 8, 2018

Repository files navigation

https://travis-ci.org/tivaliy/validocx.svg?branch=master

ValiDocX

Docx file validator based on python-docx

QuickStart

  1. Clone validocx:

git clone https://github.com/tivaliy/validocx.git

  1. Create isolated Python environment virtualenv venv and activate it source venv/bin/activte
  2. Install validocx with all necessary dependencies:

pip install -r requirements.txt .

  1. Specify file with requirements in YAML or JSON format
---
styles:
  heading1:
    font:
      unit: pt
      attributes:
        - 12.0
        - cs_bold
        - Times New Roman
      paragraph:
        unit: cm
        attributes:
        alignment: 0
sections:
  - unit: cm
    attributes:
      right_margin: 4.4
      start_type: 2
      top_margin: 5.2
      footer_distance: 4.1
      header_distance: 0.0
      left_margin: 4.4
      bottom_margin: 5.2
      orientation: 0
      page_height: 29.7
      page_width: 21.0
  1. Run validation from CLI:

usage: validocx [-h] -r REQUIREMENTS [--log-file LOG_FILE] [-q | -v] docx-file

positional arguments:
docx-file Docx file to be validated.
optional arguments:
-h, --help show this help message and exit
-r REQUIREMENTS, --requirements REQUIREMENTS
 File with the requirements. In YAML or JSON format.
--log-file LOG_FILE
 Log file to store logs.
-q, --quiet Decrease output verbosity.
-v, --verbose Increase output verbosity.

Releases

No releases published

Packages

No packages published

Languages