- html output and pdf output may need different images (html resized, pdf max resoluation); since asciidoctor-syntax does not allow specifying target-format-specific image file names, the script can be used to toggle a set of adoc files from html to pdf mode and vice-versa (basically in-place replacing file names)
- cross-referencing in large, multi-adoc-file documents can be tricky, even with good editors such as AsciiDocFX. The second script parses all adoc files in a directory and a) dumps out a list of cross-ref-labels (only manually created labels, so far) and also checks for duplicates and invalid label strings; and b) checks all cross-references in the text if the referenced labels exist - in case of error, filename and line number are printed out for easy fixing.
Re: Publishing helper scripts for image handling and cross-referencing
Yup, imagemagick works good, too.
One possible way to further automate the process would be to just store the 'yyy-print.png' variant, and in case that the width=xxx option passed to the image tag is not matching the native yyy-print.png image's resolution, fire up imagemagick and generate the corresponding smaller-size image on the fly. This would indeed simplify the screenshot update procedure.
Doing it manually has the advantage of having visual feedback and control over the resized image. Depending on the image type and content, sometimes resizing by 75% or 50% gives better quality than some weird percentage that might be obtained by fixing the target dimension.