Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/transmissions11/headers
Generate perfect code headers every time.
https://github.com/transmissions11/headers
Last synced: 3 days ago
JSON representation
Generate perfect code headers every time.
- Host: GitHub
- URL: https://github.com/transmissions11/headers
- Owner: transmissions11
- Created: 2022-03-31T04:34:58.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2024-04-28T19:20:00.000Z (9 months ago)
- Last Synced: 2025-01-06T04:47:30.441Z (5 days ago)
- Language: Rust
- Homepage:
- Size: 15.6 KB
- Stars: 245
- Watchers: 6
- Forks: 28
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# headers
Generate perfect code headers every time.
## Build
You need Rust and Cargo installed on your machine. See the installation guide
[here](https://doc.rust-lang.org/cargo/getting-started/installation.html).Then clone the repo and install the CLI globally like this:
```sh
cargo install --path .
```## Usage
```sh
λ ./headers "testing 123"
``````sh
/*//////////////////////////////////////////////////////////////
TESTING 123
//////////////////////////////////////////////////////////////*/
```It will also copy the header to your clipboard automatically.
### With VSCode
Set your global [`tasks.json`](https://stackoverflow.com/questions/41046494/making-global-tasks-in-vs-code) like so to add the command as task:
```json
{
"version": "2.0.0",
"tasks": [
{
"label": "Generate Header",
"type": "shell",
"command": "headers ${input:header}",
"presentation": {
"reveal": "never"
},
"problemMatcher": []
}
],
"inputs": [
{
"id": "header",
"description": "Header",
"type": "promptString"
}
]
}
```To really speed-up your workflow, you can even add a keybind for the task in [`keybindings.json`](https://code.visualstudio.com/docs/getstarted/keybindings):
```json
[
{
"key": "CMD+h",
"command": "workbench.action.tasks.runTask",
"args": "Generate Header"
}
]
```This will copy the generated header to your clipboard.
## Credits
Inspired by virtualjpeg's [`blocky`](https://github.com/virtualjpeg/blocky).