Cookie is a free and open supply template-based file generator that quickens the method of writing scripts, Makefiles, LaTeX paperwork, and different one-off information.
Cookie is much like cookiecutter, a command-line utility that creates initiatives from venture templates (stylistically known as “cookiecutters“) in any markup format or programming language. However in contrast to cookiecutter, Cookie creates pages from file templates.
The templates are saved within the ~/.cookiecutters listing or the listing specified by $COOKIE_DIR. You’ll be able to see examples of the primary developer’s templates right here.
Options in Cookie
Free and open supply with supply code out there on GitHub.
Cross-platform: out there on Home windows, GNU/Linux, and macOS.
Shortly create information from web page templates.
Helps aliases and capabilities which function job and filetype-specific customized initialization instructions.
Set up of Cookie in Linux
Root Set up
With root permission all it’s essential to do is clone the venture from git and constructing the app with the next instructions:
$ git clone https://github.com/bbugyi200/cookie
$ cd cookie
$ sudo make set up
Consumer Set up
With out root permission you’ll need to make use of an alternate bin listing which you’d clone the git repo into after which construct with the command:
# make DESTDIR=/residence//.native PREFIX= set up
Change together with your username and be sure that the /residence//.native/bindirectory is in your system’s path.
Utilization: cookie [-d] [-D TARGET_DIR] [-f] [-m MODE] [-v] [-x] TEMPLATE [TARGET]
cookie -e TEMPLATE
cookie -l [TEMPLATE]
cookie -r TEMPLATE
Initializes a brand new file (TARGET) utilizing a predefined template (TEMPLATE).
The goal file could be a new script, configuration file, markup file, and so on….
After the goal file has been initialized, it’s opened for modifying utilizing the
system’s default editor.
TARGET The identify of the file to initialize.
-d | –debug
Allow debug mode.
-c | –config
Edit the configuration file.
-D DIR | –bin-subdir DIR
Initialize TARGET into DIR, which must be a subdirectory of the
default bin listing (see the configuration file).
-e TEMPLATE | –edit TEMPLATE
Add / edit cookie template.
-f | –force
Drive TARGET initialization to be relative to the present
listing. This selection basically overrides the ROOT_DIR
configuration setting. Enabled by default for non-executable
-h | –help
View this assist message.
-l [TEMPLATE] | –list [TEMPLATE]
If TEMPLATE is offered, output template contents to STDOUT.
In any other case, record out there templates.
-m MODE | –mode MODE
Units file mode bits. Accepts any type for MODE that’s acknowledged
by the ‘chmod’ command.
-r TEMPLATE | –remove TEMPLATE
Delete cookie template.
Make TARGET executable. Equal to ‘-m +x’.
-v | –verbose
Allow verbose output.
Utilizing Cookie ought to come simply to you in case you are accustomed to Cookiecutter. However if you happen to’re new to both of each instruments then it’s essential to go over the information earlier than delving in.