{"id":15107436,"url":"https://github.com/matfluor/docxtemplate","last_synced_at":"2026-02-07T17:03:32.980Z","repository":{"id":175173644,"uuid":"653455257","full_name":"MatFluor/DocxTemplate","owner":"MatFluor","description":"a Simple Docx-Templating Class for Pharo.","archived":false,"fork":false,"pushed_at":"2023-06-29T06:22:42.000Z","size":11,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-11T09:48:18.503Z","etag":null,"topics":["pharo","smalltalk"],"latest_commit_sha":null,"homepage":"","language":"Smalltalk","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/MatFluor.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}},"created_at":"2023-06-14T05:01:28.000Z","updated_at":"2023-06-14T05:27:14.000Z","dependencies_parsed_at":"2023-07-20T00:00:30.194Z","dependency_job_id":null,"html_url":"https://github.com/MatFluor/DocxTemplate","commit_stats":{"total_commits":9,"total_committers":2,"mean_commits":4.5,"dds":"0.33333333333333337","last_synced_commit":"2ba2129133050382f90989fd0335f41caea7d291"},"previous_names":["matfluor/docxtemplate"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MatFluor%2FDocxTemplate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MatFluor%2FDocxTemplate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MatFluor%2FDocxTemplate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MatFluor%2FDocxTemplate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MatFluor","download_url":"https://codeload.github.com/MatFluor/DocxTemplate/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247345711,"owners_count":20924098,"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":["pharo","smalltalk"],"created_at":"2024-09-25T21:24:33.344Z","updated_at":"2026-02-07T17:03:32.899Z","avatar_url":"https://github.com/MatFluor.png","language":"Smalltalk","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DocxTemplate\n\nDocxTemplate is a simple Pharo class that allows you to perform templating with DOCX files. It makes use of [Mustache](https://github.com/noha/mustache) for variable replacement.\n\n## Installation\n\nTo install DocxTemplate in Pharo, execute the following code:\n\n```Smalltalk\nMetacello new\n\tbaseline: 'DocxTemplater';\n\trepository: 'github.com//MatFluor/DocxTemplate:main';\n\tload\n```\n\n## Usage\n\nWith DocxTemplate, you can work directly on the `document.xml` file inside a DOCX archive by using mustache variables, such as `{{name}}`, in your template. Thanks to Noha's Mustache implementation, the usage is straightforward. \n\nHere are some examples:\n\n```smalltalk\n\"Fill a template based on JSON data\"\nDocxTemplate new \n\tzip: '\u003cLocation of my .docx\u003e'\n\tjson: '{ \"name\" : \"mustache\" }'\n\tout: '\u003cLocation of the new, filled .docx\u003e'.\n\t\n\"Fill a template based on an Array\"\nDocxTemplate new \n\tzip: '\u003cLocation of my .docx\u003e'\n\tarray: { 'name' -\u003e 'mustache' }\n\tout: '\u003cLocation of the new, filled .docx\u003e'.\n```\n\nApart from these two convenient methods, you can directly access each part individually (see the \"private\" protocol) for more advanced usage.\n\n## Caveats\n\nPlease note that DocxTemplate has not been tested with partial templates and larger or more formatted documents. Keep this in mind as DOCX/Word may sometimes split content in unexpected ways.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatfluor%2Fdocxtemplate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmatfluor%2Fdocxtemplate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatfluor%2Fdocxtemplate/lists"}