docdoc

Crates.iodocdoc
lib.rsdocdoc
version0.0.3
sourcesrc
created_at2023-06-26 07:38:55.579035
updated_at2023-07-05 08:39:12.456434
descriptionSimple tool that stitches together a tree of text-based files
homepage
repositoryhttps://github.com/hdoordt/docdoc
max_upload_size
id900126
size30,161
Henk Oordt (hdoordt)

documentation

https://docs.rs/docdoc

README

DocDoc

crates.io Documentation

Simple tool that stitches together a tree of text-based files. Currently only supports markdown.

Why? I couln't find an easy to use and install tool to stitch together my markdown files. And because it's fun, of course!

Installation

You'll need Rust and Cargo to build or install this tool. You can find installation instructions for Rust and Cargo at https://rustup.rs/.

To install the latest release, just run

cargo install docdoc

How it works

Create an entry file. Let's call it entry.md. It has the following content

# My paper
A paper about DocDoc.

#[docdoc:path="./intro.md"]

#[docdoc:path="./conclusion.md"]

You'll notice the #[docdoc:path="..."] directives. These directives tell DocDoc where to find the content to include. DocDoc will replace the directives with the contents of the files in the paths, and resolve its includes recursively.

Let's add some other docs. First, intro.md:

## Introduction

This is the introduction to my paper.
I like to keep things short.

And then conclusion.md:

## Conclusion
So yeah, that was it. I had fun!

Now let's have DocDoc stitch all this together:

docdoc -o output.md entry.md

And done! Open output.md to read the contents of the whole paper.

Features

  • Include files from paths
  • Detect and error on cyclic imports
  • Watch files
  • Include from git
  • [YOUR FEATURE HERE] If you're missing a feature, please open an issue and we'll discuss it.
Commit count: 23

cargo fmt