{"id":17796376,"url":"https://github.com/d-plaindoux/page","last_synced_at":"2026-07-21T09:33:07.694Z","repository":{"id":13077811,"uuid":"15758744","full_name":"d-plaindoux/page","owner":"d-plaindoux","description":"Bi-directional template language providing parser and generator capabilities.","archived":false,"fork":false,"pushed_at":"2014-01-25T10:18:04.000Z","size":212,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-20T05:52:08.303Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Scala","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-2.1","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/d-plaindoux.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}},"created_at":"2014-01-09T06:40:10.000Z","updated_at":"2014-01-25T10:18:04.000Z","dependencies_parsed_at":"2022-08-28T09:50:52.952Z","dependency_job_id":null,"html_url":"https://github.com/d-plaindoux/page","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/d-plaindoux/page","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d-plaindoux%2Fpage","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d-plaindoux%2Fpage/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d-plaindoux%2Fpage/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d-plaindoux%2Fpage/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/d-plaindoux","download_url":"https://codeload.github.com/d-plaindoux/page/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d-plaindoux%2Fpage/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35719682,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-07-20T02:08:10.276Z","status":"online","status_checked_at":"2026-07-21T02:00:06.728Z","response_time":109,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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-10-27T11:45:13.354Z","updated_at":"2026-07-21T09:33:07.678Z","avatar_url":"https://github.com/d-plaindoux.png","language":"Scala","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PaGe\n\nA Bi-directional template language providing Parser and Generator capabilities.\n\n## Syntax\n\n```\ntemplate ::=\n| (definition| environment | freeText)*\n\ndefinition ::=\n| \"@DEFINE\" name \"[|\" \u003ctemplate\u003e \"|]\"\n| \"@SET\" name \"[|\" \u003ctemplate\u003e \"|]\"\n| \"@USE\" name \"[|\" \u003ctemplate\u003e \"|]\"\n\nenvironment ::=\n| \"@REP\" separator? name? \"[|\" \u003ctemplate\u003e \"|]\"\n| \"@VAL\" name? \"[|\" \u003ctemplate\u003e \"|]\"\n| \"@OPT\" name? \"[|\" \u003ctemplate\u003e \"|]\"\n| \"@OR\" name? (\"[|\" \u003ctemplate\u003e \"|]\")+\n\nfreeText ::=\n| \u003ctext\u003e\n\nname ::=\n| \"::\" \u003cident\u003e\n\nseparator? ::=\n| \"(\" \u003ctemplate\u003e \")\"\n```\n\n## Example of Generation\n\nConsider the following JSON fragment\n\n```\n{\n \"first\": \"John\",\n \"last\": \"Doe\",\n \"age\": 39,\n \"sex\": \"M\",\n \"salary\": 70000,\n \"registered\": true,\n \"interests\": [ \"Reading\", \"Mountain Biking\", \"Hacking\" ]\n}\n```\n\nand the following simple template.\n\n```html\n@DEFINE::CR[|\n|]\n@VAL::first @VAL::last is interested by:\n@REP( and@USE::CR)::interests[| - @VAL|]\n```\n\nThe generation produces the following simple result:\n\n```\nJohn Doe is interested by:\n - Reading and\n - Mountain Biking and\n - Hacking\n```\n\n## Example of Extraction\n\nConsider the following fragment\n\n```\nJohn Doe is interested by:\n - Reading and\n - Hacking\n```\n\nand the following simple template.\n\n```html\n@DEFINE::CR[|\n|]\n@VAL::first @VAL::last is interested by:\n@REP( and@USE::CR)::interests[| - @VAL|]\n```\n\nThe extraction produces the following fragment:\n\n```\n{\n \"first\": \"John\",\n \"last\": \"Doe\",\n \"interests\": [ \"Reading\", \"Hacking\" ]\n}\n```\n\n## License\n\nCopyright (C)2014 D. Plaindoux.\n\nThis program is free software; you can redistribute it and/or modify it\nunder the terms of the GNU Lesser General Public License as published\nby the Free Software Foundation; either version 2, or (at your option) any\nlater version.\n\nThis program is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Lesser General Public License for more details.\n\nYou should have received a copy of the GNU Lesser General Public License\nalong with this program; see the file COPYING.  If not, write to\nthe Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fd-plaindoux%2Fpage","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fd-plaindoux%2Fpage","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fd-plaindoux%2Fpage/lists"}