Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/starsheriff2/md-cleaner
This program checks your markdown files for any errors so your MD files are more polished. Built with Ruby.
https://github.com/starsheriff2/md-cleaner
markdown oop ruby
Last synced: 3 months ago
JSON representation
This program checks your markdown files for any errors so your MD files are more polished. Built with Ruby.
- Host: GitHub
- URL: https://github.com/starsheriff2/md-cleaner
- Owner: StarSheriff2
- License: mit
- Created: 2021-01-07T14:50:24.000Z (about 4 years ago)
- Default Branch: development
- Last Pushed: 2021-07-25T02:19:33.000Z (over 3 years ago)
- Last Synced: 2023-03-10T19:02:36.803Z (almost 2 years ago)
- Topics: markdown, oop, ruby
- Language: Ruby
- Homepage:
- Size: 254 KB
- Stars: 6
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
![](https://img.shields.io/badge/Microverse-blueviolet)
# Md Cleaner
> This is a linter program that checks for errors in markdown files specifically used in Github repositories.
![screenshot](./assets/app_screenshot.png)
In this project, I built a linter for markdown files. I made this tool with README.md files in mind that typically go inside Github repositories. It currently detects three types of errors:
- Heading errors
- Paragraph indent errors
- Italics in the middle of a word
-
After you run the program, it will return a list with all errors in your MD file, with the following information:
- Code line
- Character position
- Copy of code where an error was detected
- A brief description of the error and correction steps to fix itOnce you fix an error, the program won't show this error again if you run the program. Fix all issues until there are no more error messages. If you do, a message will appear stating there are no more errors.
## Built With
- Ruby
- RSpec, Rubocop
- VSCode, Github, Gitflow## Live Demo
- Repl live demo: [Live Demo Link](https://repl.it/@StarSheriff2/MD-Cleanerdemo)
## Getting Started
To get a local copy up and running follow these simple example steps.
### Setup
1. Open your terminal or command prompt.
2. If you don't have git installed in your system, skip this step and go to step 3. If you do have git installed in your system, clone this repository to your computer in any directory you want by copying this text into your command prompt/terminal: `[email protected]:StarSheriff2/MD-Cleaner.git`. Now go to step 6.
3. If you don't have git installed in your system, you can download the program files. To do this, click on the green button that says "**Code**", on the upper right side of the project frame.
4. You will see a dropdown menu. Click on "**Download ZIP**".
5. Go to the directory where you downloaded the **ZIP file** and open it. Extract its contents to any directory you want in your system.
6. If you are not in your system terminal/command prompt already, please open it and go to the directory where you cloned the remote repository or extracted the project files.
7. While in the root directory, type `bundle install`. This will install Rspec in your system, in case you don't have it installed already. (It also installs Rubocop; however, this gem is not necessary to make the program work).### Usage
1. To run the program, go to the projects's root directory and type `bin/md_linter.rb`
2. If this doesn\`t work, type `ruby ./bin/md_linter.rb`
3. By default the program checks for errors in 'lib/test.md'
4. If you want to check your own file do this:
- copy your markdown file into the lib directory
- open the 'md_linter.rb' file located in the 'bin' directory of the project
- substitute `file = 'lib/test.md` with your own filename, like so `file = 'lib/#filename.md'`
5. Run the program and it should return any errors it finds in your file### Run tests
To run the Rspec tests do the following:
- Open your terminal and go to the project's root directory
- Type this `rspec --format doc` to see test example results## Authors
👤 **Arturo Alvarez**
- GitHub: [@StarSheriff2](https://github.com/StarSheriff2)
- Twitter: [@Turo_83](https://twitter.com/Turo_83)
- LinkedIn: [Arturo Alvarez](https://www.linkedin.com/in/arturoalvarezv/)## Contributing
Contributions, issues, and feature requests are welcome!
Feel free to check the [issues page](https://github.com/StarSheriff2/md-cleaner-ruby-capstone/issues).
## Show your support
Give a ⭐️ if you like this project!
## Acknowledgments
- This article was very helpful in learning how to parse text: [How to Build a Parser With Ruby - RubyGuides](https://www.rubyguides.com/2015/04/parsing-with-ruby/), which is based on this project [matugm/simple-parser](https://github.com/matugm/simple-parser)
- Markdown best practices taken from here: [Basic Syntax | Markdown Guide](https://www.markdownguide.org/basic-syntax/)## 📝 License
This project is [MIT](https://github.com/StarSheriff2/md-cleaner-ruby-capstone/blob/basic-features/LICENSE) licensed.