Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ignore non property structures to allow more advanced string building #30

Open
mzeinstra opened this issue Oct 18, 2024 · 0 comments
Open
Labels
enhancement New feature or request

Comments

@mzeinstra
Copy link
Collaborator

I would like to create a structure with name (P9) and birth (P19) and death dates (P21):

P9 (P19 - P21)
But if there is no P19 I want
P9 ( - P21)
and if there is no P21 I want
P9 (P19 - )

Currently I cannot configure this. It would be helpful to allow for 'non property paramaters' in the config.

                "*": {
                    "P9": "$",
                    "P9.P11": " $",
                    "P9.P12": ", $",
                    "P19": " ($",
                    "P21": " - $)"
                }

Ideally I would want to do something like:

                "*": {
                    "P9": "$",
                    "P9.P11": " $",
                    "P9.P12": ", $",
                    "_1": " (",
                    "P19": "$",
                    "_2": " - ",
                    "P21": "$",
                    "_3": ")"
                }

I tried using other Properties, but it appears that when no $ is found, not string is placed. I.e. this hack does not work:

                "*": {
                    "P9": "$",
                    "P9.P11": " $",
                    "P9.P12": ", $",
                    "P23": " (",
                    "P19": "$",
                    "P36": " - ",
                    "P21": "$",
                    "P71": ")"
                }

Where P23, P36, and P71 are required fields in the item, so we expect them to be there. But without a $ the line is ignored.

@JeroenDeDauw JeroenDeDauw added the enhancement New feature or request label Oct 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants