https://github.com/wvbe/dita-refactor-tool
A command-line tool for refactoring a DITA XML repository
https://github.com/wvbe/dita-refactor-tool
command-line-tool dita xml
Last synced: 10 months ago
JSON representation
A command-line tool for refactoring a DITA XML repository
- Host: GitHub
- URL: https://github.com/wvbe/dita-refactor-tool
- Owner: wvbe
- License: mit
- Created: 2021-05-01T08:50:24.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2021-09-02T11:23:19.000Z (almost 5 years ago)
- Last Synced: 2025-03-21T05:30:25.344Z (about 1 year ago)
- Topics: command-line-tool, dita, xml
- Language: TypeScript
- Homepage:
- Size: 266 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# DITA refactor tool
**A command-line interface for some common refactorings on a DITA XML set.**
Focuses on `@href` and `@conref` references. Assumes all cross-references are relative file URLs.
Does not have much schema awareness or respect DITA inheritance. Does not prettify XML.
## Moving files
Moves the file, and fixes inbound cross-references to any child element, and any outbound
cross-references.
```sh
dita-move docs/some/topic.xml docs/another/location.xml
```
## Checking cross-references
Go over any cross-reference that is broken, or whose link text does not match the target title, and
decide what to do in an interactive prompt.
```sh
dita-check-references
--fix-document-not-found
--fix-element-not-found
--fix-text-not-match
--fix-all
dita-check-references --fix-document-not-in-map my-ditamap.xml
```