GithubHelp home page GithubHelp logo

gitzain / markdown-validator Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 26 KB

Ensure your markdown files adhere to a specific structure with Markdown Validator. Create a schema (XSD), create your markdown file, and use this tool to validate its structure.

Python 100.00%
markdown markdown-syntax schema schema-validation syntax-checker markdown-validation

markdown-validator's Introduction

Markdown Validator

Ensure your markdown files adhere to a specific structure with Markdown Validator. Create a schema (XSD), create your markdown file, and use this tool to validate its structure.

Table of content

Motivation

Markdown is a great way to write all sorts of technical documentation. When you have lots of teams producing technical documentation like policies, standards etc you need a way to ensure they're all sticking to the recommended structure. For example we might want to mandate a principal document must contain certain headers, paragraphs in a certain order.

Markdown Validator works by converting the markdown file to xhtml which can be validated against a schema (XSD file). XSD (XML Schema Definition) is a World Wide Web Consortium (W3C) recommendation that specifies how to formally describe the elements in an Extensible Markup Language (XML) document.

Ultimately all you have to do is provide a schema (XSD file) and a markdown file and the tool will let you know if the markdown file conforms or not.

Installation & Usage

  1. Download the files
  2. Navigate to the directory that contains the files from this project
  3. Run pip3 install -r requirements.txt to make sure you have all the requirements installed
  4. Run the validator: python3 mdvalidator.py "schema/principal.xsd" "markdown/principal.md". The first parameter is the path to the schema, the second is the markdown to be validated. Test files have been provided so this command will work out the box.

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Added some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

History

29/01/2021: v1 Initial release

Credits

License

See the LICENSE file in this project's directory.

markdown-validator's People

Contributors

gitzain avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.