Crates.io | docdoc |
lib.rs | docdoc |
version | 0.0.3 |
source | src |
created_at | 2023-06-26 07:38:55.579035 |
updated_at | 2023-07-05 08:39:12.456434 |
description | Simple tool that stitches together a tree of text-based files |
homepage | |
repository | https://github.com/hdoordt/docdoc |
max_upload_size | |
id | 900126 |
size | 30,161 |
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!
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
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.