Files
md-manuscript/templates/snowflake/create_structure.sh
T
landon caa0001922 feat: Replace cookiecutter with built-in MiniJinja templating
- Add MiniJinja dependency for Jinja2-compatible templating
- Create new project_template.rs module for template rendering
- Bundle snowflake template in templates/snowflake/ directory
- Remove dependency on external cookiecutter Python tool
- Handle Gitea publishing natively in Rust instead of Python hooks
- Update default template path to use bundled template with fallback
- Update README to reflect new built-in templating
- All tests pass

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-09-13 08:37:18 -05:00

85 lines
3.0 KiB
Bash
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/usr/bin/env bash
#
# create_snowflake_structure.sh
# -------------------------------------------------
# Creates a ready‑to‑use folder layout for the Snowflake
# writing outline method.
#
# Usage:
# ./create_snowflake_structure.sh "MyNovel"
#
# If no argument is supplied, the script defaults to a folder
# named "SnowflakeProject".
# -------------------------------------------------
set -euo pipefail # safety: exit on error, treat unset vars as errors
# ------------------------------------------------------------------
# Helper: print a short usage message
# ------------------------------------------------------------------
usage() {
echo "Usage: $0 [project_folder_name]"
echo "Creates the Snowflake writing‑method folder structure."
exit 1
}
# ------------------------------------------------------------------
# Determine the root folder name
# ------------------------------------------------------------------
PROJECT_NAME="${1:-SnowflakeProject}"
ROOT_DIR="${PWD}/${PROJECT_NAME}"
# ------------------------------------------------------------------
# Define the directory tree (relative to ROOT_DIR)
# ------------------------------------------------------------------
DIRS=(
"01-Premise"
"02-Synopsis"
"03-Characters/main_characters"
"03-Characters/supporting_characters"
"03-Characters/character_grid"
"04-PlotOutline"
"04-PlotOutline/scene_breakdown"
"05-NarrativeSheets/act_1"
"05-NarrativeSheets/act_2"
"05-NarrativeSheets/act_3"
"06-FirstDraft"
"07-Revisions/structural_edits"
"07-Revisions/line_edits"
"07-Revisions/proofreading"
"08-Final/metadata"
"08-Final/submission_materials"
)
# ------------------------------------------------------------------
# Create the directories
# ------------------------------------------------------------------
echo "Creating project folder: ${ROOT_DIR}"
mkdir -p "${ROOT_DIR}"
for d in "${DIRS[@]}"; do
mkdir -p "${ROOT_DIR}/${d}"
done
# ------------------------------------------------------------------
# Optional: create placeholder files so you have a starting point
# ------------------------------------------------------------------
touch "${ROOT_DIR}/01-Premise/premise.txt"
touch "${ROOT_DIR}/02-Synopsis/synopsis.txt"
touch "${ROOT_DIR}/03-Characters/main_characters/protagonist.md"
touch "${ROOT_DIR}/03-Characters/main_characters/antagonist.md"
touch "${ROOT_DIR}/03-Characters/character_grid/character_grid.xlsx"
touch "${ROOT_DIR}/04-PlotOutline/plot_outline.docx"
touch "${ROOT_DIR}/05-NarrativeSheets/act_1/scene_01.md"
touch "${ROOT_DIR}/06-FirstDraft/draft_v1.docx"
touch "${ROOT_DIR}/07-Revisions/structural_edits/notes.txt"
touch "${ROOT_DIR}/08-Final/final_manuscript.docx"
touch "${ROOT_DIR}/README.md"
# ------------------------------------------------------------------
# Finished
# ------------------------------------------------------------------
echo "Folder structure created successfully!"
echo "Root directory: ${ROOT_DIR}"
echo "You can now start populating the files."