{"id":20665158,"url":"https://github.com/martan03/makeit","last_synced_at":"2025-03-10T10:21:00.186Z","repository":{"id":242051532,"uuid":"783647630","full_name":"Martan03/makeit","owner":"Martan03","description":"Utility for creating and loading templates","archived":false,"fork":false,"pushed_at":"2024-06-09T20:09:51.000Z","size":247,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-17T12:48:48.352Z","etag":null,"topics":["cli-utility","makeit","rust","templates"],"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/Martan03.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":"2024-04-08T09:51:27.000Z","updated_at":"2024-06-10T12:46:21.000Z","dependencies_parsed_at":"2024-06-09T21:31:10.830Z","dependency_job_id":null,"html_url":"https://github.com/Martan03/makeit","commit_stats":null,"previous_names":["martan03/makeit"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Martan03%2Fmakeit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Martan03%2Fmakeit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Martan03%2Fmakeit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Martan03%2Fmakeit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Martan03","download_url":"https://codeload.github.com/Martan03/makeit/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242829740,"owners_count":20192052,"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":["cli-utility","makeit","rust","templates"],"created_at":"2024-11-16T19:28:50.161Z","updated_at":"2025-03-10T10:21:00.163Z","avatar_url":"https://github.com/Martan03.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Makeit thumbnail](assets/thumbnail-small.png)\n\n# makeit\n\nUtility for creating and loading templates\n\n## Table of Contents\n- [Installation](#installation)\n    - [AUR package](#aur-package)\n    - [Compile it your own](#compile-it-your-own)\n- [Usage](#usage)\n    - [Loading templates](#loading-templates)\n    - [Creating template](#creating-template)\n    - [Other usage](#other-usage)\n- [Detailed description](#detailed-description)\n    - [Custom expression language](#custom-expression-language)\n        - [Variables](#variables)\n            - [Internal variables](#internal-variables)\n        - [Literals](#literals)\n        - [Operators](#operators)\n            - [Operator +](#operator-)\n            - [Operator ==](#operator-)\n            - [Operator ??](#operator-)\n- [Technologies](#technologies)\n- [Links](#links)\n\n## Installation\n\n### AUR package\n\n`makeit` is available as an\n[AUR package](https://aur.archlinux.org/packages/makeit). You can install it\nwith any AUR package manager. This is example installation with\n[`yay`](https://github.com/Jguer/yay):\n\n```\nyay -S makeit\n```\n\n### Compile it your own\n\nYou can also clone this repo and compile it yourself. But that shouldn't be a\nproblem, since only thing you need is `cargo`:\n```\ncargo build -r\n```\nAfter it's done compiling, you can start it in `./target/release/makeit`\n\n## Usage\n\n### Loading templates\nYou can load already existing template. If you don't specify `-d`, template\nwill be loaded to current directory by default:\n```\n./makeit \u003ctemplate name\u003e [-d load/template/to]\n```\n\n### Creating template\nTo create template you have to do this (note that if `-d` isn't specified,\ntemplate is create from current directory):\n```\n./makeit \u003ctemplate name\u003e -c [-d create/template/from]\n```\n\n### Other usage\nTo see full usage and other options, visit `makeit` help or `man-page`:\n```\n./makeit -h\n```\n\n## Detailed description\n\n### Custom expression language\nFor parametrization of the templates I created custom expression language.\nExpressions are enclosed in `{{` and `}}`.\n\n#### Variables\n- Can be defined in `makeit.json` file of the template or supplied using\ncommand-line arguments\n- Name has to start with alphabetic character or underscore and is followed\nby any alphanumeric character or underscore\n\n##### Internal variables\n- `_PNAME`: project name based on project directory\n- `_PDIR`: project directory\n- `_OS`: operatins system\n\n#### Literals\n- Enclosed in double quotes (\")\n- They support escape sequences:\n    - `\\n`: newline\n    - `\\r`: carriage return\n    - `\\t`: tabulator\n    - `\\\\`: backslash\n    - `\\\"`: double quotes\n    - Other sequences are expanded to character following backslash\n\n#### Operators\n\n##### Operator +\n- Variables and literals concatenation\n- Combines them to single literal\n- Syntax:\n    - `EXPR1 + EXPR2`\n\n##### Operator ==\n- Compares two values for equality (`true` when equals, else `false`)\n- Syntax:\n    - `EXPR1 == EXPR2`\n\n##### Operator ??\n- The null coalescing operator - provides default value for an expression,\nwhich evaluates to `null`\n- Syntax:\n    - `EXPR1 ?? EXPR2`: returns value of `EXPR1` of not `null` else value of\n    `EXPR2`\n\n## Technologies\nI used these libraries, which were really helpful:\n- [dirs](https://crates.io/crates/dirs)\n    - Accessing config folder\n- [serde](https://crates.io/crates/serde)\n    - Saving and loading to JSON\n- [termint](https://crates.io/crates/termint)\n    - Colored printing\n\n## Links\n\n- **Author:** [Martan03](https://github.com/Martan03)\n- **GitHub repository:** [termint](https://github.com/Martan03/makeit)\n- **Author website:** [martan03.github.io](https://martan03.github.io)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmartan03%2Fmakeit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmartan03%2Fmakeit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmartan03%2Fmakeit/lists"}