| Crates.io | tekton |
| lib.rs | tekton |
| version | 0.3.0 |
| created_at | 2022-09-02 20:26:02.424069+00 |
| updated_at | 2023-10-25 02:40:22.320002+00 |
| description | A blazingly fast code snippet sorter |
| homepage | |
| repository | https://github.com/OkelleyDevelopment/tekton |
| max_upload_size | |
| id | 657575 |
| size | 108,989 |
Author(s): Nicholas O'Kelley
Date started: 2022-08-28
I needed a tool to speed up the time I spent reviewing snippets on the friendly-snippet project.
The goals of such a tool are:
cargo install tektonFrom the project root:
cargo install --path ./To convert:
tekton convert <INPUT_FILENAME> <OUTPUT_FILENAME>Note:
- Conversion supports bidirectional conversion between Snipmate (
*.snippet) and JSON (*.json) snippets- Mapping is based on the input file
To sort:
tekton sort <INPUT_FILENAME> [INTERACTIVE] [CRAWL]
tekton sort <INPUT_NAME>tekton sort <INPUT_NAME> no trueNote:
INTERACTIVEshould be the stringyesif the user wants to fix any errors during the sort.
- Leaving this off will simply mean an error report is displayed on screen
CRAWLmust be present to recursively walk the directories for snippets
- Any text present will result in a crawl, though
truelooks better.
JSON
JSON snippets to Snipmate
friendly-snippets, blazingly fast , with interactive mode off and directory crawling on.
The conversion doesn't process in large batches of files like the sort. This is intentional as conversions between formats should be isolated and limited in scope.
Snippet files with an array in the prefix field (even if it is just one) will convert all the snippets in the file to then have their snippets inserted into an array too.
Serialize and Deserialize implementation to handle clean up the serialization for one element, though that will be tied to a future update.Currently do not sort Snipmate snippets.