Giter Club home page Giter Club logo

mdmerger's Introduction

mdmerger

mdmerger is a simple CLI tool designed to simplify the process of merging multiple markdown files into a single document, automatically generating a Table of Contents (ToC) for better navigation. This tool was born out of a personal need to create a PDF documentation from an existing GitLab wiki. Unfortunately, existing solutions were either too complex or did not meet the specific requirements.

Installation

To use mdmerger, clone this repository to your local machine:

git clone https://github.com/yourusername/mdmerger.git
cd mdmerger
chmod +x mdmerger.sh

Usage

Run mdmerger by specifying the main title as the first argument, followed by the markdown files you want to merge:

./mdmerger.sh "My Merged Document" file1.md file2.md file3.md

This will create a new markdown file with your specified main title, a ToC, and the combined content of the provided files.

Converting to PDF

After creating your merged markdown document, you may wish to convert it to PDF. I successfully used the following command for my project documentation, relying on Pandoc and wkhtmltopdf:

pandoc merged_file.md -o merged_file.pdf --pdf-engine=wkhtmltopdf

This command requires having both Pandoc and wkhtmltopdf installed on your machine. You can install Pandoc by following the instructions on the official website. For wkhtmltopdf, you can download the latest release from the official website.

Contributing

I am grateful for any contributions and improvements you're willing to make, no matter how big or small. Whether it's filing an issue, proposing a feature, or submitting a pull request, all contributions are warmly welcomed.

License

This project is licensed under the MIT License.

mdmerger's People

Contributors

lappemic 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.