Cookieは、無料のオープンソーステンプレートベースのファイルジェネレータであり、スクリプト、Makefile、LaTeXドキュメント、その他の1回限りのファイルを作成するプロセスを高速化します。
クッキー
クッキー cookiecutterに似ています 、プロジェクトテンプレートからプロジェクトを作成するコマンドラインユーティリティ(スタイル的には「 cookiecutters 」と呼ばれます) 「)任意のマークアップ形式またはプログラミング言語。ただし、 cookiecutterとは異なります 、 Cookie ファイルテンプレートからページを作成します。
テンプレートは~/.cookiecuttersに保存されます ディレクトリまたは$COOKIE_DIRで指定されたディレクトリ 。ここで主な開発者のテンプレートの例を見ることができます。
Cookieの機能
- GitHubで入手可能なソースコードを備えた無料のオープンソース。
- クロスプラットフォーム:Windows、GNU / Linux、およびmacOSで利用可能。
- ページテンプレートからファイルをすばやく作成します。
- タスクおよびファイルタイプ固有のカスタム初期化コマンドとして機能するエイリアスと関数をサポートします。
- 変数の置換。
LinuxへのCookieのインストール
ルートインストール
ルート権限があれば、gitからプロジェクトのクローンを作成し、次のコマンドを使用してアプリをビルドするだけです。
$ git clone https://github.com/bbugyi200/cookie $ cd cookie $ sudo make install
ユーザーのインストール
ルート権限がない場合は、別のビンを使用する必要があります gitリポジトリのクローンを作成し、次のコマンドでビルドするディレクトリ:
# make DESTDIR=/home/<user>/.local PREFIX= install
<user>を置き換えます ユーザー名を使用して、/home/<user>/.local/binを確認してください ディレクトリはシステムのパスにあります。
使用法
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. Cookieの使用 Cookiecutter に精通している場合は、簡単にアクセスできるはずです。 。ただし、両方のツールのいずれかに慣れていない場合は、詳しく調べる前にガイドを確認する必要があります。