{"id":21980063,"url":"https://github.com/parafoxia/proclip","last_synced_at":"2025-12-14T14:58:21.396Z","repository":{"id":56349826,"uuid":"523419812","full_name":"parafoxia/proclip","owner":"parafoxia","description":"A powerful templating tool for your projects.","archived":false,"fork":false,"pushed_at":"2022-08-13T02:28:58.000Z","size":42,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-04T04:18:01.329Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/parafoxia.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-08-10T16:36:18.000Z","updated_at":"2022-08-11T01:58:23.000Z","dependencies_parsed_at":"2022-08-15T17:10:10.723Z","dependency_job_id":null,"html_url":"https://github.com/parafoxia/proclip","commit_stats":null,"previous_names":["parafoxia/codeclip"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parafoxia%2Fproclip","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parafoxia%2Fproclip/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parafoxia%2Fproclip/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parafoxia%2Fproclip/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/parafoxia","download_url":"https://codeload.github.com/parafoxia/proclip/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245040698,"owners_count":20551308,"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":[],"created_at":"2024-11-29T17:09:27.547Z","updated_at":"2025-10-28T02:49:48.456Z","avatar_url":"https://github.com/parafoxia.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Proclip\n\n[![PyPi version](https://img.shields.io/pypi/v/proclip.svg)](https://pypi.python.org/pypi/proclip/)\n[![PyPI - Status](https://img.shields.io/pypi/status/proclip)](https://pypi.python.org/pypi/proclip/)\n[![Downloads](https://pepy.tech/badge/proclip)](https://pepy.tech/project/proclip)\n[![GitHub last commit](https://img.shields.io/github/last-commit/parafoxia/proclip)](https://github.com/parafoxia/proclip)\n[![License](https://img.shields.io/github/license/parafoxia/proclip.svg)](https://github.com/parafoxia/proclip/blob/main/LICENSE)\n\n\u003c!-- [![CI](https://github.com/parafoxia/proclip/actions/workflows/ci.yml/badge.svg)](https://github.com/parafoxia/proclip/actions/workflows/ci.yml)\n[![Read the Docs](https://img.shields.io/readthedocs/proclip)](https://proclip.readthedocs.io/en/latest/index.html)\n[![Maintainability](https://api.codeclimate.com/v1/badges/8819bdebb2d4aa8dfcb7/maintainability)](https://codeclimate.com/github/parafoxia/proclip/maintainability)\n[![Test Coverage](https://api.codeclimate.com/v1/badges/8819bdebb2d4aa8dfcb7/test_coverage)](https://codeclimate.com/github/parafoxia/proclip/test_coverage) --\u003e\n\nA powerful templating tool for your projects.\n\nCPython versions 3.7 through 3.11-dev and PyPy versions 3.7 through 3.9 are officially supported.\n\nWindows, MacOS, and Linux are all supported.\n\n## Installation\n\nTo install the latest stable version of Proclip, use the following command:\n```sh\npip install proclip\n```\n\nYou can also install the latest development version using the following command:\n```sh\npip install git+https://github.com/parafoxia/proclip\n```\n\nYou may need to prefix these commands with a call to the Python interpreter depending on your OS and Python configuration.\n\n## Creating clips\n\nYou can create clips using the following command:\n\n```sh\nclip new \u003cname\u003e \u003cfile\u003e [-o output-dir]\n```\n\nUse `clip new --help` for more information on what each option does.\n\nTo create a clip, first create a file, and code it how you want it to look.\nYou can also include variables that Proclip can replace when you paste the clip.\nVariables use a slightly modified Jinja syntax, which additionally allows for default values to be provided.\n\nTake the following example:\n\n```py\nclass {{ cls = MyClass }}:\n    def __init__(self, n: int) -\u003e None:\n        self.{{ attr }} = n\n\n    @property\n    def number(self) -\u003e int:\n        return self.{{ attr }}\n\nif __name__ == \"__main__\":\n    c = {{ cls }}(5)\n    print(c.number)\n```\n\nIn this example, you have two distinct variables: `cls`, and `attr`.\n`cls` has a default value (`MyClass`), so when you paste the clip, that value will be used if you don't supply one.\nNote that only the first instance of `cls` needs a default value.\nKeep in mind that only one default value can be assigned per variable; others will be overwritten.\n\n## Pasting clips\n\nYou can paste clips using the following command:\n\n```sh\nclip paste \u003cname\u003e [-i input-dir] [-o output] [-v variables]\n```\n\nUse `clip paste --help` for more information on what each option does.\n\nYou can use the `-v` flag to insert values for variables when pasting.\nVariables that were not assigned default values when the clip was created need a value supplied to them.\nDefault values can be overridden if you choose to do so.\n\nVariables are passed as strings, where a value needs to be assigned to a key (for example, `key=value`).\nYou can use commas to separate multiple variable assignments (`key1=value1,key2=value2`).\nIn the above example, passing `-v \"attr=n\"` produces the following file:\n\n```py\nclass MyClass:\n    def __init__(self, n: int) -\u003e None:\n        self.n = n\n\n    @property\n    def number(self) -\u003e int:\n        return self.n\n\nif __name__ == \"__main__\":\n    c = MyClass(5)\n    print(c.number)\n```\n\n## Contributing\n\nContributions are very much welcome! To get started:\n\n* Familiarise yourself with the [code of conduct](https://github.com/parafoxia/proclip/blob/main/CODE_OF_CONDUCT.md)\n* Have a look at the [contributing guide](https://github.com/parafoxia/proclip/blob/main/CONTRIBUTING.md)\n\n## License\n\nThe Proclip module for Python is licensed under the [BSD 3-Clause License](https://github.com/parafoxia/proclip/blob/main/LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparafoxia%2Fproclip","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fparafoxia%2Fproclip","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparafoxia%2Fproclip/lists"}