Cookie adalah pembuat file berbasis template gratis dan open source yang mempercepat proses penulisan skrip, Makefile, dokumen LaTeX, dan file satu kali lainnya.
Kuki
Kue mirip dengan pemotong kue , utilitas baris perintah yang membuat proyek dari template proyek (secara gaya disebut sebagai “cookiecutters “) dalam format markup atau bahasa pemrograman apa pun. Tapi tidak seperti cookiecutter , Kue membuat halaman dari template file.
Template disimpan di ~/.cookiecutters direktori atau direktori yang ditentukan oleh $COOKIE_DIR . Anda dapat melihat contoh template pengembang utama di sini.
Fitur dalam Cookie
- Gratis dan open source dengan kode sumber tersedia di GitHub.
- Cross-platform:tersedia di Windows, GNU/Linux, dan macOS.
- Buat file dengan cepat dari template halaman.
- Mendukung alias dan fungsi yang berfungsi sebagai perintah inisialisasi khusus tugas dan jenis file.
- Substitusi variabel.
Instalasi Cookie di Linux
Instalasi Root
Dengan izin root yang perlu Anda lakukan adalah mengkloning proyek dari git dan membangun aplikasi dengan perintah berikut:
$ git clone https://github.com/bbugyi200/cookie $ cd cookie $ sudo make install
Penginstalan Pengguna
Tanpa izin root, Anda harus menggunakan bin alternate alternatif direktori tempat Anda akan mengkloning repo git, lalu membangunnya dengan perintah:
# make DESTDIR=/home/<user>/.local PREFIX= install
Ganti <user> dengan nama pengguna Anda dan pastikan bahwa /home/<user>/.local/bin direktori ada di jalur sistem Anda.
Penggunaan
Usage: cookie [-d] [-D TARGET_DIR] [-f] [-m MODE] [-v] [-x] TEMPLATE [TARGET]
cookie -c
cookie -e TEMPLATE
cookie -h
cookie -l [TEMPLATE]
cookie -r TEMPLATE
Initializes a new file (TARGET) using a predefined template (TEMPLATE).
The target file can be a new script, configuration file, markup file, etc....
After the target file has been initialized, it is opened for editing using the
system's default editor.
Positional Arguments:
TARGET The name of the file to initialize.
Optional Arguments:
-d | --debug
Enable debug mode.
-c | --config
Edit the configuration file.
-D DIR | --bin-subdir DIR
Initialize TARGET into DIR, which should be a subdirectory of the
default bin directory (see the configuration file).
-e TEMPLATE | --edit TEMPLATE
Add / edit cookie template.
-f | --force
Force TARGET initialization to be relative to the current
directory. This option essentially overrides the ROOT_DIR
configuration setting. Enabled by default for non-executable
targets.
-h | --help
View this help message.
-l [TEMPLATE] | --list [TEMPLATE]
If TEMPLATE is provided, output template contents to STDOUT.
Otherwise, list available templates.
-m MODE | --mode MODE
Sets file mode bits. Accepts any form for MODE that is recognized
by the 'chmod' command.
-r TEMPLATE | --remove TEMPLATE
Delete cookie template.
-x
Make TARGET executable. Equivalent to '-m +x'.
-v | --verbose
Enable verbose output. Menggunakan Cookie harus datang dengan mudah kepada Anda jika Anda terbiasa dengan Cookiecutter . Namun jika Anda baru menggunakan kedua alat tersebut, Anda harus membaca panduan ini sebelum mempelajarinya.