adt-core


Nameadt-core JSON
Version 2.0.0 PyPI version JSON
download
home_pageNone
SummaryA toolkit for preparing AsciiDoc files for DITA publishing workflows
upload_time2025-07-09 10:54:26
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
licenseMIT
keywords asciidoc dita documentation publishing markup
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # AsciiDoc DITA Toolkit

[![PyPI version](https://badge.fury.io/py/asciidoc-dita-toolkit.svg)](https://badge.fury.io/py/asciidoc-dita-toolkit)
[![Python 3.7+](https://img.shields.io/badge/python-3.7+-blue.svg)](https://www.python.org/downloads/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

Scripts to review and fix AsciiDoc content for DITA-based publishing workflows, based on rules from the [asciidoctor-dita-vale](https://github.com/jhradilek/asciidoctor-dita-vale) project.

## 🚀 Resources

- [PyPI: asciidoc-dita-toolkit](https://pypi.org/project/asciidoc-dita-toolkit/)
- [GitHub repository](https://github.com/rolfedh/asciidoc-dita-toolkit)
- [Documentation](https://github.com/rolfedh/asciidoc-dita-toolkit/blob/main/docs/)
- [Contributing Guide](https://github.com/rolfedh/asciidoc-dita-toolkit/blob/main/docs/CONTRIBUTING.md)

## 📖 What is this?

The AsciiDoc DITA Toolkit is a command-line tool for technical writers and editors. It helps you:

- **Find and fix** common issues in `.adoc` files before publishing
- **Apply automated checks** and transformations using a plugin system
- **Ensure consistency** across large documentation projects
- **Integrate** with your existing documentation workflow

## 📦 Installation

### Option 1: Container (No Python Required)

Use Docker containers if you prefer not to install Python dependencies locally, or need consistent environments across teams:

```sh
# Production use (smaller, optimized)
docker run --rm -v $(pwd):/workspace rolfedh/asciidoc-dita-toolkit-prod:latest --help

# Development use (includes dev tools)
docker run --rm -v $(pwd):/workspace rolfedh/asciidoc-dita-toolkit:latest --help

# GitHub Container Registry (alternative)
docker run --rm -v $(pwd):/workspace ghcr.io/rolfedh/asciidoc-dita-toolkit:latest --help
```

**Benefits of container approach:**

- No need to install Python or manage dependencies
- Consistent environment across different systems
- Easy to use in CI/CD pipelines
- Automatic cleanup after each run

### Option 2: PyPI

Install the toolkit using pip:

```sh
python3 -m pip install asciidoc-dita-toolkit
```

> **🌙 Nightly Releases**: This project automatically publishes nightly patch releases to PyPI whenever there are new commits. These releases include the latest fixes and improvements. The nightly releases follow the pattern `x.y.z` where `z` is automatically incremented.

### Upgrading

**Container:**

```sh
# Production image (recommended for most users)
docker pull rolfedh/asciidoc-dita-toolkit-prod:latest

# Development image (includes dev tools)
docker pull rolfedh/asciidoc-dita-toolkit:latest
```

**PyPI:**

```sh
python3 -m pip install --upgrade asciidoc-dita-toolkit
```

### Requirements

- Python 3.7 or newer
- No external dependencies (uses only Python standard library)

## 🔧 Usage

### List available plugins

```sh
asciidoc-dita-toolkit --list-plugins
```

### Run a plugin

```sh
asciidoc-dita-toolkit <plugin> [options]
```

- `<plugin>`: Name of the plugin to run (e.g., `EntityReference`, `ContentType`)
- `[options]`: Plugin-specific options (e.g., `-f` for a file, `-r` for recursive)

### Common Options

All plugins support these options:

- `-f FILE` or `--file FILE`: Process a specific file
- `-r` or `--recursive`: Process all .adoc files recursively in the current directory
- `-d DIR` or `--directory DIR`: Specify the root directory to search (default: current directory)

### 📝 Examples

#### Fix HTML entity references in a file

```sh
asciidoc-dita-toolkit EntityReference -f path/to/file.adoc
```

#### Add content type labels to all files recursively

```sh
asciidoc-dita-toolkit ContentType -r
```

#### Process all .adoc files in a specific directory

```sh
asciidoc-dita-toolkit EntityReference -d /path/to/docs -r
```

### Container Usage

If using the container version, all commands work the same but are prefixed with the Docker run command:

```sh
# List plugins
docker run --rm rolfedh/asciidoc-dita-toolkit-prod:latest --list-plugins

# Fix entity references in current directory
docker run --rm -v $(pwd):/workspace rolfedh/asciidoc-dita-toolkit-prod:latest EntityReference -r

# Add content type labels to a specific file
docker run --rm -v $(pwd):/workspace rolfedh/asciidoc-dita-toolkit-prod:latest ContentType -f docs/myfile.adoc

# Interactive shell for development (use dev image)
docker run --rm -it -v $(pwd):/workspace rolfedh/asciidoc-dita-toolkit:latest /bin/bash
```

**Container command breakdown:**

- `docker run --rm` - Run and automatically remove container when done
- `-v $(pwd):/workspace` - Mount current directory as `/workspace` in container
- `rolfedh/asciidoc-dita-toolkit-prod:latest` - The production container image (recommended)
- Everything after the image name works exactly like the PyPI version

**Tip:** Create a shell alias to simplify container usage:

```sh
alias asciidoc-dita-toolkit='docker run --rm -v $(pwd):/workspace rolfedh/asciidoc-dita-toolkit-prod:latest'
```

Then use it exactly like the PyPI version:

```sh
asciidoc-dita-toolkit --list-plugins
asciidoc-dita-toolkit EntityReference -r
```

### 🔌 Available Plugins

| Plugin | Description | Example Usage |
|--------|-------------|---------------|
| `EntityReference` | Replace unsupported HTML character entity references with AsciiDoc attribute references | `asciidoc-dita-toolkit EntityReference -f file.adoc` |
| `ContentType` | Add `:_mod-docs-content-type:` labels where missing, based on filename | `asciidoc-dita-toolkit ContentType -r` |

> **📋 Technical Details**: For plugin internals and supported entity mappings, see [docs/asciidoc-dita-toolkit.md](docs/asciidoc-dita-toolkit.md).

## 🔍 Troubleshooting

- **Python Version**: Make sure you are using Python 3.7 or newer
- **Installation Issues**: Try upgrading pip: `python3 -m pip install --upgrade pip`
- **Development Setup**: If you need to use a local clone, see the [contributor guide](docs/CONTRIBUTING.md)
- **Plugin Errors**: Use `-v` or `--verbose` flag for detailed error information

## 📚 Related Resources

- **[`asciidoctor-dita-vale`](https://github.com/jhradilek/asciidoctor-dita-vale)**: Vale style rules and test fixtures for validating AsciiDoc content

## 🤝 Contributing

Want to add new plugins or help improve the toolkit?

- Read our [Contributing Guide](docs/CONTRIBUTING.md)
- Follow the [Plugin Development Pattern](docs/PLUGIN_DEVELOPMENT_PATTERN.md) for new plugins
- Check out [open issues](https://github.com/rolfedh/asciidoc-dita-toolkit/issues)
- See our [Security Policy](SECURITY.md) for reporting vulnerabilities

## 📄 License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "adt-core",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "asciidoc, dita, documentation, publishing, markup",
    "author": null,
    "author_email": "Rolfe Dlugy-Hegwer <rolfedh@users.noreply.github.com>",
    "download_url": "https://files.pythonhosted.org/packages/1e/7b/da1001945e4a91e94bd1b2b0b5452894b193333fc3b8214f6b13a4835683/adt_core-2.0.0.tar.gz",
    "platform": null,
    "description": "# AsciiDoc DITA Toolkit\n\n[![PyPI version](https://badge.fury.io/py/asciidoc-dita-toolkit.svg)](https://badge.fury.io/py/asciidoc-dita-toolkit)\n[![Python 3.7+](https://img.shields.io/badge/python-3.7+-blue.svg)](https://www.python.org/downloads/)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\nScripts to review and fix AsciiDoc content for DITA-based publishing workflows, based on rules from the [asciidoctor-dita-vale](https://github.com/jhradilek/asciidoctor-dita-vale) project.\n\n## \ud83d\ude80 Resources\n\n- [PyPI: asciidoc-dita-toolkit](https://pypi.org/project/asciidoc-dita-toolkit/)\n- [GitHub repository](https://github.com/rolfedh/asciidoc-dita-toolkit)\n- [Documentation](https://github.com/rolfedh/asciidoc-dita-toolkit/blob/main/docs/)\n- [Contributing Guide](https://github.com/rolfedh/asciidoc-dita-toolkit/blob/main/docs/CONTRIBUTING.md)\n\n## \ud83d\udcd6 What is this?\n\nThe AsciiDoc DITA Toolkit is a command-line tool for technical writers and editors. It helps you:\n\n- **Find and fix** common issues in `.adoc` files before publishing\n- **Apply automated checks** and transformations using a plugin system\n- **Ensure consistency** across large documentation projects\n- **Integrate** with your existing documentation workflow\n\n## \ud83d\udce6 Installation\n\n### Option 1: Container (No Python Required)\n\nUse Docker containers if you prefer not to install Python dependencies locally, or need consistent environments across teams:\n\n```sh\n# Production use (smaller, optimized)\ndocker run --rm -v $(pwd):/workspace rolfedh/asciidoc-dita-toolkit-prod:latest --help\n\n# Development use (includes dev tools)\ndocker run --rm -v $(pwd):/workspace rolfedh/asciidoc-dita-toolkit:latest --help\n\n# GitHub Container Registry (alternative)\ndocker run --rm -v $(pwd):/workspace ghcr.io/rolfedh/asciidoc-dita-toolkit:latest --help\n```\n\n**Benefits of container approach:**\n\n- No need to install Python or manage dependencies\n- Consistent environment across different systems\n- Easy to use in CI/CD pipelines\n- Automatic cleanup after each run\n\n### Option 2: PyPI\n\nInstall the toolkit using pip:\n\n```sh\npython3 -m pip install asciidoc-dita-toolkit\n```\n\n> **\ud83c\udf19 Nightly Releases**: This project automatically publishes nightly patch releases to PyPI whenever there are new commits. These releases include the latest fixes and improvements. The nightly releases follow the pattern `x.y.z` where `z` is automatically incremented.\n\n### Upgrading\n\n**Container:**\n\n```sh\n# Production image (recommended for most users)\ndocker pull rolfedh/asciidoc-dita-toolkit-prod:latest\n\n# Development image (includes dev tools)\ndocker pull rolfedh/asciidoc-dita-toolkit:latest\n```\n\n**PyPI:**\n\n```sh\npython3 -m pip install --upgrade asciidoc-dita-toolkit\n```\n\n### Requirements\n\n- Python 3.7 or newer\n- No external dependencies (uses only Python standard library)\n\n## \ud83d\udd27 Usage\n\n### List available plugins\n\n```sh\nasciidoc-dita-toolkit --list-plugins\n```\n\n### Run a plugin\n\n```sh\nasciidoc-dita-toolkit <plugin> [options]\n```\n\n- `<plugin>`: Name of the plugin to run (e.g., `EntityReference`, `ContentType`)\n- `[options]`: Plugin-specific options (e.g., `-f` for a file, `-r` for recursive)\n\n### Common Options\n\nAll plugins support these options:\n\n- `-f FILE` or `--file FILE`: Process a specific file\n- `-r` or `--recursive`: Process all .adoc files recursively in the current directory\n- `-d DIR` or `--directory DIR`: Specify the root directory to search (default: current directory)\n\n### \ud83d\udcdd Examples\n\n#### Fix HTML entity references in a file\n\n```sh\nasciidoc-dita-toolkit EntityReference -f path/to/file.adoc\n```\n\n#### Add content type labels to all files recursively\n\n```sh\nasciidoc-dita-toolkit ContentType -r\n```\n\n#### Process all .adoc files in a specific directory\n\n```sh\nasciidoc-dita-toolkit EntityReference -d /path/to/docs -r\n```\n\n### Container Usage\n\nIf using the container version, all commands work the same but are prefixed with the Docker run command:\n\n```sh\n# List plugins\ndocker run --rm rolfedh/asciidoc-dita-toolkit-prod:latest --list-plugins\n\n# Fix entity references in current directory\ndocker run --rm -v $(pwd):/workspace rolfedh/asciidoc-dita-toolkit-prod:latest EntityReference -r\n\n# Add content type labels to a specific file\ndocker run --rm -v $(pwd):/workspace rolfedh/asciidoc-dita-toolkit-prod:latest ContentType -f docs/myfile.adoc\n\n# Interactive shell for development (use dev image)\ndocker run --rm -it -v $(pwd):/workspace rolfedh/asciidoc-dita-toolkit:latest /bin/bash\n```\n\n**Container command breakdown:**\n\n- `docker run --rm` - Run and automatically remove container when done\n- `-v $(pwd):/workspace` - Mount current directory as `/workspace` in container\n- `rolfedh/asciidoc-dita-toolkit-prod:latest` - The production container image (recommended)\n- Everything after the image name works exactly like the PyPI version\n\n**Tip:** Create a shell alias to simplify container usage:\n\n```sh\nalias asciidoc-dita-toolkit='docker run --rm -v $(pwd):/workspace rolfedh/asciidoc-dita-toolkit-prod:latest'\n```\n\nThen use it exactly like the PyPI version:\n\n```sh\nasciidoc-dita-toolkit --list-plugins\nasciidoc-dita-toolkit EntityReference -r\n```\n\n### \ud83d\udd0c Available Plugins\n\n| Plugin | Description | Example Usage |\n|--------|-------------|---------------|\n| `EntityReference` | Replace unsupported HTML character entity references with AsciiDoc attribute references | `asciidoc-dita-toolkit EntityReference -f file.adoc` |\n| `ContentType` | Add `:_mod-docs-content-type:` labels where missing, based on filename | `asciidoc-dita-toolkit ContentType -r` |\n\n> **\ud83d\udccb Technical Details**: For plugin internals and supported entity mappings, see [docs/asciidoc-dita-toolkit.md](docs/asciidoc-dita-toolkit.md).\n\n## \ud83d\udd0d Troubleshooting\n\n- **Python Version**: Make sure you are using Python 3.7 or newer\n- **Installation Issues**: Try upgrading pip: `python3 -m pip install --upgrade pip`\n- **Development Setup**: If you need to use a local clone, see the [contributor guide](docs/CONTRIBUTING.md)\n- **Plugin Errors**: Use `-v` or `--verbose` flag for detailed error information\n\n## \ud83d\udcda Related Resources\n\n- **[`asciidoctor-dita-vale`](https://github.com/jhradilek/asciidoctor-dita-vale)**: Vale style rules and test fixtures for validating AsciiDoc content\n\n## \ud83e\udd1d Contributing\n\nWant to add new plugins or help improve the toolkit?\n\n- Read our [Contributing Guide](docs/CONTRIBUTING.md)\n- Follow the [Plugin Development Pattern](docs/PLUGIN_DEVELOPMENT_PATTERN.md) for new plugins\n- Check out [open issues](https://github.com/rolfedh/asciidoc-dita-toolkit/issues)\n- See our [Security Policy](SECURITY.md) for reporting vulnerabilities\n\n## \ud83d\udcc4 License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A toolkit for preparing AsciiDoc files for DITA publishing workflows",
    "version": "2.0.0",
    "project_urls": null,
    "split_keywords": [
        "asciidoc",
        " dita",
        " documentation",
        " publishing",
        " markup"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "b77a4039f36c0470faed0f82285e38395d7a24d5f76c6fccb0dfc400d0b7cf97",
                "md5": "4ccdc706215dff5480c622b1d53ab865",
                "sha256": "c74e42f399c46b592d84ef176e2383f9eaf40914930f297e186d7c60119f02d1"
            },
            "downloads": -1,
            "filename": "adt_core-2.0.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "4ccdc706215dff5480c622b1d53ab865",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 10560,
            "upload_time": "2025-07-09T10:54:24",
            "upload_time_iso_8601": "2025-07-09T10:54:24.674073Z",
            "url": "https://files.pythonhosted.org/packages/b7/7a/4039f36c0470faed0f82285e38395d7a24d5f76c6fccb0dfc400d0b7cf97/adt_core-2.0.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "1e7bda1001945e4a91e94bd1b2b0b5452894b193333fc3b8214f6b13a4835683",
                "md5": "f2800feca60e62c4aa2e4c93d7bb160b",
                "sha256": "46fa20f673a162b3538865ae03717e080893c57ebc9ecf9e431969a6f2cc18ce"
            },
            "downloads": -1,
            "filename": "adt_core-2.0.0.tar.gz",
            "has_sig": false,
            "md5_digest": "f2800feca60e62c4aa2e4c93d7bb160b",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 39446,
            "upload_time": "2025-07-09T10:54:26",
            "upload_time_iso_8601": "2025-07-09T10:54:26.096121Z",
            "url": "https://files.pythonhosted.org/packages/1e/7b/da1001945e4a91e94bd1b2b0b5452894b193333fc3b8214f6b13a4835683/adt_core-2.0.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-07-09 10:54:26",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "adt-core"
}
        
Elapsed time: 1.32683s