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

Support paths (and similar strings) in stdin #557

Open
ninsbl opened this issue Sep 27, 2024 · 0 comments
Open

Support paths (and similar strings) in stdin #557

ninsbl opened this issue Sep 27, 2024 · 0 comments

Comments

@ninsbl
Copy link
Collaborator

ninsbl commented Sep 27, 2024

It would be nice to be able to extract any string from module stdout and inject it to input to other parameters.
In particular, I am tinking of paths e.g. from g.tempfile, like e.g. here:

{
                    "list": [
                        {
                            "flags": "d",
                            "id": "g_tempfile",
                            "inputs": [
                                {
                                    "param": "pid",
                                    "value": "123456789"
                                }
                            ],
                            "module": "g.tempfile"
                        },
                        {
                            "flags": "g",
                            "id": "g_region",
                            "inputs": [
                                {
                                    "param": "raster",
                                    "value": "elevation"
                                }
                            ],
                            "module": "g.region"
                        },
                        {
                            "flags": "g",
                            "id": "r_univar",
                            "inputs": [
                                {
                                    "param": "map",
                                    "value": "elevation"
                                },
                                {
                                    "param": "output",
                                    "value": "g_tempfile::stdout/temporary_file.txt"
                                }
                            ],
                            "module": "r.univar"
                        }
                    ],
                    "version": "3"
                }

g_tempfile::stdout above process chain is not parsed.
Would it be sufficient to add e.g. / here:

for delimiter in ["::", " ", "+", "-", "*", ":", "(", ")"]:

I am happy to create a PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant