{"id":47802609,"url":"https://github.com/badele/ansi-compositor","last_synced_at":"2026-04-03T17:13:02.129Z","repository":{"id":342700650,"uuid":"1131779912","full_name":"badele/ansi-compositor","owner":"badele","description":"Compose ANSI file","archived":false,"fork":false,"pushed_at":"2026-03-06T22:27:37.000Z","size":82,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-07T03:22:02.603Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","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/badele.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2026-01-10T17:20:44.000Z","updated_at":"2026-03-06T22:27:42.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/badele/ansi-compositor","commit_stats":null,"previous_names":["badele/ansi-compositor"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/badele/ansi-compositor","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/badele%2Fansi-compositor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/badele%2Fansi-compositor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/badele%2Fansi-compositor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/badele%2Fansi-compositor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/badele","download_url":"https://codeload.github.com/badele/ansi-compositor/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/badele%2Fansi-compositor/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31365089,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-03T15:19:21.178Z","status":"ssl_error","status_checked_at":"2026-04-03T15:19:20.670Z","response_time":107,"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":"2026-04-03T17:13:01.358Z","updated_at":"2026-04-03T17:13:02.119Z","avatar_url":"https://github.com/badele.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n    \u003ch1\u003e\n        \u003cimg src=\"./examples/commands/logo.png\"/\u003e\n    \u003c/h1\u003e\n\u003c/div\u003e\n\nCompose ANSI/Neotex files from a YAML description. ansi-compositor relies on\nsplitans for parsing/tokenizing ANSI or Neotex sources and exporting the final\nbuffer.\n\n## Usage\n\n```bash\nansi-compositor path/to/config.yaml\n```\n\nCLI options: `-o` (output file), `-F` (format: ansi|neotex|plaintext), `-I`\n(inline), `-K` (keep trailing empty lines), `-v` (VGA colors), `-V` (version).\nThese override `output.file`, `output.format`, `output.inline`,\n`output.keepTrailingLines`, and `term.vgaColors` from the YAML. SAUCE is\ncontrolled only via YAML.\n\n## Configuration\n\nKey YAML fields:\n\n- `term.width`, `term.height`: workspace dimensions (required).\n- `term.fill`: optional background (char + neotex style).\n- `term.vgaColors`: enable VGA palette for splitans rendering.\n- `defaults.inputFormat`: auto|ansi|neotex|plaintext; `defaults.inputEncoding`:\n  utf8|cp437|cp850|iso-8859-1; `defaults.boxError`: none|rectangle|fill;\n  `defaults.boxErrorPattern`: fill pattern (fill only)\n- `layers[]`: each layer has `x`, `y` (1-indexed) and exactly one source among\n  `file` | `cmd` | `content`; `cmd` can be a shell string or a list of args.\n  Alignment options: `alignH`, `alignV`, `crop`. Error fallback: `boxError`\n  (override defaults) only applies to `cmd` layers: rectangle|fill. `none`\n  disables it. `boxErrorPattern` overrides the default fill pattern for\n  `boxError: fill`.\n- `output.format`: ansi|neotex|plaintext; `output.inline`: bool;\n  `output.keepTrailingLines`: preserve trailing empty lines (ansi/neotex);\n  `output.file`: path.\n- `sauce`: optional block (see below).\n\n## Error boxes\n\n`boxError` draws a fallback box when a `cmd` layer fails. Values:\n\n- `none`: no fallback (default).\n- `rectangle`: border + centered label/error text.\n- `fill`: pattern fill + border + centered label/error text.\n\n`boxErrorPattern` is only used with `boxError: fill`. The pattern is tiled\nacross the fill area and may be multi-line. If omitted, the fill defaults to\n`#`.\n\nLiteral block (recommended for spaces):\n\n```yaml\nboxErrorPattern: |\n  / __ \\ \\__/\n  / /  \\ \\____/\n  \\ \\__/ / __ \\\n   \\____/ /  \\\n```\n\nQuoted string (escape newlines and backslashes):\n\n```yaml\nboxErrorPattern: \"  / __ \\\\ \\\\__/\\n / /  \\\\ \\\\____/\\n \\\\ \\\\__/ / __ \\\\\\n  \\\\____/ /  \\\\\"\n```\n\n## SAUCE via YAML\n\n- If the `sauce` block is absent: no SAUCE is exported.\n- If present: SAUCE is exported (unless `enabled: false`).\n- Strict length limits (error if exceeded): `title` ≤ 35, `author` ≤ 20, `group`\n  ≤ 20, `font` (TInfoS) ≤ 22.\n- Date: `YYYYMMDD` or `YYYY-MM-DD`.\n- Supported for `output.format` ansi and neotex; ignored for plaintext.\n\nAvailable fields:\n\n```yaml\nsauce:\n  enabled: true # optional, defaults to true when block exists\n  title: \"My Art\"\n  author: \"Bruno Adele\"\n  group: \"Demo\"\n  date: \"20250208\"\n  font: \"80x25\"\n  iceColors: true\n```\n\n## Example\n\nA sample `ansi-compositor` result\n\n![commands](./examples/commands/commands.png)\n\nFor more examples see the [./examples](./examples/) folder\n\n### Complete example\n\n```yaml\nterm:\n  width: 180\n  height: 180\n  encoding: utf8\n\ndefaults:\n  inputFormat: ansi\n  inputEncoding: utf8\n  boxError: fill\n  boxErrorPattern: \"  / __ \\\\ \\\\__/\\n / /  \\\\ \\\\____/\\n \\\\ \\\\__/ / __ \\\\\\n  \\\\____/ /  \\\\\"\n\noutput:\n  format: neotex\n\nlayers:\n  - name: logo\n    x: 1\n    y: 1\n    alignH: center\n    # cmd: curl 'https://codef-ansi-logo-maker-api.santo.fr/api.php?text=ansi%20compositor\u0026font=78\u0026spacing=2\u0026spacesize=5\u0026vary=2'\n    file: logo.neo\n    inputFormat: neotex\n  - name: slogan\n    x: 1\n    y: 22\n    width: 180\n    height: 1\n    alignH: center\n    content: \"—————————---- Compose, color, and craft ANSI art cleanly ----—————————\"\n  - name: weather-title\n    x: 3\n    y: 26\n    alignH: center\n    cmd: bit -font 8bitfortress -fit-scales -1,0,1,2  -fit-height 3 -fit-priority height -fit-limit 1 \"WEATHER EXAMPLE\"\n  - name: weather\n    x: 1\n    y: 30\n    height: 39\n    alignH: center\n    cmd: sh -c 'set -euo pipefail; curl --fail -s --max-time 5 wttr.in'\n  - name: ratesx-title\n    x: 1\n    y: 70\n    alignH: center\n    cmd: bit -font aqui -fit-scales -1,0,1,2  -fit-height 5 -fit-priority height -fit-limit 1 \"RATE SX EXAMPLE\"\n  - name: ratesx\n    x: 1\n    y: 76\n    alignH: center\n    cmd: sh -c 'set -euo pipefail; curl --fail -s --max-time 2 https://eur.rate.sx/'\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbadele%2Fansi-compositor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbadele%2Fansi-compositor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbadele%2Fansi-compositor/lists"}