{"id":20925834,"url":"https://github.com/comby-tools/sample-catalog","last_synced_at":"2025-10-11T04:20:20.929Z","repository":{"id":141621109,"uuid":"193381175","full_name":"comby-tools/sample-catalog","owner":"comby-tools","description":"A sample catalog with rewrite templates. Feel free to fork and modify with your own!","archived":false,"fork":false,"pushed_at":"2020-09-22T14:49:59.000Z","size":109,"stargazers_count":6,"open_issues_count":2,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-05-06T13:43:56.957Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://catalog.comby.dev","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/comby-tools.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":"2019-06-23T18:17:46.000Z","updated_at":"2024-10-13T18:35:19.000Z","dependencies_parsed_at":null,"dependency_job_id":"6c07b0ff-8c7a-4b99-91e7-94828b56feef","html_url":"https://github.com/comby-tools/sample-catalog","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/comby-tools%2Fsample-catalog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/comby-tools%2Fsample-catalog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/comby-tools%2Fsample-catalog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/comby-tools%2Fsample-catalog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/comby-tools","download_url":"https://codeload.github.com/comby-tools/sample-catalog/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253993570,"owners_count":21996342,"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-18T20:35:24.175Z","updated_at":"2025-10-11T04:20:15.878Z","avatar_url":"https://github.com/comby-tools.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"A sample catalog with rewrite templates. Feel free to fork and modify with your own! \n\n## Layout\n\nThe `catalogue` folder contains a directory tree of templates. Each leaf folder is one rewrite pattern, containing the following files.\n\n  - `match` - contains the match pattern\n  - `rewrite` - the rewrite pattern\n  - `rule` - optional file with a `where ...` rule\n\nWhen a directory tree is specified with `comby -templates catalogue`, the `catalogue` directory tree is traversed fully and every rewrite pattern is run against the file in the leaf folders. \n\nNote that when running the `-templates` option without any other flags, all files in the directory will be run against the rewrite patterns. In general, use `-f file-pattern.extension` and/or `-d src` to run against a particular filepath pattern or directory, respectively. However, you don't need to worry about doing that for this catalog, since the generator script takes care of that for you.\n\nThe top level language under the `catalogue` directory defines the language label in the rendered site. Use the format in the newline-separated `DOC.md` files ([example](https://raw.githubusercontent.com/comby-tools/sample-catalog/master/catalogue/Dart/dart_style/prefer-is-empty/DOC.md)) to produce output entries as in the [rendered catalog website](https://catalog.comby.dev). \n\n\n## Generating the web site\n\nRun `python generate.py` (uses Python 2). This creates a `catalogue.json`. The JSON file is refenced in `index.html` to generate the site.\n\n## Examples\n\nSee the [rendered catalog](https://catalog.comby.dev/) for this repository.\n\nSee the [comby](https://github.com/comby-tools/comby) tool or [docs](https://comby.dev/) for using it!\n\n\n## Example creating new template\n\nCreate new directory `catalogue/echo` with match and rewrite patterns.\n```\nmkdir catalogue/echo\n# add match and rewrite patterns\necho '(:[emoji] hi)' \u003e catalogue/echo/match\necho 'bye :[emoji]' \u003e catalogue/echo/rewrite\n```\nTest is with `comby`.\n```\n$ comby -templates catalogue/echo -stdin -matcher .lisp \u003c\u003c\u003c '(👋 hi)'\n------ /dev/null\n++++++ /dev/null\n@|-1,1 +1,1 ============================================================\n-|(👋 hi)\n+|bye 👋\n```\nWe explicitly specify `.lisp` matcher, because with `-stdin` input `comby` is unable to detect matcher from file extension.\n\nRunning the same command with `docker` will be slightly more verbose.\n```\ndocker run --rm -i -a stdin -a stdout -a stderr -v \"$(pwd)\"/catalogue:/opt/catalogue comby/comby -templates /opt/catalogue/echo -stdin -matcher .lisp \u003c\u003c\u003c '(👋 hi)'\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcomby-tools%2Fsample-catalog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcomby-tools%2Fsample-catalog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcomby-tools%2Fsample-catalog/lists"}