processing-library-template icon indicating copy to clipboard operation
processing-library-template copied to clipboard

incorrect generated library.properties

Open vincentsijben opened this issue 8 months ago • 5 comments

Describe the bug

When using the gradle task "writeLibraryProperties", the : sign is escaped with an \ . So this

# List of authors. Links can be provided using the syntax [author name](url).
authors=[Vincent Sijben](https://github.com/vincentsijben)

# A web page for your Library, NOT a direct link to where to download it.
url=https://vincentsijben.github.io/vjmotion-processing/

ends up being this in library.properties

authors=[Vincent Sijben](https\://github.com/vincentsijben)
url=https\://vincentsijben.github.io/vjmotion-processing/

which in turn causes the link in the contribution manager to fail.

vincentsijben avatar May 14 '25 20:05 vincentsijben

Hi @vincentsijben and thanks for your report!

Would you be interested in submitting a PR for a fix? I’d be happy to provide guidance if needed.

SableRaf avatar May 15 '25 10:05 SableRaf

https://github.com/processing/processing-library-template/pull/89

I had to ask chatGPT 🤣

vincentsijben avatar May 15 '25 21:05 vincentsijben

Hi @vincentsijben and thanks for your efforts!

@Stefterv and I looked into this further. Escaping the : character is part of the .properties specification. The actual issue is with the scripts/parse_and_validate_properties_txt.py script in the processing-contributions repo. I created an issue about this over there: https://github.com/processing/processing-contributions/issues/76

SableRaf avatar May 16 '25 12:05 SableRaf

@vincentsijben thanks for reporting this and the quick fix! @SableRaf @Stefterv thanks for delving deeper into the effect, and the cause of it.

mingness avatar May 16 '25 12:05 mingness

I've made changes to the processing-contributions repo that should fix the linking issue.

First, I manually removed the backslashes - the contributions.yaml file is only updated when the version is updated, so it wouldn't automatically remove the backslashes until the next update.

Second, the parsing function reads in property text files as Java property files, with the additional parsing of inline comments. Inline comments are present in many property text files, but are not treated as such in Java property files. These comments are present to clarify the formatting version numbers, so without this additional parse step, the version numbers would contain the hash and comments.

Anyway, any new libraries won't introduce the backslash-colon into urls in the contributions.yaml

mingness avatar May 17 '25 10:05 mingness