{"id":15600432,"url":"https://github.com/jason-fox/fox.jason.passthrough","last_synced_at":"2025-04-06T22:28:06.769Z","repository":{"id":54521598,"uuid":"197824947","full_name":"jason-fox/fox.jason.passthrough","owner":"jason-fox","description":"Abstract base DITA-OT Plug-in to enable files to bypass DITA-OT pre-processing","archived":false,"fork":false,"pushed_at":"2024-02-18T07:43:36.000Z","size":339,"stargazers_count":1,"open_issues_count":2,"forks_count":1,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-02-13T04:44:11.847Z","etag":null,"topics":["dita-ot","dita-ot-plugin"],"latest_commit_sha":null,"homepage":"https://jason-fox.github.io/dita-ot-plugins/passthrough","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/jason-fox.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}},"created_at":"2019-07-19T18:37:59.000Z","updated_at":"2024-06-13T08:32:36.000Z","dependencies_parsed_at":"2024-12-20T10:27:43.395Z","dependency_job_id":"32b67bd7-e740-4646-af80-16be59e0c9a9","html_url":"https://github.com/jason-fox/fox.jason.passthrough","commit_stats":{"total_commits":115,"total_committers":3,"mean_commits":"38.333333333333336","dds":"0.017391304347826098","last_synced_commit":"48aa7874b96b8e2e97f59e58aa15e166052db717"},"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jason-fox%2Ffox.jason.passthrough","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jason-fox%2Ffox.jason.passthrough/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jason-fox%2Ffox.jason.passthrough/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jason-fox%2Ffox.jason.passthrough/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jason-fox","download_url":"https://codeload.github.com/jason-fox/fox.jason.passthrough/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247562297,"owners_count":20958880,"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":["dita-ot","dita-ot-plugin"],"created_at":"2024-10-03T02:02:58.008Z","updated_at":"2025-04-06T22:28:06.750Z","avatar_url":"https://github.com/jason-fox.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Pass Through Plugin for DITA-OT [\u003cimg src=\"https://jason-fox.github.io/fox.jason.passthrough/passthrough.png\" align=\"right\" width=\"300\"\u003e](http://passthroughdita-ot.rtfd.io/)\n\n[![license](https://img.shields.io/github/license/jason-fox/fox.jason.passthrough.svg)](http://www.apache.org/licenses/LICENSE-2.0)\n[![DITA-OT 4.2](https://img.shields.io/badge/DITA--OT-4.2-green.svg)](http://www.dita-ot.org/4.2)\n[![CI](https://github.com/jason-fox/fox.jason.passthrough/workflows/CI/badge.svg)](https://github.com/jason-fox/fox.jason.passthrough/actions?query=workflow%3ACI)\n[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=fox.jason.passthrough\u0026metric=alert_status)](https://sonarcloud.io/dashboard?id=fox.jason.passthrough)\n\nThis is an abstract base [DITA-OT Plug-in](https://www.dita-ot.org/plugins) to enable files to bypass DITA-OT\npre-processing and be copied directly over into the processing directory. It is designed to be extended.\n\nThe plugin consists of a no-op file reader and an Antlib library. It offers two extension-points for further processing.\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eTable of Contents\u003c/strong\u003e\u003c/summary\u003e\n\n-   [Install](#install)\n    -   [Installing DITA-OT](#installing-dita-ot)\n    -   [Installing the Plug-in](#installing-the-plug-in)\n-   [Usage](#usage)\n    -   [Extension points](#extension-points)\n        -   [Example](#example)\n-   [API](#api)\n    -   [Passthrough-Iterate](#passthrough-iterate)\n-   [License](#license)\n\n\u003c/details\u003e\n\n## Install\n\nThe DITA-OT Passthrough plug-in has been tested against [DITA-OT 3.x](http://www.dita-ot.org/download). It is\nrecommended that you upgrade to the latest version.\n\n### Installing DITA-OT\n\n\u003ca href=\"https://www.dita-ot.org\"\u003e\u003cimg src=\"https://www.dita-ot.org/images/dita-ot-logo.svg\" align=\"right\" height=\"55\"\u003e\u003c/a\u003e\n\nThe DITA-OT Pass Through plug-in is a file reader for the DITA Open Toolkit.\n\n-   Full installation instructions for downloading DITA-OT can be found\n    [here](https://www.dita-ot.org/4.0/topics/installing-client.html).\n\n    1.  Download the `dita-ot-4.2.zip` package from the project website at\n        [dita-ot.org/download](https://www.dita-ot.org/download)\n    2.  Extract the contents of the package to the directory where you want to install DITA-OT.\n    3.  **Optional**: Add the absolute path for the `bin` directory to the _PATH_ system variable.\n\n    This defines the necessary environment variable to run the `dita` command from the command line.\n\n```console\ncurl -LO https://github.com/dita-ot/dita-ot/releases/download/4.2/dita-ot-4.2.zip\nunzip -q dita-ot-4.2.zip\nrm dita-ot-4.2.zip\n```\n\n### Installing the Plug-in\n\n-   Run the plug-in installation commands:\n\n```console\ndita install https://github.com/jason-fox/fox.jason.passthrough/archive/master.zip\n```\n\nThe `dita` command line tool requires no additional configuration.\n\n---\n\n## Usage\n\nTo mark a file as requiring no processing, label it with `format=\"passthrough\"` within the `*.ditamap` as shown:\n\n```xml\n\u003c?xml version=\"1.0\" encoding=\"UTF-8\"?\u003e\n\u003c!DOCTYPE bookmap PUBLIC \"-//OASIS//DTD DITA BookMap//EN\" \"bookmap.dtd\"\u003e\n\u003cbookmap\u003e\n    ...etc\n    \u003cchapter format=\"passthrough\" href=\"sample.txt\"/\u003e\n\u003c/bookmap\u003e\n```\n\nThe additional file will be added to the build job without processing.\n\n### Extension points\n\nThis plug-in is designed to be extended and offers two extension points:\n\n-   `passthrough.pre` - Runs an additional Ant target before the passthrough pre-processing stage.\n\n-   `passthrough.process` - Runs an additional Ant target as part of the passthrough processing stage.\n\n#### Example\n\nThe following `plugin.xml` will enable the post-processing of all files marked as `format=NEW_FORMAT`\n\n##### `plugin.xml` Configuration\n\n```xml\n\u003cplugin id=\"com.example.passthrough.dita\"\u003e\n  \u003crequire plugin=\"fox.jason.passthrough\"/\u003e\n  \u003cfeature extension=\"passthrough.process\" value=\"run-processing\"/\u003e\n  \u003cfeature extension=\"dita.parser\"\u003e\n    \u003cparser format=\"NEW_FORMAT\" class=\"fox.jason.passthrough.parser.FileReader\"/\u003e\n  \u003c/feature\u003e\n\u003c/plugin\u003e\n```\n\n##### ANT build file\n\n```xml\n\u003cproject name=\"com.example.passthrough.dita\"\u003e\n\n  \u003cmacrodef name=\"do-something\"\u003e\n    \u003cattribute name=\"src\" /\u003e\n    \u003cattribute name=\"dest\" /\u003e\n    \u003cattribute name=\"title\" /\u003e\n    \u003cattribute name=\"metadata\"/\u003e\n    \u003csequential\u003e\n      \u003c!-- Further processing --\u003e\n    \u003c/sequential\u003e\n  \u003c/macrodef\u003e\n\n  \u003ctarget name=\"run-processing\"\u003e\n    \u003cpassthrough-iterate format=\"NEW_FORMAT\" macro=\"do-something\"/\u003e\n  \u003c/target\u003e\n\u003c/project\u003e\n```\n\nA working example can be found in the [DITA-OT Pandoc plug-in](https://github.com/jason-fox/fox.jason.pandoc)\nrepository.\n\n## API\n\nThe following ANT task is available from the DITA-OT Pass through plug-in\n\n### Passthrough-Iterate\n\n#### Description\n\nPost process all files of a given format using the macro supplied\n\n#### Parameters\n\n| Attribute | Description                                      | Required |\n| --------- | ------------------------------------------------ | -------- |\n| format    | The `format` attribute used with the `*.ditamap` | Yes      |\n| macro     | The name of the `\u003cmacrodef\u003e` to run              | Yes      |\n\n#### Example\n\n```xml\n \u003cpassthrough-iterate format=\"NEW_FORMAT\" macro=\"do-something\"/\u003e\n```\n\nFiles marked as `format=\"NEW_FORMAT\"` should be processed by the `macrodef` called `do-something`. The macro must offer\nan interface with `src`, `dest`, `title` and `metadata` attributes.\n\n## License\n\n[Apache 2.0](LICENSE) © 2019 - 2024 Jason Fox\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjason-fox%2Ffox.jason.passthrough","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjason-fox%2Ffox.jason.passthrough","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjason-fox%2Ffox.jason.passthrough/lists"}