{"id":15914636,"url":"https://github.com/sharek-dev/silhouette","last_synced_at":"2026-07-03T09:32:27.992Z","repository":{"id":57467170,"uuid":"327258763","full_name":"sharek-dev/Silhouette","owner":"sharek-dev","description":"Silhouette a simple tool to generate projects from templates published on GitHub or any other Git repository","archived":false,"fork":false,"pushed_at":"2021-01-11T12:37:54.000Z","size":41,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-04-03T03:44:18.601Z","etag":null,"topics":["bootstrapping","python","python3","referenced-templates","template","template-project","template-repository"],"latest_commit_sha":null,"homepage":"https://github.com/sharek-org/Silhouette","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sharek-dev.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}},"created_at":"2021-01-06T09:13:51.000Z","updated_at":"2021-02-03T02:26:05.000Z","dependencies_parsed_at":"2022-09-10T02:01:09.922Z","dependency_job_id":null,"html_url":"https://github.com/sharek-dev/Silhouette","commit_stats":null,"previous_names":["sharek-org/silhouette"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sharek-dev%2FSilhouette","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sharek-dev%2FSilhouette/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sharek-dev%2FSilhouette/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sharek-dev%2FSilhouette/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sharek-dev","download_url":"https://codeload.github.com/sharek-dev/Silhouette/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246933357,"owners_count":20857052,"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":["bootstrapping","python","python3","referenced-templates","template","template-project","template-repository"],"created_at":"2024-10-06T17:04:50.933Z","updated_at":"2026-07-03T09:32:27.947Z","avatar_url":"https://github.com/sharek-dev.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Latest](https://img.shields.io/pypi/v/silhouette-cli)](https://pypi.org/project/silhouette-cli/)\n[![MIT license](https://img.shields.io/badge/License-MIT-blue.svg)](https://lbesson.mit-license.org/)\n\n# Silhouette\nSilhouette is a simple tool to generate projects from templates published on GitHub or any other Git repository. It's inspired from a great tool called [Giter8](http://www.foundweekends.org/giter8/index.html). It's written in python, but can produce files for any programming language.\n\n# Install \nPrerequest : \n- Python 3.6 or above\n- pip\n\nTo install using `pip` :\n```shell\npip install silhouette-cli\n```\n\n# Usage\nTemplate repositories must reside on GitHub and be named with the suffix `.slh` . We’re keeping a list of already published templates in the main branch of this project. \n\n## Generate a project \nTo generate a project from an already published template (for example [helkaroui/simple-flask-server.slh](https://github.com/helkaroui/simple-flask-server.slh)), you can run the following command in shell :\n\n```shell\nslh new helkaroui/simple-flask-server.slh ./\n```\n\n\n## List referenced templates\nWe keep track of published templates on github and store them in a json file `ref/templates.json`.\n\nTo list the referenced templates, you can run the following command :\n```shell\nslh list\n```\n\n\n# Making your own templates\n\n## Create a template layout\nTo create a template you should follow theses guidelines :\n- the template should be published publically to github\n- the repository name on github should ends with the prefix `.slh`\n\n\n### Create a template manually\n1- Create the `project` directory, this directory is where you should put your files\n2- Create a file named `default.properties` at repositroy root. This file is used to declare the project varaibles. Properties are simple keys and values that replace them. \n\ndefault.properties file may be placed in project/ directory, or directly under the root of the template. Properties are simple keys and values that replace them. \n\n### Init a template from command line\nuse the following command to init an empty template directory :\n\n```shell\nslh init myTemplateName\n```\n\n## How to use properties\nWe use a simple engine that evaluates the template's properties declared in `default.properties` file, in all the project files and paths.\n\n## Template properties\nThe template properties are bracketed with the $ character `$`. For example : a `classname` field might be referenced in the source as: \n\n```python\nclass $classname$:\n\n    def __init__(self):\n```\n\nIf in the interactive input we enter the property `$classname$` with value `MyModule`, the rendered file will contain :\n\n```python\nclass MyModule:\n\n    def __init__(self):\n```\n\n### Formatting template properties\nSilhouette supports formatting property fields with built-in functions. For example, the `author` property can be formatted in upper case with :\n```\n$author;upper$\n```\n\nHere are all the formatting functions available :\n\n    \"upper\" -\u003e To upper case\n    \"lower\" -\u003e To lower case\n    \"capitalize\" -\u003e Converts the first character to upper case\n    \"casefold\" -\u003e Converts string into lower case\n    \"strip\" -\u003e Remove spaces in start and end of the text\n    \"swapcase\" -\u003e Make the lower case letters upper case and the upper case letters lower case\n    \"title\" -\u003e Converts the first character of each word to upper case\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsharek-dev%2Fsilhouette","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsharek-dev%2Fsilhouette","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsharek-dev%2Fsilhouette/lists"}