{"id":14981786,"url":"https://github.com/okelleydevelopment/tekton","last_synced_at":"2025-10-06T03:47:06.373Z","repository":{"id":58470302,"uuid":"531714204","full_name":"OkelleyDevelopment/tekton","owner":"OkelleyDevelopment","description":"Blazingly fast code snippet builder ","archived":false,"fork":false,"pushed_at":"2023-10-25T02:39:45.000Z","size":414,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-04-26T08:47:40.878Z","etag":null,"topics":["friendly-snippets","nvim","rust","snippet","vim","vim-snippets"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/OkelleyDevelopment.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-09-01T23:15:17.000Z","updated_at":"2023-02-08T16:40:21.000Z","dependencies_parsed_at":"2024-09-11T16:00:58.863Z","dependency_job_id":"f41fb834-5bb6-4dec-8b65-b7fdf54c2091","html_url":"https://github.com/OkelleyDevelopment/tekton","commit_stats":{"total_commits":24,"total_committers":2,"mean_commits":12.0,"dds":0.375,"last_synced_commit":"2e1f688707321890e1923b4bcae8e15f8f2cf03b"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OkelleyDevelopment%2Ftekton","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OkelleyDevelopment%2Ftekton/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OkelleyDevelopment%2Ftekton/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OkelleyDevelopment%2Ftekton/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/OkelleyDevelopment","download_url":"https://codeload.github.com/OkelleyDevelopment/tekton/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238795476,"owners_count":19531753,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["friendly-snippets","nvim","rust","snippet","vim","vim-snippets"],"created_at":"2024-09-24T14:04:15.219Z","updated_at":"2025-10-06T03:47:01.330Z","avatar_url":"https://github.com/OkelleyDevelopment.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# tekton [![Latest Version]][crates.io] ![Workflow] ![Rustc Version 1.66+]\n\n---\n\n[workflow]: https://github.com/OkelleyDevelopment/tekton/actions/workflows/ci.yml/badge.svg\n[latest version]: https://img.shields.io/crates/v/tekton.svg\n[crates.io]: https://crates.io/crates/tekton\n[rustc version 1.66+]: https://img.shields.io/badge/rustc-1.66+-blue.svg\n\nAuthor(s): Nicholas O'Kelley\n\nDate started: 2022-08-28\n\n## Motivation\n\nI needed a tool to speed up the time I spent reviewing snippets on the [`friendly-snippet`](https://github.com/rafamadriz/friendly-snippets) project.\n\nThe goals of such a tool are:\n\n- Sort many files **blazingly fast**\n- (Ideally) Sort alphabetically **blazingly fast**\n- Convert between snipmate and friendly-snippets (json) formats **blazingly** ... **fast**\n\n---\n\n## Installation and Usage\n\n### For published versions\n\n- `cargo install tekton`\n\n### For source builds\n\nFrom the project root:\n\n- `cargo install --path ./`\n\n### Usage\n\n**To convert**:\n\n- `tekton convert \u003cINPUT_FILENAME\u003e \u003cOUTPUT_FILENAME\u003e`\n\n\u003e Note:\n\u003e\n\u003e - Conversion supports bidirectional conversion between Snipmate (`*.snippet`) and JSON (`*.json`) snippets\n\u003e - Mapping is based on the input file\n\n**To sort**:\n\n- General format: `tekton sort \u003cINPUT_FILENAME\u003e [INTERACTIVE] [CRAWL]`\n  - To sort a single file: `tekton sort \u003cINPUT_NAME\u003e`\n  - To sort a directory: `tekton sort \u003cINPUT_NAME\u003e no true`\n\n\u003e Note:\n\u003e\n\u003e - `INTERACTIVE` should be the string `yes` if the user wants to fix any errors during the sort.\n\u003e\n\u003e   - Leaving this off will simply mean an error report is displayed on screen\n\u003e\n\u003e - `CRAWL` must be present to recursively walk the directories for snippets\n\u003e   - Any text present will result in a crawl, though `true` looks better.\n\n---\n\n## Demos\n\n- Conversion from Snipmate to `JSON`\n\n![json-bay-bee](./images/snipmate_to_json.png)\n\n- Conversion from the `JSON` snippets to Snipmate\n\n![Conversion](./images/converting_json_to_snipmate.png)\n\n- Sorting `friendly-snippets`, **blazingly fast** , with interactive mode off and directory crawling on.\n\n![Sorting](./images/sorting_json.png)\n\n---\n\n## Current Limitations\n\n1. 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.\n   - This can be automated via other scripting means (Rust, Go, Python, etc).\n2. 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.\n\n   - **Note**: I am partially working on writing a custom `Serialize` and `Deserialize` implementation to handle clean up the serialization for one element, though that will be tied to a future update.\n\n3. Currently do not sort Snipmate snippets.\n   - This was outside the scope, but might be something I consider in the future.\n\n---\n\n## Acknowledgements\n\n- My impatience for doing this by hand\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fokelleydevelopment%2Ftekton","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fokelleydevelopment%2Ftekton","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fokelleydevelopment%2Ftekton/lists"}