{"id":22012459,"url":"https://github.com/patmartin/groovy-ops","last_synced_at":"2026-04-29T11:04:11.544Z","repository":{"id":141670205,"uuid":"612643953","full_name":"PatMartin/groovy-ops","owner":"PatMartin","description":"Groovy support for ops4j.","archived":false,"fork":false,"pushed_at":"2026-04-20T05:00:41.000Z","size":12,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-04-20T07:07:56.097Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","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/PatMartin.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-03-11T15:03:55.000Z","updated_at":"2026-04-20T05:00:45.000Z","dependencies_parsed_at":null,"dependency_job_id":"81cd833d-c2f5-4246-867f-c54fc0c5e431","html_url":"https://github.com/PatMartin/groovy-ops","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/PatMartin/groovy-ops","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PatMartin%2Fgroovy-ops","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PatMartin%2Fgroovy-ops/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PatMartin%2Fgroovy-ops/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PatMartin%2Fgroovy-ops/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PatMartin","download_url":"https://codeload.github.com/PatMartin/groovy-ops/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PatMartin%2Fgroovy-ops/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32422572,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T06:29:02.080Z","status":"ssl_error","status_checked_at":"2026-04-29T06:29:00.631Z","response_time":110,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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-30T03:13:00.828Z","updated_at":"2026-04-29T11:04:11.538Z","avatar_url":"https://github.com/PatMartin.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# groovy-ops\n\nGroovy scripting and template rendering for Ops4J.\n\nThis is an optional plugin module. Add it to a project that already depends on `ops4j-core` to enable dynamic Groovy expressions and Groovy template-based output inside pipelines. It is also used internally by `http-ops` and `visual-ops`.\n\n---\n\n## Overview\n\n`groovy-ops` lets you embed Groovy logic directly in an Ops4J pipeline — either as a NodeOp expression applied field-by-field, or as a full Groovy template that collects a stream of records and renders them as a single document.\n\n---\n\n## Operations\n\n### Pipeline Operations (Ops)\n\n| Operation | Description |\n| --- | --- |\n| `groovy-template` (`GroovyTemplate`) | Accumulates the full record stream into a context variable, then renders a Groovy template (`.gt` file or inline string) against that context and emits the rendered output as a single record. Used heavily by `http-ops` for HTML dashboard generation. |\n\n### Field-Level Operations (NodeOps)\n\n| NodeOp | Description |\n| --- | --- |\n| `eval` (`Eval`) | Evaluates a Groovy expression against the current record. The expression has access to the record's fields as bindings and to standard `Math` functions. The result is written back into the target field. |\n\n---\n\n## Usage Examples\n\nCompute a field value dynamically:\n\n```bash\nmap /bmi=\"eval:weight / (height * height):\"\n```\n\nRender a Groovy template over an accumulated stream and write output to a file:\n\n```bash\ncat data.json | groovy-template -t report.gt \u003e report.html\n```\n\nUse a Groovy expression with math functions:\n\n```bash\nmap /radians=\"eval:Math.toRadians(degrees):\"\n```\n\n---\n\n## Configuration\n\n`groovy-ops` registers itself automatically. The default `groovy.conf` sets the execution mode:\n\n```hocon\ngroovy {\n  mode = LOCAL\n}\n```\n\n---\n\n## Used By\n\n- [http-ops](../http-ops/) — uses `groovy-template` to render HTML and chart pages.\n- [visual-ops](../visual-ops/) — uses `groovy-template` to render PlantUML diagram sources.\n\n---\n\n## Key Dependencies\n\n| Dependency | Purpose |\n| --- | --- |\n| [ops4j-core](../ops4j-core/) | Ops4J runtime and base classes |\n| Apache Groovy 4 | Groovy language runtime and template engine |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpatmartin%2Fgroovy-ops","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpatmartin%2Fgroovy-ops","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpatmartin%2Fgroovy-ops/lists"}