https://github.com/esnet/cookiecutter-zeekpackage
Cookiecutter template for Zeek packages
https://github.com/esnet/cookiecutter-zeekpackage
Last synced: about 1 year ago
JSON representation
Cookiecutter template for Zeek packages
- Host: GitHub
- URL: https://github.com/esnet/cookiecutter-zeekpackage
- Owner: esnet
- License: other
- Created: 2020-07-23T21:32:41.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2021-06-11T16:58:41.000Z (about 5 years ago)
- Last Synced: 2025-04-30T11:55:49.622Z (about 1 year ago)
- Language: Python
- Size: 136 KB
- Stars: 5
- Watchers: 19
- Forks: 0
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Cookiecutter Zeek Package
Cookiecutter template for a Zeek package (zkg).
* GitHub repo: https://github.com/esnet/cookiecutter-zeekpackage
* Free software: BSD license
## Features
* Script testing with ``btest``
* GitHub integration: Actions for testing and building documentation as GitHub Pages
* Documentation generation
* Code coverage analysis
## Quickstart
Install Cruft:
pip install -U cruft
### New Package
Generate a Zeek package project:
cruft create https://github.com/esnet/cookiecutter-zeekpackage.git
Answer some questions, and it will create a new directory for you. Follow the instructions in README.md
### Existing Package
Create a new branch (optional):
git checkout -b feat/use-template
Go back up a directory, and run:
cd ..; cruft create -f https://github.com/esnet/cookiecutter-zeekpackage.git
Answer the questions. Note that `project_slug` must match your directory name.
At this point, some of your files have been overwritten. Run `git status`, and review the proposed changes. Some helpful commands:
* To accept the changes, `git add filename`.
* To reject the changes to an existing file, `git checkout -- filename`.
* To reject the changes to a new file, `rm filename`.
* If you want to save the old version of a file, to copy/paste some portions of it: `git show HEAD:README.rst > README.old`
## Updating
To update, `cruft update`.
Note that in some cases, newly created files or files that were deleted may not get added correctly. There is a cruft issue tracking this behavior.
## Configuration
Some of the questions that that cookiecutter will prompt you for will likely be the same across many different packages. You can create a [cookiecutter configuration file](https://cookiecutter.readthedocs.io/en/1.7.2/advanced/user_config.html) as `~/.cookiecutterrc`, which will be read as the defaults:
``` yaml
default_context:
github_username: "grigorescu"
project_credits: "Vlad Grigorescu "
project_namespace: "ESnet"
copyright_owner: "Energy Sciences Network"
open_source_license: "BSD license"
```