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>
This commit is contained in:
2026-09-13 08:37:18 -05:00
parent 981cd853b9
commit caa0001922
41 changed files with 789 additions and 53 deletions
+84
View File
@@ -0,0 +1,84 @@
#!/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."