Examples¶
The examples/
directory contains Markdown files that demonstrate Draft commands.
Getting Started¶
- Create a new project:
draft create-project 'New Project'
- Navigate to the project’s root directory:
cd new-project
- Download the
examples/
folder into thenew-project/
directory:svn checkout https://github.com/edelgm6/draft/trunk/examples
- Copy all of the files in
examples/
into yournew-project/
root directory
Trying the Commands¶
parse, stats, outline, and compile¶
parse¶
parse.md
contains the first chapters of Moby Dick and can be used to build out a starter file tree.
- Ensure your terminal is navigated to
new-project/
root directory and thatparse.md
is in the same folder - Run
draft parse parse.md
You should now find a starting file tree based on the contents of parse.md
in the project/
folder.
stats¶
- Run
draft stats
You’ll now have a printout of the word count, section count, chapter count, and sub-chapter count
outline¶
- Run
draft outline
This creates outline.md
which is a Markdown file showing the basic outline of your project.
compile¶
- Run
draft compile
This compiles your entire project into a single Markdown file, Moby Dick.md.
split¶
split.md
contains a paragraph from Moby Dick where each paragraph takes up a single line.
To make writing and change tracking in Git easier, we want to use draft split
to put each sentence on its own line.
- Ensure your terminal is navigated to the same folder containing
split.md
- Run
draft split split.md
split.md
will now have each of its sentences on a discrete line.
If you’ve already tried the parse, stats, outline, and compile example, you can run draft split
to act on every file across the entire project/
folder.
sequence¶
sequence/
contains a project with files that have a duplicate sequence:
- Call Me Ishmael.md
and Manhattoes.md
both have the same sequence of 1
- There is no 2
sequence
To show how the draft sequence
command fixes this:
- Make sure your
project/
folder is completely empty - Move
sequence/
into the project folder - Run
draft sequence
You will be prompted to choose which of the 1 indexed files should go first. Whichever you choose will become the new 1 sequence and the other will be come the 2 sequence.