{"id":22799126,"url":"https://github.com/thomd/lepidoptera","last_synced_at":"2025-04-19T16:43:36.343Z","repository":{"id":1160965,"uuid":"1049693","full_name":"thomd/lepidoptera","owner":"thomd","description":"A life-enhancing code generator for everyday use","archived":false,"fork":false,"pushed_at":"2011-02-22T22:34:33.000Z","size":554,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-13T11:06:16.777Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://thomd.github.com/lepidoptera/","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thomd.png","metadata":{"files":{"readme":"README.md","changelog":"HISTORY.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2010-11-04T00:06:45.000Z","updated_at":"2014-01-07T04:54:37.000Z","dependencies_parsed_at":"2022-08-16T12:20:40.004Z","dependency_job_id":null,"html_url":"https://github.com/thomd/lepidoptera","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomd%2Flepidoptera","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomd%2Flepidoptera/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomd%2Flepidoptera/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomd%2Flepidoptera/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thomd","download_url":"https://codeload.github.com/thomd/lepidoptera/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249740745,"owners_count":21318706,"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-12-12T07:07:58.455Z","updated_at":"2025-04-19T16:43:36.325Z","avatar_url":"https://github.com/thomd.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"lepidoptera\n===========\n\nLepidoptera /ˌlɛpɪˈdɒptərə/\n\n1. _an order of insects that comprises the butterflies and moths. They have four large scale-covered wings that bear distinctive markings, and larvae that are caterpillars._ ORIGIN _modern Latin (plural), from Greek lepis, lepid- ‘scale’ + pteron ‘wing.’_\n\n2. _A life-enhancing __code generator__ for everyday use._\n\nWhat is lepidoptera?\n--------------------\n\nLepidoptera is a simple and easy to extend __code generator for common every day projects__.  \nTechnically, Lepidoptera is a wrapper for [rubigen][r] which allows setting up code templates for arbitrary projects.\n\nLepidopteras code generators are structured in __generator groups__. A generators group is just a container for multiple generators, where as a generator is also called a __generator type__.\n\nFor the time being, Lepidoptera has code generators for the following project types (more to come):\n\n* [jquery][j] generators:\n  * jquery plugin \n* [heroku][h] generators:\n  * static pages \n  * a [sinatra][s] application\n\nInstallation\n------------\n\n    $ sudo gem install lepidoptera\n\nAs [lep][wiki-2] (/ˈlɛp/) is a short for [lepidoptera][wiki-1], this gem will install an executable `lep`\n\nFor aesthetic reason, you may also set a synonym alias `butterfly` in your `.bashrc` file:\n\n    alias butterfly='lep $1'\n    \nUsage\n-----\n\n    $ lep [options] \u003cgenerator-group\u003e \u003cgenerator-type\u003e \u003cproject-name\u003e\n\nwith the following __options__:\n\n    -q, --quiet              Suppress status output.\n    -n, --new                Create a new code generator stub in ~/.lepidoptera.\n    -g, --git                Create a git repository after code generation.\n    -h, --help               Print generator's options and usage.\n \n### Helpers\n\nGet a list of all local code generator groups:\n\n    $ lep\n\nGet a list of all code generators for a given generator group:\n\n    $ lep \u003cgenerator-group\u003e\n\nExtending with own Code Generators\n----------------------------------\n\nSince lepidoptera is based on _Nic Williams_ Ruby generator framework [rubigen][r], it is very simple to add new own private code generators.\n\n### 1. Manual creation of new a code generator\n\nYour own private code generators must reside in a folder `~/.lepidoptera`.\n\nA new generator must satisfy the following code structure:\n\n    .lepidoptera\n    └─ \u003cgenerator-group\u003e_generators\n       └─ \u003cgenerator-type\u003e\n          ├─ INFO\n          ├─ \u003cgenerator-type\u003e_generator.rb\n          └─ templates\n             ├─ ...\n             └─ ...\n\nwhereas every code generator type must contain the following files:\n\n* an optional `INFO` file containing some additional project info to be displayed after the generation.\n* a required generator file `\u003cgenerator-type\u003e_generator.rb` which contains the generation rules.\n* a required templates folder `templates` which may contain multiple ERB templates for the code to be generated.  \n  These ERB templates may contain variables as placeholders for the following information:\n  * `\u003c%= name %\u003e`: Name of the project.\n  * `\u003c%= author %\u003e`: Author of the project (OS Username).\n\n### 2. Automatic creation of new a code generator\n\nAn easier way to create a new code generator is to automatically generate the above code generator stub into `~/.lepidoptera`.\n\nTo create a new code generator stub, use the `--new` option and provide a __generator group__ and a __generator type__:\n\n    $ lep -n \u003cgenerator-group\u003e \u003cgenerator-type\u003e\n    \nIf the generator group does not exist already, a group folder `\u003cgenerator-group\u003e_generators` will be created.\n\nEmbedded Code Generators\n========================\n\nThe following code generators are currently embedded within this project:\n        \njQuery Generators\n-----------------\n\nget List of all jquery generators:\n\n    $ lep jquery\n\ngenerate code for a jquery plugin:\n\n    $ lep jquery plugin \u003cplugin-name\u003e\n\nHeroku Generators\n-----------------\n\nget List of all heroku generators:\n\n    $ lep heroku\n\ngenerate code for a static page on heroku:\n\n    $ lep heroku static \u003cpage-name\u003e\n    \ngenerate code for a sinatra application on heroku:\n\n    $ lep heroku sinatra \u003capp-name\u003e\n\nLicense\n=======\n\nCopyright 2010 Thomas Duerr (me@thomd.net)\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n    \n    \n[wiki-1]: http://en.wikipedia.org/wiki/Lepidoptera \"Lepidoptera on Wiktionary\"\n[wiki-2]: http://en.wiktionary.org/wiki/lep \"Lep on Wiktionary\"\n[j]: http://jquery.com/ \"jQuery: The Write Less, Do More, JavaScript Library\"\n[h]: http://heroku.com/ \"heroku | Ruby Cloud Platform as a Service\"\n[s]: http://www.sinatrarb.com/ \"Sinatra\"\n[r]: http://rubigen.rubyforge.org/ \"rubigen - Ruby Generator Framework\"\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthomd%2Flepidoptera","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthomd%2Flepidoptera","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthomd%2Flepidoptera/lists"}