Convert
Convert an Outline into a Directory and File Structure
Once your outline is complete, you can run the convert
command to generate a directory structure and set of files based on your outline.md
file. The convert command will create directories for parts, files for chapters, and headings within the chapter files for sections and subsections. Conceptually, the structure of a Tanagra-based book, before compiling to final output, will look like this:
- Content (directory; contains book content)
- Part (directory; breaks up book into one or more parts; required)
- Chapter (*.md file; one file per chapter)
- Section (text heading; added as an H2 heading to the chapter file)
- Subsection (text heading; added as an H3 heading to the chapter file)
- Section (text heading; added as an H2 heading to the chapter file)
- Chapter (*.md file; one file per chapter)
- Part (directory; breaks up book into one or more parts; required)
#TODO: Media (need to figure out this part of the project)
The Content directory (first level) is generated by creating the book template. The directories, files, and heading text (within markdown files) created below the Content directory is generated by converting the outline file.
The tanagra convert
command will convert the outline.md
file into the directory and file structure seen outlined in purple.
tagangra convert
Run the convert
command to convert the outline.md
markdown file into a book directory and file structure in the content/
directory and adds section and subsection headings to chapter markdown files.
$ tanagra convert
The following is the sample outline that comes with your generated Tanagra book project:
# Table of Contents (Outline)
1. Part 0 - Part Title
1. Chapter 0 - Chapter Title
1. Section Title
1. Subsection Title
1. Section Title
1. Subsection Title
1. Chapter 1 - Chapter Title
1. Section Title
1. Subsection Title
1. Section Title
1. Subsection Title
1. Part 1 - Part Title
1. Chapter 2 - Chapter Title
1. Section Title
1. Subsection Title
1. Section Title
1. Subsection Title
1. Chapter 3 - Chapter Title
1. Section Title
1. Subsection Title
1. Section Title
1. Subsection Title
Given that outline, if you ran the convert command against that outline.md
file, the resulting directory and file structure would look like this:
project_directory/
content/
book_project_name/
Part 0 - Part Title/
Chapter 1 - Chapter Title.md
Section Title (text heading)
Subsection Title (text heading)
Chapter 2 - Chapter Title.md
Section Title (text heading)
Subsection Title (text heading)
Part 0 - Part Title_media/
Part 1 - Part Title/
Chapter 3 - Chapter Title.md
Section Title (text heading)
Subsection Title (text heading)
Chapter 4 - Chapter Title.md
Section Title (text heading)
Subsection Title (text heading)
Part 1 - Part Title_media/
Next Steps
Now that your book directory and file structure has been generated, you can write your book in the content/
directory and generated *.md files. Media files (images, etc.) will go in each book part’s ..._media/
directory. You’re now ready to learn more about authoring content in your book.