Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Support paths (and similar strings) in stdin #557

@ninsbl

Description

@ninsbl

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions