{"id":16717987,"url":"https://github.com/dsheets/blueprint","last_synced_at":"2025-10-08T09:16:39.305Z","repository":{"id":33124133,"uuid":"36763272","full_name":"dsheets/blueprint","owner":"dsheets","description":"Simple templating based on XML ropes","archived":false,"fork":false,"pushed_at":"2015-09-04T19:13:03.000Z","size":325,"stargazers_count":12,"open_issues_count":3,"forks_count":1,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-03-24T08:02:09.063Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"OCaml","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"ansible-network/network-engine","license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dsheets.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES","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":"2015-06-02T21:35:36.000Z","updated_at":"2017-03-07T13:54:45.000Z","dependencies_parsed_at":"2022-07-12T22:40:35.695Z","dependency_job_id":null,"html_url":"https://github.com/dsheets/blueprint","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/dsheets%2Fblueprint","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dsheets%2Fblueprint/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dsheets%2Fblueprint/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dsheets%2Fblueprint/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dsheets","download_url":"https://codeload.github.com/dsheets/blueprint/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248181880,"owners_count":21060890,"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-10-12T21:34:36.083Z","updated_at":"2025-10-08T09:16:34.265Z","avatar_url":"https://github.com/dsheets.png","language":"OCaml","funding_links":[],"categories":[],"sub_categories":[],"readme":"# blueprint\n\n**blueprint** is a [polyglot HTML](http://www.w3.org/TR/html-polyglot/)\n(or XML) template system. It's a command and a MirageOS-compatible OCaml\nlibrary.\n\nTo use **blueprint** from the command line, just\n\n```\n$ blue [templates]\n```\n\nand the templates will be composed with the result sent to stdout.\n\n## Template language\n\nThe blueprint template language is an XML vocabulary that lets you place\n'holes' in [polyglot HTML](http://www.w3.org/TR/html-polyglot/) (or XML)\ndocuments. The `blue` command line tool automatically binds the\nblueprint namespace to the `t:` prefix. Blueprint has 4 tags: *seq*,\n*let*, *insert*, and *attr*.\n\n### `t:seq`\n\n`t:seq` is used to group elements together. It is most useful at the\nroot of a document in order to describe a sequence of elements or to\ndeclare document-level bindings.\n\n### `t:let`\n\n`t:let` has a single required attribute, `name`, which gives a name to\nthe binding that it creates. Bindings are scoped from the point of\ndeclaration until the end of the parent element. If the parent element\nis `t:seq`, the binding will be exported as well. Whitespace before a\n`t:let` is elided up to one or two consecutive new lines.\n\n### `t:insert`\n\n`t:insert` has a single required attribute, `name`, which gives a name\nto the 'hole' that it creates. Bindings against this name will fill this\nhole. When holes are filled, the template which fills the hole will be\nrecursively populated with any bindings in scope. If an expansion step\nwould use a binding previously used in the expansion, the expansion\nstops before the previous hole is filled.\n\nIf content is supplied to a `t:insert` element, it will be used as the\ndefault value of the hole in the case that no binding matching `@name`\nexists in scope.\n\nNames may only contain alphanumeric characters, '-', and '_'.\n\n### `t:attr`\n\n`t:attr` has a single required attribute, `name`, which is the name of\nthe attribute to populate. `t:attr` may only immediately follow a start\ntag or another `t:attr` excluding whitespace. If the attribute `@name`\nalready exists, it is replaced with the content of `t:attr`. `t:attr`\nmay contain any content including `t:let`, `t:insert`, and `t:seq` but,\nafter recursive binding, all tags in the attribute value will be\ndropped.\n\n## `blue`\n\nThe `blue` tool is a simple command line wrapper around the `Blueprint`\nlibrary. `blue` accepts a sequence of files and composes them into a\nsingle output document. The last file listed is used as the template and\nall preceding files are used only for their bindings. Any unbound content\nin the preceding files is discarded. The result must not contain any\ntemplate elements and will be sent to `stdout`. To read from `stdin`,\nuse `-` as a file name. The `-p` option will disable incomplete template\nerrors and allow output of partially fulfilled templates.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdsheets%2Fblueprint","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdsheets%2Fblueprint","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdsheets%2Fblueprint/lists"}