From 29d27eec189b8cb5f82963d9adbb6635d5c8b260 Mon Sep 17 00:00:00 2001 From: Markus Fleschutz Date: Thu, 5 Jun 2025 14:08:21 +0200 Subject: [PATCH] Renamed template to New.txt --- data/templates/Markdown.md | 4 ++-- data/templates/{Text.txt => New.txt} | 4 ++-- scripts/new-text-file.ps1 | 10 +++++----- 3 files changed, 9 insertions(+), 9 deletions(-) rename data/templates/{Text.txt => New.txt} (67%) diff --git a/data/templates/Markdown.md b/data/templates/Markdown.md index c0c9556e..de7becdd 100644 --- a/data/templates/Markdown.md +++ b/data/templates/Markdown.md @@ -1,5 +1,5 @@ -Your Headline -============= +Headline +======== Some introductory words... diff --git a/data/templates/Text.txt b/data/templates/New.txt similarity index 67% rename from data/templates/Text.txt rename to data/templates/New.txt index c0c9556e..de7becdd 100644 --- a/data/templates/Text.txt +++ b/data/templates/New.txt @@ -1,5 +1,5 @@ -Your Headline -============= +Headline +======== Some introductory words... diff --git a/scripts/new-text-file.ps1 b/scripts/new-text-file.ps1 index 727f8cc7..48c123d5 100755 --- a/scripts/new-text-file.ps1 +++ b/scripts/new-text-file.ps1 @@ -1,13 +1,13 @@ <# .SYNOPSIS - Creates a new text file + Creates a text file .DESCRIPTION - This PowerShell script creates a new .txt file from template file at: ../data/templates/Text.txt. + This PowerShell script creates a new .txt file from: ../data/templates/New.txt. .PARAMETER path Specifies the path and new filename (README.txt by default) .EXAMPLE PS> ./new-text-file.ps1 - ✅ New file 'README.txt' created from template 'Text.txt'. + ✅ New 'README.txt' created (from data/templates/New.txt). .LINK https://github.com/fleschutz/PowerShell .NOTES @@ -17,11 +17,11 @@ param([string]$path = "README.txt") try { - $pathToTemplate = Resolve-Path "$PSScriptRoot/../data/templates/Text.txt" + $pathToTemplate = Resolve-Path "$PSScriptRoot/../data/templates/New.txt" Copy-Item $pathToTemplate "$path" if ($lastExitCode -ne 0) { throw "Can't copy template to: $path" } - "✅ New file '$path' created from template 'Text.txt'." + "✅ New '$path' created (from data/templates/New.txt)." exit 0 # success } catch { "⚠️ Error: $($Error[0])"