GreycLab / gmic

GREYC's Magic for Image Computing: A Full-Featured Open-Source Framework for Image Processing
Other
66 stars 11 forks source link

Feature Request: import_glob_text #16

Closed Reptorian1125 closed 7 months ago

Reptorian1125 commented 11 months ago

I would like to have a mixture of import_text and import_glob. Basically, import every files within folder as if it was imported one by one with it command. I think G'MIC is useful for even non-image simple files, hence my asking.

Another idea is to have a option for it command to import all files within current directory. Best approach is to '*' as a possible argument which implies every files within current directory is to be imported. This can also be extended to other input commands I think.

However, I can do this manually with exec to find all the file names within current directory, and use it command, process them with my command, and export them back. As a matter of fact, I pushed a command on gmic-community to aid on that.

It's not the most wanted feature request, and workarounds do exist, but I'll leave this idea to you anyway.

dtschump commented 7 months ago

You can do something as:

foo :
  files 0,"*" files=${}
  repeat narg($files) {
    arg0 $>,$files file=${}
    e "- Load '"$file"'."
    it $file
  }