fuzzyworld

template / commit

Updated the readme with some AI-generated intro text.

7491132936e5b313fc0e46cca1f69f0f3e50b4a0 · Pavel Safronov · 2023-04-10 11:23:13 -0700 · parents fd0a4446f86d

Updated the readme with some AI-generated intro text.
 .vscode/settings.json |  3 ++-
 README.md             | 21 ++++++++++++++++++---
 2 files changed, 20 insertions(+), 4 deletions(-)

diff --git a/.vscode/settings.json b/.vscode/settings.json
index 773e7a8..5f7d16f 100644
--- a/.vscode/settings.json
+++ b/.vscode/settings.json
@@ -15,6 +15,7 @@
     "targetdirectory",
     "templating",
     "untap",
-    "urfave"

+    "urfave",

+    "!Template",

   ]
 }
\ No newline at end of file
diff --git a/README.md b/README.md
index 02b3ac0..8da2c8e 100644
--- a/README.md
+++ b/README.md
@@ -6,10 +6,25 @@ template
 
 ## Description
 
-This CLI creates files and folders with generated templated names, for example `2022-09-26-fhl-2023.md` (generated on September 26, 2023, with the project name "FHL 2023").

-It's also possible to control the contents of the files: you can specify a template file or an inline template to set the file contents.

+template is a command-line interface (CLI) tool that automates the creation of files and folders with pre-defined names and contents, so you can focus on your work and not on repetitive setup tasks.

 
-This started as a hackathon project that I used to learn Go (golang) and to automate a repetitive task: creation of time-stamped files and folders.

+As developers and content creators, we often need to create files and folders with specific naming conventions, such as time-stamped file names, project-specific prefixes, and consistent suffixes. We also frequently need to populate these files with pre-defined contents, such as boilerplate code or templates for documentation. These tasks can be tedious and error-prone when done manually, especially when working on multiple projects or collaborating with others.

+

+template simplifies these tasks by providing a flexible and customizable way to create files and folders with consistent naming and content. With template, you can define your own naming patterns, file templates, and directory structures, or use pre-configured profiles that come with the tool. You can also pass in parameters at runtime to customize the output further, such as including a project name or arbitrary template data.

+

+template is built in Go and uses YAML and sprig templates for configuration. It supports creating both files and directories from predefined templates, as well as piped input for quick creation of files with custom content. With template, you can spend more time on your work and less time on setup and organization.

+

+## Usage

+

+To use template, you can run the template command followed by a profile name, parameters, and options. For example:

+

+```sh

+template daily "Cool Project"

+```

+

+This will create a new file in the format YYYY-MM-DD-cool_project.md in the ~/DailyNotes directory, with pre-defined contents.

+

+You can also define your own profiles in the ~/.template.yaml file, or specify file, directory, and script templates directly at runtime using the `-f`, `-d`, and `-s` options.

 
 ### Sample tool config