An open API service indexing awesome lists of open source software.

https://github.com/sbsdev/dtbook-update-metadata

A tiny xml transformer that will update the meta data in your DTBook file and only that
https://github.com/sbsdev/dtbook-update-metadata

dtbook sgml-entity xml xml-parsing xml-transformation

Last synced: 28 days ago
JSON representation

A tiny xml transformer that will update the meta data in your DTBook file and only that

Awesome Lists containing this project

README

          

#+title: dtbook-update-metadata

A tiny xml transformer that will update the meta data in your DTBook
file and only that. No entity expansion, no anything! You get your
original xml back with the updated meta data.

* Installation
Clone and build with

#+begin_example
mvn clean package
#+end_example

* Release

Updates the version number in the pom and deploys the artifacts to
Maven Central

#+begin_src shell
mvn release:clean release:prepare
mvn release:perform
#+end_src

* Usage

#+begin_example
java -Ddc:Title="New Title" -jar dtbook-update-metadata-1.0-jar-with-dependencies.jar < original.xml > updated.xml
#+end_example

** Valid meta data properties
The following meta data names are recognized.

- dc:Title
- dc:Creator
- dc:Subject
- dc:Description
- dc:Publisher
- dc:Date
- dc:Type
- dc:Format
- dc:Identifier
- dc:Source
- dc:Language
- dc:Rights
- dtb:uid
- dtb:sourceEdition
- dtb:sourcePublisher
- dtb:sourceRights
- prod:series
- prod:seriesNumber
- prod:source

* Contributing
If you have any improvements or comments please feel free to file a
pull request or an issue.

* Credits
Based on ideas on [[https://stackoverflow.com/a/36097922][how to make a StaX transformer]], a [[https://www.vogella.com/tutorials/JavaXML/article.html][Java and XML
tutorial]] and most importantly on [[https://stackoverflow.com/q/1777878][how to disable entity expansion]].

* License
Copyright © 2024 [[https://www.sbs.ch/][Swiss Library for the Blind, Visually Impaired and
Print Disabled]].

Distributed under the [[http://www.gnu.org/licenses/gpl-3.0.html][GNU General Public License]]. See the file
LICENSE.